00001 /* Copyright (c) Colorado School of Mines, 2006.*/ 00002 /* All rights reserved. */ 00003 00004 /* tapesegy.h - include file for SEGY traces as bytes (only for segyread,write) 00005 * 00006 * declarations for: 00007 * typedef struct {} segytape - the trace identification header 00008 * typedef struct {} bhedtape - binary header 00009 * typedef static struct {} tapehdr - type and offsets for trace header 00010 * typedef static struct {} tapebhdr - type and offsets for binary header 00011 * 00012 * Note: last two commented off for now. 00013 * 00014 * Reference: 00015 * K. M. Barry, D. A. Cavers and C. W. Kneale, "Special Report: 00016 * Recommended Standards for Digital Tape Formats", 00017 * Geophysics, vol. 40, no. 2 (April 1975), P. 344-352. 00018 * 00019 * $Author: john $ 00020 * $Source: /usr/local/cwp/src/su/include/RCS/tapesegy.h,v $ 00021 * $Revision: 1.7 $ ; $Date: 1996/09/09 17:11:38 $ 00022 */ 00023 00024 #ifndef TAPESEGY_H 00025 #define TAPESEGY_H 00026 00027 /* TYPEDEFS */ 00028 typedef struct { /* tapesegy - trace identification header */ 00029 00030 unsigned int tracl:32; /* trace sequence number within line */ 00031 00032 unsigned int tracr:32; /* trace sequence number within reel */ 00033 00034 unsigned int fldr:32; /* field record number */ 00035 00036 unsigned int tracf:32; /* trace number within field record */ 00037 00038 unsigned int ep:32; /* energy source point number */ 00039 00040 unsigned int cdp:32; /* CDP ensemble number */ 00041 00042 unsigned int cdpt:32; /* trace number within CDP ensemble */ 00043 00044 unsigned int trid:16; /* trace identification code: 00045 1 = seismic data 00046 2 = dead 00047 3 = dummy 00048 4 = time break 00049 5 = uphole 00050 6 = sweep 00051 7 = timing 00052 8 = water break 00053 9---, N = optional use (N = 32,767) */ 00054 00055 unsigned int nvs:16; /* number of vertically summed traces (see 00056 vscode in bhed structure) */ 00057 00058 unsigned int nhs:16; /* number of horizontally summed traces (see 00059 vscode in bhed structure) */ 00060 00061 unsigned int duse:16; /* data use: 00062 1 = production 00063 2 = test */ 00064 00065 unsigned int offset:32; /* distance from source point to receiver 00066 group (negative if opposite to direction 00067 in which the line was shot) */ 00068 00069 unsigned int gelev:32; /* receiver group elevation from sea level 00070 (above sea level is positive) */ 00071 00072 unsigned int selev:32; /* source elevation from sea level 00073 (above sea level is positive) */ 00074 00075 unsigned int sdepth:32; /* source depth (positive) */ 00076 00077 unsigned int gdel:32; /* datum elevation at receiver group */ 00078 00079 unsigned int sdel:32; /* datum elevation at source */ 00080 00081 unsigned int swdep:32; /* water depth at source */ 00082 00083 unsigned int gwdep:32; /* water depth at receiver group */ 00084 00085 unsigned int scalel:16; /* scale factor for previous 7 entries 00086 with value plus or minus 10 to the 00087 power 0, 1, 2, 3, or 4 (if positive, 00088 multiply, if negative divide) */ 00089 00090 unsigned int scalco:16; /* scale factor for next 4 entries 00091 with value plus or minus 10 to the 00092 power 0, 1, 2, 3, or 4 (if positive, 00093 multiply, if negative divide) */ 00094 00095 unsigned int sx:32; /* X source coordinate */ 00096 00097 unsigned int sy:32; /* Y source coordinate */ 00098 00099 unsigned int gx:32; /* X group coordinate */ 00100 00101 unsigned int gy:32; /* Y source coordinate */ 00102 00103 unsigned int counit:16; /* coordinate units code: 00104 for previoius four entries 00105 1 = length (meters or feet) 00106 2 = seconds of arc (in this case, the 00107 X values are unsigned intitude and the Y values 00108 are latitude, a positive value designates 00109 the number of seconds east of Greenwich 00110 or north of the equator */ 00111 00112 unsigned int wevel:16; /* weathering velocity */ 00113 00114 unsigned int swevel:16; /* subweathering velocity */ 00115 00116 unsigned int sut:16; /* uphole time at source */ 00117 00118 unsigned int gut:16; /* uphole time at receiver group */ 00119 00120 unsigned int sstat:16; /* source static correction */ 00121 00122 unsigned int gstat:16; /* group static correction */ 00123 00124 unsigned int tstat:16; /* total static applied */ 00125 00126 unsigned int laga:16; /* lag time A, time in ms between end of 240- 00127 byte trace identification header and time 00128 break, positive if time break occurs after 00129 end of header, time break is defined as 00130 the initiation pulse which maybe recorded 00131 on an auxiliary trace or as otherwise 00132 specified by the recording system */ 00133 00134 unsigned int lagb:16; /* lag time B, time in ms between the time 00135 break and the initiation time of the energy source, 00136 may be positive or negative */ 00137 00138 unsigned int delrt:16; /* delay recording time, time in ms between 00139 initiation time of energy source and time 00140 when recording of data samples begins 00141 (for deep water work if recording does not 00142 start at zero time) */ 00143 00144 unsigned int muts:16; /* mute time--start */ 00145 00146 unsigned int mute:16; /* mute time--end */ 00147 00148 unsigned int ns:16; /* number of samples in this trace */ 00149 00150 unsigned int dt:16; /* sample interval; in micro-seconds */ 00151 00152 unsigned int gain:16; /* gain type of field instruments code: 00153 1 = fixed 00154 2 = binary 00155 3 = floating point 00156 4 ---- N = optional use */ 00157 00158 unsigned int igc:16; /* instrument gain constant */ 00159 00160 unsigned int igi:16; /* instrument early or initial gain */ 00161 00162 unsigned int corr:16; /* correlated: 00163 1 = no 00164 2 = yes */ 00165 00166 unsigned int sfs:16; /* sweep frequency at start */ 00167 00168 unsigned int sfe:16; /* sweep frequency at end */ 00169 00170 unsigned int slen:16; /* sweep length in ms */ 00171 00172 unsigned int styp:16; /* sweep type code: 00173 1 = linear 00174 2 = cos-squared 00175 3 = other */ 00176 00177 unsigned int stas:16; /* sweep trace length at start in ms */ 00178 00179 unsigned int stae:16; /* sweep trace length at end in ms */ 00180 00181 unsigned int tatyp:16; /* taper type: 1=linear, 2=cos^2, 3=other */ 00182 00183 unsigned int afilf:16; /* alias filter frequency if used */ 00184 00185 unsigned int afils:16; /* alias filter slope */ 00186 00187 unsigned int nofilf:16; /* notch filter frequency if used */ 00188 00189 unsigned int nofils:16; /* notch filter slope */ 00190 00191 unsigned int lcf:16; /* low cut frequency if used */ 00192 00193 unsigned int hcf:16; /* high cut frequncy if used */ 00194 00195 unsigned int lcs:16; /* low cut slope */ 00196 00197 unsigned int hcs:16; /* high cut slope */ 00198 00199 unsigned int year:16; /* year data recorded */ 00200 00201 unsigned int day:16; /* day of year */ 00202 00203 unsigned int hour:16; /* hour of day (24 hour clock) */ 00204 00205 unsigned int minute:16; /* minute of hour */ 00206 00207 unsigned int sec:16; /* second of minute */ 00208 00209 unsigned int timbas:16; /* time basis code: 00210 1 = local 00211 2 = GMT 00212 3 = other */ 00213 00214 unsigned int trwf:16; /* trace weighting factor, defined as 1/2^N 00215 volts for the least sigificant bit */ 00216 00217 unsigned int grnors:16; /* geophone group number of roll switch 00218 position one */ 00219 00220 unsigned int grnofr:16; /* geophone group number of trace one within 00221 original field record */ 00222 00223 unsigned int grnlof:16; /* geophone group number of last trace within 00224 original field record */ 00225 00226 unsigned int gaps:16; /* gap size (total number of groups dropped) */ 00227 00228 unsigned int otrav:16; /* overtravel taper code: 00229 1 = down (or behind) 00230 2 = up (or ahead) */ 00231 00232 unsigned char unass[60]; /* unassigned */ 00233 00234 /* pseudo_float data[SU_NFLTS]; */ 00235 00236 unsigned char data[SU_NFLTS][4]; 00237 00238 } tapesegy; 00239 00240 /* FUNCTION PROTOTYPES */ 00241 #ifdef __cplusplus /* if C++, specify external linkage to C functions */ 00242 extern "C" { 00243 #endif 00244 00245 void gettapehval(const tapesegy *tapetr, int index, Value *valp); 00246 void puttapehval(tapesegy *tapetr, int index, Value *valp); 00247 00248 #ifdef __cplusplus /* if C++, end external linkage specification */ 00249 } 00250 #endif 00251 00252 #endif