?? segy.h
字號:
#ifdef UNOCAL_SEGY_H /* begin Unocal SU segy.h differences */ /* cwp local assignments */ float d1; /* sample spacing for non-seismic data */ float f1; /* first sample location for non-seismic data */ float d2; /* sample spacing between traces */ float f2; /* first trace location */ float ungpow; /* negative of power used for dynamic range compression */ float unscale; /* reciprocal of scaling factor to normalize range */ short mark; /* mark selected traces */ /* UNOCAL local assignments */ short mutb; /* mute time at bottom (start time) */ /* bottom mute ends at last sample */ float dz; /* depth sampling interval in (m or ft) */ /* if =0.0, input are time samples */ float fz; /* depth of first sample in (m or ft) */ short n2; /* number of traces per cdp or per shot */ short shortpad; /* alignment padding */ int ntr; /* number of traces */ /* UNOCAL local assignments end */ short unass[8]; /* unassigned */#else /* cwp local assignments */ float d1; /* sample spacing for non-seismic data */ float f1; /* first sample location for non-seismic data */ float d2; /* sample spacing between traces */ float f2; /* first trace location */ float ungpow; /* negative of power used for dynamic range compression */ float unscale; /* reciprocal of scaling factor to normalize range */ int ntr; /* number of traces */ short mark; /* mark selected traces */ short shortpad; /* alignment padding */ short unass[14]; /* unassigned--NOTE: last entry causes a break in the word alignment, if we REALLY want to maintain 240 bytes, the following entry should be an odd number of short/UINT2 OR do the insertion above the "mark" keyword entry */#endif float data[SU_NFLTS];} segy;typedef struct { /* bhed - binary header */ int jobid; /* job identification number */ int lino; /* line number (only one line per reel) */ int reno; /* reel number */ short ntrpr; /* number of data traces per record */ short nart; /* number of auxiliary traces per record */ unsigned short hdt; /* sample interval in micro secs for this reel */ unsigned short dto; /* same for original field recording */ unsigned short hns; /* number of samples per trace for this reel */ unsigned short nso; /* same for original field recording */ short format; /* data sample format code: 1 = floating point (4 bytes) 2 = fixed point (4 bytes) 3 = fixed point (2 bytes) 4 = fixed point w/gain code (4 bytes) */ short fold; /* CDP fold expected per CDP ensemble */ short tsort; /* trace sorting code: 1 = as recorded (no sorting) 2 = CDP ensemble 3 = single fold continuous profile 4 = horizontally stacked */ short vscode; /* vertical sum code: 1 = no sum 2 = two sum ... N = N sum (N = 32,767) */ short hsfs; /* sweep frequency at start */ short hsfe; /* sweep frequency at end */ short hslen; /* sweep length (ms) */ short hstyp; /* sweep type code: 1 = linear 2 = parabolic 3 = exponential 4 = other */ short schn; /* trace number of sweep channel */ short hstas; /* sweep trace taper length at start if tapered (the taper starts at zero time and is effective for this length) */ short hstae; /* sweep trace taper length at end (the ending taper starts at sweep length minus the taper length at end) */ short htatyp; /* sweep trace taper type code: 1 = linear 2 = cos-squared 3 = other */ short hcorr; /* correlated data traces code: 1 = no 2 = yes */ short bgrcv; /* binary gain recovered code: 1 = yes 2 = no */ short rcvm; /* amplitude recovery method code: 1 = none 2 = spherical divergence 3 = AGC 4 = other */ short mfeet; /* measurement system code: 1 = meters 2 = feet */ short polyt; /* impulse signal polarity code: 1 = increase in pressure or upward geophone case movement gives negative number on tape 2 = increase in pressure or upward geophone case movement gives positive number on tape */ short vpol; /* vibratory polarity code: code seismic signal lags pilot by 1 337.5 to 22.5 degrees 2 22.5 to 67.5 degrees 3 67.5 to 112.5 degrees 4 112.5 to 157.5 degrees 5 157.5 to 202.5 degrees 6 202.5 to 247.5 degrees 7 247.5 to 292.5 degrees 8 293.5 to 337.5 degrees */ short hunass[170]; /* unassigned */} bhed;/* DEFINES */#define gettr(x) fgettr(stdin, (x))#define vgettr(x) fvgettr(stdin, (x))#define puttr(x) fputtr(stdout, (x))#define vputtr(x) fvputtr(stdout, (x))#define gettra(x, y) fgettra(stdin, (x), (y))/* TOTHER represents "other" */#define TOTHER -1 /* TUNK represents time traces of an unknown type */#define TUNK 0/* TREAL represents real time traces */#define TREAL 1/* TDEAD represents dead time traces */#define TDEAD 2/* TDUMMY represents dummy time traces */#define TDUMMY 3/* TBREAK represents time break traces */#define TBREAK 4/* UPHOLE represents uphole traces */#define UPHOLE 5/* SWEEP represents sweep traces */#define SWEEP 6/* TIMING represents timing traces */#define TIMING 7/* WBREAK represents timing traces */#define WBREAK 8/* NFGUNSIG represents near field gun signature */#define NFGUNSIG 9 /* FFGUNSIG represents far field gun signature */#define FFGUNSIG 10/* SPSENSOR represents seismic pressure sensor */#define SPSENSOR 11/* TVERT represents multicomponent seismic sensor - vertical component */#define TVERT 12/* TXLIN represents multicomponent seismic sensor - cross-line component */#define TXLIN 13/* TINLIN represents multicomponent seismic sensor - in-line component */#define TINLIN 14/* ROTVERT represents rotated multicomponent seismic sensor - vertical component */#define ROTVERT 15/* TTRANS represents rotated multicomponent seismic sensor - transverse component */#define TTRANS 16/* TRADIAL represents rotated multicomponent seismic sensor - radial component */#define TRADIAL 17/* VRMASS represents vibrator reaction mass */#define VRMASS 18/* VBASS represents vibrator baseplate */#define VBASS 19/* VEGF represents vibrator estimated ground force */#define VEGF 20/* VREF represents vibrator reference */#define VREF 21/*** CWP trid assignments ***//* ACOR represents autocorrelation */#define ACOR 109/* FCMPLX represents fourier transformed - no packing xr[0],xi[0], ..., xr[N-1],xi[N-1] */#define FCMPLX 110/* FUNPACKNYQ represents fourier transformed - unpacked Nyquist xr[0],xi[0],...,xr[N/2],xi[N/2] */#define FUNPACKNYQ 111/* FTPACK represents fourier transformed - packed Nyquist even N: xr[0],xr[N/2],xr[1],xi[1], ..., xr[N/2 -1],xi[N/2 -1] (note the exceptional second entry) odd N: xr[0],xr[(N-1)/2],xr[1],xi[1], ..., xr[(N-1)/2 -1],xi[(N-1)/2 -1],xi[(N-1)/2] (note the exceptional second & last entries)*/#define FTPACK 112/* TCMPLX represents complex time traces */#define TCMPLX 113/* FAMPH represents freq domain data in amplitude/phase form */#define FAMPH 114/* TAMPH represents time domain data in amplitude/phase form */#define TAMPH 115/* REALPART represents the real part of a trace to Nyquist */#define REALPART 116/* IMAGPART represents the real part of a trace to Nyquist */#define IMAGPART 117/* AMPLITUDE represents the amplitude of a trace to Nyquist */#define AMPLITUDE 118/* PHASE represents the phase of a trace to Nyquist */#define PHASE 119/* KT represents wavenumber-time domain data */#define KT 121/* KOMEGA represents wavenumber-frequency domain data */#define KOMEGA 122/* ENVELOPE represents the envelope of the complex time trace */#define ENVELOPE 123/* INSTPHASE represents the phase of the complex time trace */#define INSTPHASE 124/* INSTFREQ represents the frequency of the complex time trace */#define INSTFREQ 125/* DEPTH represents traces in depth-range (z-x) */#define TRID_DEPTH 130/* 3C data... v,h1,h2=(11,12,13)+32 so a bitmask will convert *//* between conventions *//* CHARPACK represents byte packed seismic data from supack1 */#define CHARPACK 201/* SHORTPACK represents 2 byte packed seismic data from supack2 */#define SHORTPACK 202#define ISSEISMIC(id) (( (id)==TUNK || (id)==TREAL || (id)==TDEAD || (id)==TDUMMY || (id)==TBREAK || (id)==UPHOLE || (id)==SWEEP || (id)==TIMING || (id)==WBREAK || (id)==NFGUNSIG || (id)==FFGUNSIG || (id)==SPSENSOR || (id)==TVERT || (id)==TXLIN || (id)==TINLIN || (id)==ROTVERT || (id)==TTRANS || (id)==TRADIAL || (id)==ACOR ) ? cwp_true : cwp_false ) /* FUNCTION PROTOTYPES */#ifdef __cplusplus /* if C++, specify external linkage to C functions */extern "C" {#endifint fgettr(FILE *fp, segy *tp);int fvgettr(FILE *fp, segy *tp);void fputtr(FILE *fp, segy *tp);void fvputtr(FILE *fp, segy *tp);int fgettra(FILE *fp, segy *tp, int itr);/* hdrpkge */void gethval(const segy *tp, int index, Value *valp);void puthval(segy *tp, int index, Value *valp);void getbhval(const bhed *bhp, int index, Value *valp);void putbhval(bhed *bhp, int index, Value *valp);void gethdval(const segy *tp, char *key, Value *valp);void puthdval(segy *tp, char *key, Value *valp);char *hdtype(const char *key);char *getkey(const int index);int getindex(const char *key);void swaphval(segy *tp, int index);void swapbhval(bhed *bhp, int index);void printheader(const segy *tp);void tabplot(segy *tp, int itmin, int itmax);#ifdef __cplusplus /* if C++, end external linkage specification */}#endif#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -