There is a common seismic data manipulation task that often is called "geometry setting" in commercial packages in which the user converts information in the survey observers' logs into values in the trace headers.
The CWP/SU package does indeed, have provisions for getting and setting header fields, as well as computing a third header field from one or two other header fields. The programs that you need to use for this are:
sugethw ("SU get header word")
sushw ("SU set header word")
suchw ("SU change or compute header word")
Type the name of each program to see the self documentation of that code.
In addition, to find out what the header field "keywords"
mentioned in these programs are: type: sukeyword -o
You may have the information in a variety of forms.
The most common and least complicated assumptions of that form
will be made here.
The task requires the following basic steps.
For tape:
% segyread tape=/dev/rmt0 bfile=data.1 header=h.1 | segyclean > data.su
For diskfile
% segyread tape=data.segy bfile=data.1 header=h.1 | segyclean > data.su
The file data.segy is assumed here to be a "tape image" of segy data.
You have to be careful because some commercial software will write
SEGY-like data, by mimicking the layout of the SEGY format, but
this format will not be in the true IBM tape format that SEGY is defined
to be. In Promax, if you write a SEGY file in IBM Real format, then this
will be true SEGY tape image.
working on.
% surange < data.su
% sugethw < data.su output=geom key=key1,key2,... > hfile.ascii
The strings "key1,key2,..." are the keywords representing the desired SEGY trace header fields. These keywords may be listed via:
% sukeyword -o
% a2b < hfile.ascii n1=N_columns > hfile.binHere, N_columns is the number of columns in hfile.ascii. This is to convert hfile.ascii to a binary file.
Now use:
% sushw < data.su key=key1,key2,... infile=hfile.bin > data1.suHere key1,key2,... are the appropriate keywords representing the fields being set, listed in the exact order the values appear, column by column in hfile.ascii.