Go to the list of seismic processes.      Go to SIOSEIS introduction.
              SIOSEIS'S USE OF THE SEG-Y TRACE HEADER

The SEG standards may be found at http://seg.org/publications/tech-stand.

SIOSEIS uses the Society of Exploration Geophysists' SEG-Y tape format
internally to each seismic process as a method of associating the
geophysical variables with the data trace.  This could also be called
a dynamic data base.  A trace is defined to be the concatenation of a
trace header and the data trace.  A seismic process within SIOSEIS may
modify the trace header as well as the data trace.

Each seismic process examines every trace header for the trace id flag
and will not process the trace if it is dead.  Processes weight, mute,
and gather can set this flag to indicate that the trace is dead.
     
Processes that have time oriented parameters, such as decon and nmo, 
allow the water bottom time to be added to the time parameters.  This
allows the water bottom to become a datum.  (This is called 'hanging 
from the water bottom').  The water bottom time is set into the header
by PROCESS WBT (which requires that the shot geometry information to be
in the header).

PROCESS GEOM uses the shot number and trace number from the header to 
calculate and set the shot-receiver distance and the rp number of the 
trace.

PROCESS GATHER collects or sorts the traces so that all the traces with
the same rp number (in the header) are physically adjacent to each other.
Gather further sorts each rp by range (the shot-receiver distance in the
header).  Gather sets a flag in the trace header of the last trace within
the gather.

PROCESS MUTE not only mutes the data, but puts the mute times into the 
trace header.  If the entire trace is muted, the trace id flag in the 
header is set to indicate a dead trace.

PROCESS NMO corrects the data to normal incidence times, using the 
shot-receiver distance from the header.  Data that has been muted is not
moved out.  NMO can mute the data also.

PROCESS STACK sums all the traces, regardless of rp number, until the end
of gather flag in the trace header is found.  Stack also examines the
mute times in the header so that each stacked data sample can be divided
by the number of live samples contributing to the stack.

Also see IRIS.HEADER


THE TRACE HEADER LAYOUT AS USED BY SCRIPPS INSTITUTION OF OCEANOGRAPHY

The trace header is 240 bytes long (120 INTEGER*2 or 60 INTEGER*4)

Byte        16BIT 32BIT 64BIT pointer    DESCRIPTION OF USE
            WORD  WORD  WORD   name
            INDEX INDEX INDEX  
            ----- ----- ----- -------
 
    1-4             1         llseqptr   trace sequence number in the line
    5-8             2         lrseqptr   trace sequence number in the file.
   9-12             3     3   lshotptr * shot number or stacked trace number
                                         "Original field record number"
  13-16             4     4   lshtrptr * trace number within the shot 
  17-20             5     5   lespnptr   "Energy source point number -- used
                                         when more than one record occurs at 
                                         the same effective surface location".
                                         SIOSEIS puts the SEG-D FFID (file
                                         number) here.  
  21-24             6     6   lrpnptr    rp or cdp number 
  25-28             7     7   lrptrptr   trace number within the cdp
  29-30     15            75  itridptr * trace id:  1= live, 2=dead, 28=metadata
  31-32     16                ivstkptr   Number of traces vertically stacked
  33-34     17            77  ifoldptr   cdp fold (coverage)
  35-36     18                iuseptr    Data use:  1=production, 2=test
  37-40             10    10  ldisptr    source to receiver distance (range)
  41-44             11                   Receiver group elevation w.r.t. 
                                         sea level (depth is negative)
  45-48             12                   Surface elevation at source.
  49-52             13                   Source depth below surface (a positive number)
  53-56             14                   Datum elevation at receiver group.
  57-60             15                   Datum elevation at source
  61-64             16    16  lwbdptr    water depth at the source 
  65-68             17                   water depth at the receiver group.
  69-70     35                           Scalar to be applied to elevations
                                         and depths in bytes 41-68.
                                         If positive use as a multiplier.
                                         If negative, use as a divisor.
  71-72     36                           Scalar to be applied to coordinates
                                         in bytes 73-88.
                                         If positive use as a multiplier.
                                         If negative, use as a divisor.
  73-76             19    19  lsxcoptr   longitude in seconds of arc.
                                         Source X coordinate.
                                         See short word 36 (bytes 31-32) - scalar
  77-80             20    20  lsycoptr   latitude in seconds of arc.
                                         Source Y coordinate.
                                         See short word 36 (bytes 31-32) - scalar
  81-84             21    21  lrxcoptr   Receiver longitude or X coordinate
  85-88             22    22  lrycoptr   Receiver latitude or Y coordinate
  89-90     45                           Coordinate units; 1 = length (meters or feet)
                                         2 = seconds of arc, 3 = decimal degrees,
                                         4 = degrees, minutes, seconds (DDDMMSS.ss)
  91-92     46            106 icvelptr   Velocity analysis velocity.
                                         (SEG-Y weathering velocity)
  93-94                                  
  95-96     48                           Feathering angle in decidegrees.
                                         (SEG-Y uphole time at source)
  97-98     49                           Cross-line offset in meters.
                                         (SEG-Y upholes time at group)
105-106     53                ilagaptr   Lag time A in ms. before time 0
107-108     54      27        ilagbptr   Lag time B in ms. before time 0
                                         Used by UTIG as upper word of delay,
                                         so the delay is bytes 107-110
109-110     55            115 idelmptr   deep water delay in ms. (or meters)
                                         Rev 1 uses bytes 215-216 for a scalar
111-112     56            116 istmptr    start mute time in ms.
113-114     57            117 iendmptr   end mute time in ms.
115-116     58            118 isampptr * "Number of data samples in this trace".
                                         excludes header - unsigned int
117-118     59            119 isiptr   * "Sample interval in us for this trace".
125-126     63                           course.  SEG-Y correlation switch.
127-128     64                           speed (tenths of knots). SEG-Y start sweep freq. 
157-158     79            139 iyrptr     year data was recorded.
159-160     80            140 idayptr    day of year
161-162     81            141 ihrptr     hour of day
163-164     82            142 iminptr    minute of hour
165-166     83            143 isecptr    second of minute
167-168     84            144 igmtptr    1=local, 2=gmt
                                         sometimes used for milliseconds of shot

   The SEGY standard designates BYTES 181-240 as UNDEFINED.
181-184             46    46  ldelsptr   SIOSEIS:  deep water delay in seconds (prior to rev 2013.3)
                                         KEL:  Frequency channel code and Hours of ping
185-188             
189-192            
193-196             49    49  lsisptr    SIOSEIS: sample interval in seconds
                                         KEL: Rx_Gain and ProcessingGain
197-200             50    50  lwbtsptr   SIOSEIS: water bottom time in seconds.
                                         KEL: Sensitivity
201-204             51    51  lgatptr    SIOSEIS: <0, indicates the end of a gather
                                                  >0, the number of traces stacked
                                         EdgeTech: Trace Scalar.
                                         KEL: Primary channel parameter setting
205-208          
209-212         
*OLD*  213-214     107     54    54  isbptr     SeaBeam/Hydrosweep water depth
213-214
215-216   108       54                   Rev 1 scalar for deep water delay. (post rev 2013.3)
215-218             55    55  iscalar    Trace scale factor (multiplier) (EdgeTech)

* "Strongly recommended that this information always be recorded".
  SIOSEIS ALWAYS honors this recommendation.  SIOSEIS does not use the
  SEG-Y recommendation of recording word one, the "Trace sequence
  number within line ....."
Quotes (") are supplied around the exact wording from the SEG-Y standard.


      COMMON /segyptr/ llsegptr, lrseqptr, lshotptr, lshtrptr, lrpnptr,
     *                 lrptrptr, itridptr, ldisptr,  lwbdptr,  lsxcoptr,
     *                 lrxcoptr, idelmptr, istmptr,  iendmptr, isampptr,
     *                 isiptr,   iyrptr,   idayptr,  ihrptr,   iminptr,
     *                 isecptr,  igmtptr,  ldelsptr, lsmusptr, lemusptr,
     *                 lsisptr,  lwbtsptr, lgatptr,  lssmsptr, lesmsptr,
     *                 lsbptr,   ifoldptr, icvleptr, lespnptr, ilagaptr,
     *                 ilagbptr


          SEG-Y BINARY TAPE HEADER (400 bytes or 200 INTEGER*2)
16 Bit
word
index
------
 7             number of traces per ensemble.
 9             sample interval in microseconds of the first trace
11             number of samples of the first trace
13        *    segy format type
               =1, ibm floating point.
               =2, 32 bit integer.
               =3, 16 bit integer.
               =4, 16 bit UTIG floating point.
               =5, 32 bit IEEE floating point.
14             Ensemble fold.  Not used on shot gathers.  Same as word 7
               on CMP gathers.  CDP fold on stacked data.
15             THE TYPE (SORT) OF DATA
               =0 or 1, the data are sorted by shots
               =2, the data are sorted by rp (cdp gathers)
31             THE DOMAIN OF THE DATA.
               = 0 OR 1, Time
               = 2, frequency-wavenumber domain in rectangular coordinates
               = 3, frequency-wavenumber domain in polar   coordinates
               = 4, frequency domain in rectangular coordinates
               = 5, frequency domain in polar coordinates
               = 6, depth domain
               = 7, tau-p or slant stack domain
               = 8, F-K "user friendly" polar
               = 9, complex time domain or Analytic trace
32             The number of wavenumbers of the data set when the data are
               in the F-K domain (needed by fkmigr).
33             = The tx sample interval in us.
34             = The tx time delay in ms.
36             = The number of traces in the tx domain.

151            = SEG Y Format Revision Number.
152            = Fixed length trace flag.
               =1, All traces in the file have the same number of
                 samples, every ensemble has the same number of
                 traces, and the ensemble numbers are strictly
                 monotontically increasing.  This allows random
                 access to all traces.
153            = The Number of 3200-byte Textual Header Extension records
                 following the Binary Header.

* "Strongly recommended that this information always be recorded".
  SIOSEIS ALWAYS honors this recommendation for the format code.
  SIOSEIS does not use the SEG-Y recommendation of recording words
  that are in the trace header also.  E.G. SIOSEIS permits the
  sample interval and number of samples to vary from trace to trace.


*******************************************************************
segy_header.h
*******************************************************************
/*  The SEG-Y trace header  */

#define   HEADER_LENGTH  240

struct SEGY_TRACE_HEADER { 
	long		seq_num;	/* bytes 0-3, trace sequence number in the line */
	long		seq_reel;	/* bytes 4-7, trace sequence number in the reel */
	long		shot_num;	/* bytes 8-11, shot number or stacked trace number
						   "Original field record number"  */
	long		shot_tr;	/* bytes 12-15, trace number within the shot */
	long		espn;	/* bytes 16-19, "Energy source point number -- used
						    when more than one record occurs at
						    the same effective surface location". */
	long		rp_num;	/* bytes 20-23,  rp or cdp number  */
	long		rp_tr;	/* bytes 24-27,  trace number within the cdp */
	short	trc_id;	/* bytes 28-29,  trace id:  1= live, 2=dead  */
	short	num_vstk;	/* bytes 30-31,  Number of traces vertically stacked */
	short	cdp_fold;	/* bytes 32-33,  cdp fold (coverage)  */
	short	use;		/* bytes 34-35,  Data use:  1=production, 2=test  */
	long		range;	/* bytes 36-39,  source to receiver distance (range) */
	long		grp_elev;	/* bytes 40-43,  Receiver group elevation w.r.t.
					                  sea level (depth is negative)  */
	long		src_elev;	/* bytes 44-47,  Source elevation  */
	long		src_depth; /* bytes 48-51,  Source depth below surface.
							(depth is a positive number!) */
	long		grp_datum; /* bytes 51-55,  Datum elevation at receiver group.  */
	long		src_datum; /* bytes 56-59,  Datum elevation at source */
	long		src_wbd;	/* bytes 60-63,  water depth at the source */
	long		grp_wbd;	/* bytes 64-67,  water depth at the receiver group. */
	short	elev_scalar; /* bytes 68-69, Scalar to be applied to elevations
						and depths in bytes 41-68.
						If positive use as a multiplier.
						If negative, use as a divisor.  */
	short	coord_scalar; /* bytes 70-71, Scalar to be applied to
						coordinates in bytes 72-87.
						If positive use as a multiplier.
						If negative, use as a divisor.  */
	long		src_long;	/* bytes 72-75, longitude in seconds of arc.
						Source X coordinate */
	long		src_lat;	/* bytes 76-79, latitude in seconds of arc.
                                         Source Y coordinate   */
	long 	grp_long;	/* bytes 80-83, Receiver longitude or X coordinate */
	long		grp_lat;	/* bytes 84-87, Receiver latitude or Y coordinate */
	short	coord_units; /* bytes 88-89, = 2, coordinate units = seconds of arc */
	short	wvel;	/* bytes 90-91, weathering or water velocity */
	short	sbvel;	/* bytes 92-93, subweathering velocity  */
	short	src_up_vel; /* bytes 94-95, uphole time at source  */
	short	grp_up_vel; /* bytes 96-97, uphole time at group  */
	short	src_static; /* bytes 98-99, Source static correction  */
	short	grp_static; /* bytes 100-101, Group static correction  */
	short	tot_static; /* bytes 102-103, Total static applied */
	short	laga;	/* bytes 104-105, Lag time A in ms. before time 0 */
/*****	short	lagb;	/* bytes 106-107, Lag time B in ms. before time 0 */
	long		delay_mils; /* bytes 106-109, deep water delay in ms. (or meters)  */
	short	smute_mils; /* bytes 110-111, start mute time in ms. */
	short	emute_mils; /* bytes 112-113, end mutes time in ms.  */
	short	nsamps;	/* bytes 114-115, "Number of data samples in this
						trace" - excludes header */
	short	si_micros;	/* bytes 116-117, Sample interval in us for this trace  */
	short	other_1[19]; /* bytes 118-155, Other short integer stuff */
	short	year;	/* bytes 156-157, year data was recorded. */
	short	day_of_yr; /* bytes 158-159, recording day of year */
	short	hour;	/* bytes 160-161, recording hour of day  */
	short	min;		/* bytes 162-163, recording minute of hour  */
	short	sec;		/* bytes 164-165, recording second of minute */
	short	mils;		/* bytes 166-167, recording millisecond  */
					/* OFFICIAL SEGY says: "time basis code"  */
	short	tr_weight; /* bytes 168-169, Trace weighting factor  */
	short	other_2[5]; /* bytes 170-179, Other short integer stuff */
	float	delay;	/* bytes 180-183, deep water delay in seconds (or meters) */
	float	smute_sec; /* bytes 184-187, start mute time in seconds */
	float	emute_sec;	/* bytes 188-191, end mute time in seconds  */
	float	si_secs;	/* bytes 192-195, sample interval in seconds */
	float	wbt_secs;	/* bytes 196-199, water bottom time in seconds */
	long		end_of_rp; /* bytes 200-203, <0, indicates the end of a gather
							>0, the number of traces stacked
							Also EdgeTech's Trace Scalar.  */
	float	dummy1;	/* bytes 204-207 */
	float	dummy2;	/* bytes 208-211 */
	float	dummy3;	/* bytes 212-215 */
	float	dummy4;	/* bytes 216-219 */
	float	dummy5;	/* bytes 220-223 */
	float	dummy6;	/* bytes 224-227 */
	float	dummy7;	/* bytes 228-231 */
	float	dummy8;	/* bytes 232-235 */
	float	dummy9;	/* bytes 236-239 */
};
Go to the list of seismic processes.      Go to SIOSEIS introduction.