sfmath
(4.2-git)
index
system/main/math.c
Documentation
Mathematical operations on data files.
Synopsis
sfmath > out.rsf nostdin=n n#= d#=(1,1,...) o#=(0,0,...) label#= unit#= type= label= unit= output=
Known functions:
cos, sin, tan, acos, asin, atan,
cosh, sinh, tanh, acosh, asinh, atanh,
exp, log, sqrt, abs,
erf, erfc, sign (for float data),
arg, conj, real, imag (for complex data).
sfmath will work on float or complex data, but all the input and output
files must be of the same data type.
An alternative to sfmath is sfadd, which may be more efficient, but is
less versatile.
Examples:
sfmath x=file1.rsf y=file2.rsf power=file3.rsf output='sin((x+2*y)^power)' > out.rsf
sfmath < file1.rsf tau=file2.rsf output='exp(tau*input)' > out.rsf
sfmath n1=100 type=complex output="exp(I*x1)" > out.rsf
Arguments which are not treated as variables in mathematical expressions:
datapath=, type=, out=
See also: sfheadermath.
Parameters
float
d#=(1,1,...)
sampling on #-th axis
string
label=
data label
string
label#=
label on #-th axis
largeint
n#=
size of #-th axis
bool
nostdin=n
[y/n]
y - ignore stdin
float
o#=(0,0,...)
origin on #-th axis
string
output=
Mathematical description of the output
string
type=
output data type [float,complex]
string
unit=
data unit
string
unit#=
unit on #-th axis
Used In
BEI
dpmv/matt
dwnc/sigmoid
ft1/autocor
ft1/brad
ft1/ft2d
ft1/matrix
trimo/all
vela/strat
vela/vscan
CHEN
test/fpca
test/wavmod
test/xtime
CUP
rna2d/real
rna2d/shot
rna2d/simple
rna3d/shot
rna3d/sin
CWP
geo2006TimeShiftImagingCondition/flat
geo2006TimeShiftImagingCondition/icomp
geo2006TimeShiftImagingCondition/zicig
geo2007StereographicImagingCondition/flat4
geo2007StereographicImagingCondition/gaus1
geo2007StereographicImagingCondition/sigsbee2
geo2008InterferometricImagingCondition/circle
geo2008InterferometricImagingCondition/sact1
geo2008InterferometricImagingCondition/sigs2
geo2008IsotropicAngleDomainElasticRTM/marm2allA
geo2008IsotropicAngleDomainElasticRTM/marm2oneA
geo2008NumericWEMVAoperators/flatWEMVA
geo2008NumericWEMVAoperators/saltWEMVA
geo2009TTIModeSeparation/fold
geo2009TTIModeSeparation/marmousi2
geo2009TTIModeSeparation/operator
geo2009TTIModeSeparation/tti3
geo2009TTIModeSeparation/vti3
geo2009VTIModeSeparation/aniopsize
geo2009VTIModeSeparation/oporder
geo2009VTIModeSeparation/separate2
geo2009VTIModeSeparation/separate3
geo2009VTIModeSeparation/separate5
geo2009VTIModeSeparation/sigsbee
geo2011WideAzimuthAngleDecomposition/flatEICangle
geo2011WideAzimuthAngleDecomposition/seam357
jse2006RWEImagingOverturningReflections/sigsbee
pept2011MicroearthquakeMonitoring/saf1
pept2011MicroearthquakeMonitoring/saf2
pept2011MicroearthquakeMonitoring/saf3
DATA
alaska/line31-81-m8r
amoco/fdmod