sftahwrite (4.0)
index
user/karl/Mtahwrite.c
Read Trace And Header (tah) from standard input, write to separate files

 
Synopsis
        sftahwrite < in.rsf > out.rsf verbose=1 label#=(2,...) n#=(2,...) o#=(2,...) d#=(2,...) output= outheaders= mode=

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,
and sftahwrite.

The sftahwrite program reads the trace and header data (tah) from
standard input (usually a pipe), separates the trace data from the
header data. The trace data is written to output and the header is
written to outheaders. The output files can be mapped or sequential.
Mapped files use to trace header to determine the location in the
file to write the trace. The iline and xline headers are used in the
following example to put stacked data in (time, xline, iline) order
so it can be viewed using sfgrey. Sequential files order the traces in
the file in the order they are read from standard output. Sequential
files are a good way to save traces when the order is not important.
Sequential files are especially useful to save prestack seismic data.
The following example also saves the data in sequential mode.

EXAMPLE:

sftahread \
verbose=1 \
input=npr3_gathers.rsf \
| sftahnmo \
verbose=1 \
tnmo=0,.373,.619,.826,.909,1.017,1.132,1.222,1.716,3.010 \
vnmo=9086,10244,11085,10803,10969,11578,12252,12669,14590,17116 \
| sftahstack key=iline,xline verbose=1 \
| sftahwrite \
verbose=1 \
label2="xline" o2=1 n2=188 d2=1 \
label3="iline" o3=1 n3=345 d3=1 \
output=mappedstack.rsf \
| sftahwrite \
verbose=1 \
mode=seq \
output=seqstack.rsf \
>/dev/null

sfgrey
In this example the cmp sorted prestack data, npr3_gathers.rsf, are
read by sftahread. The headers are in the file npr3_gathers_hdr.rsf,
the headers parameter default. The headers are merged with the trace
amplitudes and the tah data sent down the pipe for nmo and stack. The
sftahwrite writes the trace data to mappedstack.rsf and the headers
are written to the file mappedstack_hdr.rsf. The order of the data in
the output file is defined by the iline and xline trace headers, so the
data order is (time,xline,iline). Finally, the output volume is
displayed using sfgrey.

 
Parameters
       
 
float d#=(2,...)
delta in the #-th dimension
 
string label#=(2,...)
name of each of the axes.
label1 is not changed from input. Each label must be a
header key like cdp, cdpt, or ep. The trace header
values are used to define the output trace location in
the output file.
 
string mode=


mapped - order traces in the output file by traces headers
use label2, label3... n2, n3, ..., o2, o3, .. and d2, d3,..
seq - just write the traces to the output files in the order
read from STDIN



 
largeint n#=(2,...)
number of locations in the #-th dimension
 
float o#=(2,...)
origin of the #-th dimension
 
string outheaders=


Output trace header file name. Default is the input data
file name, with the final .rsf changed to _hdr.rsf.

 
string output=


output trace filename. Required parameter with no default.

 
int verbose=1


flag to control amount of print
0 terse, 1 informative, 2 chatty, 3 debug

 
Used In
       

 
DATA
        boem-g3d1206-002a/displayin
bpmodel94/firstlook
bpstatics94/firstlook
bptti2007/firstlook
bpvelanal2004/firstlook
chevron2014/fwi
chevron2014/ntg
chevron2014/sxrxvolume
marmousi2mp/modelproc
new-zealand-kahu-3d/fetch
new-zealand-kerry3d/fetch
new-zealand-opunake-3d/displayin
new-zealand-opunake-3d/fetch
new-zealand-parihaka-3d/displayin
new-zealand-tui3d/fetch
new-zealand-waihapa-3d/fetch
new-zealand-waipuku-3d/fetch
new-zealand-waka-3d/fetch
new-zealand-waka-3d/firstlook
p-cable/ntg
p-cable/removeclick
p-cable/stack
p-cable/veltest
seam-phase1-2d/compare
seam-phase1-2d/cvs
seam-phase1-2d/fetch
seam-phase1-2d/filter
seam-phase1-2d/ntg
seam-phase1-2d/sfawefd2d
seam-phase1-2d/sfawefd2d_split
seam-phase1-2d/sfmshots
seam-phase1-2d/sfmshots1
seam-phase1-2d/sfshot1
seam-phase1-2d/vscan
seam_interpret/fetch
stratton/fetchbooklet
stratton/fetchfinal
stratton/fetchgather
stratton/fetchslow
teapotdome/angmig
teapotdome/canoren
teapotdome/cmp_stack_tahstack
teapotdome/fetch
teapotdome/firstlook
teapotdome/nmostack
teapotdome/poststack
teapotdome/scdecon
teapotdome/tahnmostack
teapotdome/tahscplot
teapotdome/tahscscale
teapotdome/tahsubset
teapotdome/teamodel
teapotdome/test-preprocessing
teapotdome/vels
teapotdome/zomig
viking/basicm8r
viking/decon
viking/firstlook

 
TCCS
        welllogs/logs