segd.h

Go to the documentation of this file.
00001 /* Copyright (c) Colorado School of Mines, 2006.*/
00002 /* All rights reserved.                       */
00003 
00004 /*-----------------------------------------------------------------------
00005  * segd.h - include file for SEGD traces
00006  *          Version 2.1, 10/10/94, Marc Schaming
00007  *          Version 2.2, 17/08/95, Celine Girard et Marc Schaming
00008  *          Version 2.3,  04/1997, Marc Schaming
00009  *          Version 2.4,  02/1998, Stewart A. Levin (SEP)
00010  *                        changed general_header_1.f to unsigned char[2]
00011  *                        changed non-struct typedefs to struct typedefs
00012  *                        to allow for uniform future expansion
00013  *          Version 2.5,  02/2001, Stewart A. Levin (SEP)
00014  *                        Little endian fixups for channel_set_header.cs
00015  *                        and dem_trace_header,tn
00016  *                        
00017 
00018  * declarations for:
00019  *      typedef struct {} general_header_1 :    general header
00020  *      typedef struct {} general_header_2 :    general header
00021  *      typedef struct {} general_header_n :    general header
00022  *      typedef struct {} gen_head_sn358 :      general header for sn358 
00023  *      typedef struct {} channel_set_header :  channel set descriptor
00024  *      typedef struct {} sample_skew :         sample skew block
00025  *      typedef struct {} extended_header   :   extended header  
00026  *      typedef struct {} external_header   :   external header  
00027  *      typedef struct {} general_trailer  :    general trailer  
00028 
00029  *      typedef struct {} dem_trace_header :    demultiplexed trace header
00030  *      typedef struct {} trace_header_ext :    trace header extension
00031  *      typedef struct {} general_trailer :     general trailer
00032  *
00033  *
00034  * Reference:
00035  *  SEG Subcommitee on Digital Tape Formats, "Digital field
00036  *      tape format standards - SEG-D"
00037  * Digital field tape format standards - SEG-D, REVISION 1 (1994)
00038  *    Geophysics, vol. 59, p.668-684
00039  *  
00040  *---------------------------------------------------------------------*/
00041 
00042 /*---------------- General header block #1 -------------------------*/
00043 
00044 typedef struct {
00045     unsigned char f[2];   /* 01-02 File number (0-9999) */
00046     unsigned short y;     /* 03-04 Format code */
00047     char k1_k2;           /* 05    General constants */
00048     char k3_k4;           /* 06    General constants */
00049     char k5_k6;           /* 07    General constants */
00050     char k7_k8;           /* 08    General constants */
00051     char k9_k10;          /* 09    General constants */
00052     char k11_k12;         /* 10    General constants */
00053     unsigned char yr;     /* 11    Year (0-99) */
00054     unsigned char gh_dy1; /* 12    Number blocks in general header */
00055                           /* 12     - day of year (x--) */
00056     unsigned char dy;     /* 13    Day of year (xx) */
00057     unsigned char h;      /* 14    Hour of day */
00058     unsigned char mi;     /* 15    Minute of hour */
00059     unsigned char se;     /* 16    Second of minute */
00060     unsigned char m[3];   /* 17    Manufacturer's code */
00061                           /* 18-19 and serial number */
00062     unsigned char b[3];   /* 20-22 Bytes per scan (multiplexed only) */
00063     unsigned char i;      /* 23    Base scan interval */
00064     unsigned char p_sbx;  /* 24    Polarity */
00065                           /* 24    - Number of scans per block */
00066     unsigned char sb;     /* 25    Number of scans per block */
00067     unsigned char z_r1;   /* 26    Record type */
00068                           /* 26    - Record length */
00069     unsigned char r;      /* 27    Record length */
00070     unsigned char str;    /* 28    Scan types per record  */
00071     unsigned char cs;     /* 29    Channels sets per scan type */ 
00072     unsigned char sk;     /* 30    Skew blocks */
00073     unsigned char ec;     /* 31    Extended header length */
00074     unsigned char ex;     /* 32    External header length */
00075 } general_header_1;
00076 
00077 
00078 /*---------------- General header block #2 -------------------------*/
00079 
00080 typedef struct {
00081     unsigned char ef[3]; /* 01-03 Extended file number */
00082     unsigned char en[2];  /* 04-05 Extended channel sets and scan types */
00083     unsigned char ecx[2]; /* 06-07 Extended header blocks */
00084     unsigned char eh[2];  /* 08-09 external header blocks */
00085     char x1;              /* 10    undefined */
00086     unsigned char rev[2]; /* 11-12 SEG-D revision number */
00087     unsigned short gt;    /* 13-14 General trailer number */
00088     unsigned char erl[3]; /* 15-17 Extended record length */
00089     char x2;              /* 18    undefined */
00090     unsigned char bn;     /* 19    General header block number */
00091     char x3[13];          /* 20-32 undefined */
00092 } general_header_2;
00093 
00094 
00095 /*---------------- General header block #n -------------------------*/
00096 
00097 typedef struct {
00098     char x1[3];           /* 01-03 undefined */
00099     unsigned char sln[5]; /* 04-08 Source line number */
00100     unsigned char spn[5]; /* 09-13 Source point number */
00101     unsigned char spi;    /* 14    Source point index */
00102     unsigned char pc;     /* 15    Phase control */
00103     unsigned char v;      /* 16    Type vibrator */
00104     short pa;             /* 17-18 Phase angle */
00105     unsigned char bn;     /* 19    General header block number */
00106     unsigned char ss;     /* 20    Source set number */
00107     char x2[12];          /* 21-32 undefined */
00108 } general_header_n;
00109 
00110 
00111 /*---------------- General header extension (Sercel SN358) ---------*/
00112 
00113 typedef struct {
00114     unsigned char fc1;    /* 01    first and last channel of seismic param 1 */
00115     unsigned char lc1;    /* 01-02 last channel of seismic param 1 */
00116     unsigned char fc2;    /* 03-04 first channel of seismic param 2 */
00117     unsigned char f_lc2;  /* 03-04 first and last channel of seismic param 2 */
00118     unsigned char lc2;    /* 04-05 last channel of seismic param 2 */
00119     unsigned char fc3;    /* 06-07 first channel of seismic param 3 */
00120     unsigned char f_lc3;  /* 07    fist and last channel of seismic param 3 */
00121     unsigned char lc3;    /* 07-08 last channel of seismic param 3 */
00122     unsigned char fc4;    /* 09-10 first channel of seismic param 4 */
00123     unsigned char f_lc4;  /* 10    first and last channel of seismic param 4 */
00124     unsigned char lc4;    /* 10-11 fist channel of seismic param 4 */
00125     unsigned char f_lac1; /* 12    first and last aux channel of scan type 1 */
00126     unsigned char fsc1;   /* 13-14 first seismic channel of scan type 1 */
00127     unsigned char f_lsc1; /* 14    first and last seismic channel of scan type 1 */
00128     unsigned char lsc1;   /* 14-15 last seismic channel of scan type 1 */
00129     unsigned char sam_int1;/* 16    sample interval of scan type 1 */
00130     unsigned char fac2;   /* 17    first and last aux channel of scan type 2 */
00131     unsigned char fsc2;   /* 18-19 first seismic channel of scan type 2 */
00132     unsigned char f_lsc2; /* 19    first and last seismic channel of scan type 2 */
00133     unsigned char lsc2;   /* 19-20 last seismic channel of scan type 2 */
00134     unsigned char sam_int2;/* 21    sample interval of scan type 2 */
00135     unsigned char bl_sig_le;/* 22    block signature length (n*0.1 s) */
00136     unsigned char rec_length[2];  /* 23-24 record length n*0.1 s (00.0-99.9) s */   
00137     unsigned char dyn_swit_del[2];   /* 25-26 dynamically switching delay (00.0-99.9 s) */
00138     unsigned char rec_del[2];       /* 27-28 recording delay (00.0-99.9s) */
00139     unsigned char ty_a_cha12;/* 29    type of auxiliary channel 1, channel 2 */
00140     unsigned char ty_a_cha34;/* 30    type of auxiliary channel 3, channel 4 */
00141     unsigned char ty_a_cha56;/* 31    type of auxiliary channel 5, channel 6 */
00142     unsigned char ty_a_cha78;/* 32    type of auxiliary channel 7, channel 8 */
00143     unsigned char mode_num;/* 33    mode number */ 
00144     unsigned char an_sys_co;/* 34    analog sys count (1-2), tape transport num */
00145     unsigned char reel_num[2];       /* 35-36 reel number (0-9999) */
00146     unsigned char file_num[2];       /* 37-38 file logical number */
00147     unsigned char sp_num[2];         /* 39-40 shot point number */ 
00148     unsigned char lc_nf;  /* 41    lc=0 lowcut fi. out, nf=0 notch fi. out */ 
00149     unsigned char fg_ic;  /* 42    fg=1 fist fixed gain, ic=1 internal osc. */
00150     unsigned char of1;    /* 43-45 oscillator frequency (0-9999.9 Hz) */ 
00151     unsigned char of2;    /* 43-45 oscillator frequency (0-9999.9 Hz) */ 
00152     unsigned char of3;    /* 43-45 oscillator frequency (0-9999.9 Hz) */ 
00153     unsigned char osc_att;/* 46    oscillator attenuator */ 
00154     unsigned char t_sig_ph;/* 47    test signal phase (1:+,0:-) */
00155     unsigned char m_gain; /* 48    main gain amplifier (0-15) 16: IFP */
00156     unsigned char dum[16];/* 49-64 additional information */ 
00157 } gen_head_sn358;
00158 
00159 
00160 /*---------------- Scan type header (Channel set descriptor ) ------*/
00161 
00162 typedef struct {
00163     unsigned char st;     /* 01    Scan type */
00164     unsigned char cn;     /* 02    Channel set number */
00165     unsigned short tf;    /* 03-04 Channel set start time */
00166     unsigned short te;    /* 05-06 Channel set end time */
00167     unsigned char mp[2];  /* 07-08 Descaling exponent */
00168     unsigned char cs[2];  /* 09-10 Channels in this channel set */
00169     unsigned char c;      /* 11    Channel type identification */
00170     unsigned char sc_j;   /* 12    Sample/channel gain */
00171                           /* 12    - Gain control method */
00172     unsigned short af;    /* 13-14 Alias filter frequency */
00173     unsigned short as;    /* 15-16 Alias filter slope */
00174     unsigned short lc;    /* 17-18 Low cut filter frequency */
00175     unsigned short ls;    /* 19-20 Low cut filter slope */
00176     unsigned short nt[3]; /* 21-26 Notch filter frequency */
00177     unsigned short ecs;   /* 27-28 Extended channel set number */
00178     unsigned char efh;    /* 29    Extended header flag */
00179     unsigned char vs;     /* 30    Vertical stack */
00180     unsigned char cab;    /* 31    Streamer number */
00181     unsigned char ary;    /* 32    Array forming */
00182 } channel_set_header;
00183 
00184 
00185 /*---------------- Sample skew -------------------------------------*/
00186           
00187 typedef struct { 
00188     unsigned char skew[32]; 
00189 } sample_skew;
00190 
00191 
00192 /*---------------- Extended header ---------------------------------*/
00193 
00194 typedef struct {
00195     unsigned char dummy[32];
00196 } extended_header;
00197 
00198 
00199 /*---------------- External header ---------------------------------*/
00200 
00201 typedef struct {
00202     unsigned char dummy[32];
00203 } external_header;
00204 
00205 
00206 /*---------------- General trailer ---------------------------------*/
00207 
00208 typedef struct {
00209     unsigned short gt;    /* 01-02 General trailer number */
00210     char x1[8];           /* 03-10 undefined */
00211     unsigned char c;      /* 11    Channel type identification */
00212     char x2[21];          /* 12-32 undefined */
00213 } general_trailer;
00214 
00215 
00216 /*--------------- Demultiplexed trace header -----------------------*/
00217 
00218 typedef struct {
00219     unsigned short f;     /* 01-02 file number */
00220     unsigned char st;     /* 03    scan type (1-2) */
00221     unsigned char cn;     /* 04    channel set */
00222     unsigned char tn[2];    /* 05-06 trace number */
00223     unsigned char t[3];   /* 07-09 timing word of the first sample if
00224                                 the data were written in the multiplexed
00225                                 format */
00226     unsigned char the;    /* 10    trace header extensions */
00227     unsigned char ss;     /* 11    sample skew of the first sample
00228                                 of the trace. It is a part of
00229                                 the fractional part of the base scan interval. Res :
00230                                 1/256 scan interval */
00231     unsigned char tr;     /* 12    trace edit */
00232     unsigned char tw[3];  /* 13-15 time from time break to the end of 
00233                                 the internal time break window (binary 
00234                                 number, inc 1ms) */
00235     unsigned char en[2];  /* 16-17 extended channel set number */
00236     unsigned char efn[3]; /* 18-20 extended file number */
00237 } dem_trace_header;
00238 
00239 
00240 /*---------------- Trace header extension --------------------------*/
00241 
00242 typedef struct {
00243     unsigned char rln[3]; /* 01-03 Receiver line number */
00244     unsigned char rpn[3]; /* 04-06 Receiver point number */
00245     unsigned char rpi;    /* 07    Receiver point index */
00246     unsigned char nbs[3]; /* 08-10 Number of samples per traces */
00247     char x[22];           /* 11-32 undefined */
00248 } trace_header_ext;

Generated on 5 Jan 2017 for IWAVE by  doxygen 1.4.7