tah is the abbreviation of Trace And Header. Madagascar programs
that begin with sftah are a designed to:
1- read trace and headers from separate rsf files and write them to
standard output (ie sftahread)
2- filter programs that read and write standard input/output and
process the tah data (eg sftahnmo, sftahstack)
3- read tah data from standard input and write separate rsf files for
the trace and headers data (ie sftahwrite)
These programs allow Seismic Unix (su) like processing in Madagascar.
Some programs have su like names.
Some programs in this suite are sftahread, sftahgethw, ftahhdrmath,
The sftahheadermath updates a trace header with a new value computed from
input trace headers. The program is modeled on sfheadermath. A formula
input to the parameter output is used to compute a value saves in the
outputkey header location. The forma can contain the binary operators
+, -, *, and /. Parenthesis, i.e. ( and ), can be used to specify
order of operation.
Known functions for float data:
cos, sin, tan, acos, asin, atan,
cosh, sinh, tanh, acosh, asinh, atanh,
exp, log, sqrt, abs, erf, erfc, sign
Known functions for int data: sign, abs
A simple example is 2D offset can be computed from sx and gx:
sftahheadermath outputkey=offset output=abs(sx-gx)
In this example input traces in timodel_shot_data_II.rsf are merged
with headers in timodel_shot_data_II_hdr.rsf and written to the pipe.
Three seperate executions of sftahheadermath are used to compute
headers. The first sftahheadermath averages sy and gy to compute cdpy.
The second sftahheadermath computes the cdp number by dividing cdpy by
the cdp interval, 20 meters. The third sftahheadermath compute the
cdpt by dividing the offset by 200. Sftahgain is used to multiply
trace amplitudes by time (a simple spreading correction. The traces
are passed to sftahwrite that outputs cdpt 1, the near trace, to the
file timodel_ntg_II.rsf. The trace headers are saved in
timodel_ntg_II_hdr.rsf. Sftahwrite also writes the traces to STDOUT,
which is directed to /dev/null (the bit bucket).
string output= no default
An equation to compute using the header keys. Equations should
problable be enclosed in quotes, ie ", to the equation can include
multiplication, *, or blanks.
For example, to compute the midpoint x input:
string outputkey= no default
the name of the output trace header key to put the evaluation of
output. For example to put the average of sx and gx into cdpx input:
Describes the output in a mathematical notation.
name of the header key to put the results of the output equation
flag to control amount of print
0 terse, 1 informative, 2 chatty, 3 debug