next up previous contents
Next: Technical Questions Up: Answers to Frequently Asked Previous: Tape reading and writing   Contents

Geometry Setting

Question 17   How do I do ``geometry setting'' in SU?

Answer 17  

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.

  1. Get your data into SU format. The SU format is not exactly SEGY, but it does preserve the SEGY header information. If you are starting with SEGY data (either on tape, or on in the form of a diskfile) then you use "segyread" to read the data into an su file format.

    For tape:

          % segyread tape=/dev/rmt0 bfile=data.1 header=h.1 | segyclean >

    For diskfile

          %  segyread tape=data.segy bfile=data.1 header=h.1 | segyclean >
    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.

  2. If you have your data in the SU format, then you may view the ranges of the SEGY headers (headers that are not set will not be shown) via:
       % surange <

  3. Data often comes with some fields already set. To dump these fields in a format that is convenient for geometry setting, you would use sugethw in the following way:

       % sugethw <  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

  4. Once you have dumped the desired header fields into hfile.ascii then you may edit them with the editor of your choice. The point is that you may create a multi-column ascii file that lists the values of specific header fields (trace by trace, as they appear in by *any* method you wish. Each column will contain the value of a specific header field to be set.

  5. Now that you have created the ascii file containing your header values, you may load these values into via:

       % a2b < hfile.ascii n1=N_columns > hfile.bin
    Here, N_columns is the number of columns in hfile.ascii. This is to convert hfile.ascii to a binary file.

    Now use:

       % sushw < key=key1,key2,...  infile=hfile.bin >
    Here 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.

  6. If you want to compute a third header field from two given header field values, then you may use: suchw for this. Also, if the header fields that you want to set are systematic in some way (are constant for each trace or vary linearly across a gather), then you don't have to use the "infile=" option. You may simply give the necessary values to sushw. See the selfdocs for sushw and suchw for examples of these.

next up previous contents
Next: Technical Questions Up: Answers to Frequently Asked Previous: Tape reading and writing   Contents
John Stockwell 2007-04-10