UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
segy_file.h
1 /* segy_file.h */
2 /* $Id: segy_file.h,v 1.8 2004/01/28 13:21:02 vlad Exp $ */
3 #ifndef __segy_file_h
4 #define __segy_file_h
5 
6 /***********************************************************************
7  *
8  * SEG-Y digital tape standard
9  *
10  * (c) 1975 Society of Exploration Geophysicists
11  *
12  * Reference on:
13  * Society of Exploration Geophysicists, digital tape standards
14  * Geophysics, v.32, p.1073-1084; v.37, p.36-44; v.40, p.344-352
15  *
16  ***********************************************************************/
17 
18 /* Reel header = text header + binary header */
19 #define SEGY_ReelHeaderSize 3600
20 #define SEGY_EbcdicHeaderSize 3200
21 #define SEGY_BinaryHeaderSize 400
22 
23 /* Trace idenftification header */
24 #define SEGY_TraceHeaderSize 240
25 
26 
27 /***********************************************************************
28  *
29  * Формат заголовка файла SEGY (Reel header).
30  *
31  ***********************************************************************/
32 
33 /*
34  * EBCDIC HEADER (3200 bytes)
35  */
36 /* Имя поля Смещение в байтах от начала файла */
37 /* C 1 */
38 #define SEGY_EH_CLIENT 11
39 #define SEGY_EH_COMPANY 42
40 #define SEGY_EH_CREW_NO 72
41 /* C 2 */
42 #define SEGY_EH_LINE 89
43 #define SEGY_EH_AREA 105
44 #define SEGY_EH_MAP_ID 135
45 /* C 3 */
46 #define SEGY_EH_REEL_NO 171
47 #define SEGY_EH_DAY 200
48 #define SEGY_EH_YEAR 209
49 #define SEGY_EH_OBSERVER 222
50 /* C 4 */
51 #define SEGY_EH_INSTRUMENT 261
52 #define SEGY_EH_MODEL 276
53 #define SEGY_EH_SERIAL_NO 298
54 /* C 5 */
55 #define SEGY_EH_DATA_TRACES_REC 343
56 #define SEGY_EH_AUX_TRACES_REC 374
57 #define SEGY_EH_CDP_FOLD 391
58 /* C 6 */
59 #define SEGY_EH_SAMPLE_INTERVAL 420
60 #define SEGY_EH_SAMPLES_TRACE 442
61 #define SEGY_EH_BITS_IN 456
62 #define SEGY_EH_BYTES_SAMPLE 474
63 /* C 7 */
64 #define SEGY_EH_RECORDING_FMT 501
65 #define SEGY_EH_FMT_THIS_REEL 525
66 #define SEGY_EH_MEASUREMENT 551
67 /* C 8 */
68 /* one of many */
69 #define SEGY_EH_S_FLOATING_PT 577
70 #define SEGY_EH_S_FIXED_PT 593
71 #define SEGY_EH_S_FIXED_PT_GAIN 606
72 #define SEGY_EH_S_CORRELATED 624
73 /* C 9 */
74 /* one of many */
75 #define SEGY_EH_G_FIXED 656
76 #define SEGY_EH_G_BINARY 666
77 #define SEGY_EH_G_FLOATING_PT 677
78 #define SEGY_EH_G_OTHER 696
79 /* C10 */
80 #define SEGY_EH_ALIAS 739
81 #define SEGY_EH_NOTCH 752
82 #define SEGY_EH_BAND_LOW 766
83 #define SEGY_EH_BAND_HIGH 771
84 #define SEGY_EH_SLOPE_LEFT 786
85 #define SEGY_EH_SLOPE_RIGHT 790
86 /* C11 */
87 #define SEGY_EH_TYPE 818
88 #define SEGY_EH_NUMBER_POINT 841
89 #define SEGY_EH_POINT_INTERVAL 863
90 /* C12 */
91 #define SEGY_EH_PATTERN1 896
92 #define SEGY_EH_PATTERN1_LENGTH 930
93 #define SEGY_EH_PATTERN1_WIDTH 943
94 /* C13 */
95 #define SEGY_EH_SWEEP_START 977
96 #define SEGY_EH_SWEEP_END 989
97 #define SEGY_EH_SWEEP_LENGTH 1004
98 #define SEGY_EH_SWEEP_CHANNEL 1024
99 #define SEGY_EH_SWEEP_TYPE 1033
100 /* C14 */
101 #define SEGY_EH_TAPER_START 1064
102 #define SEGY_EH_TAPER_END 1085
103 #define SEGY_EH_TAPER_TYPE 1100
104 /* C15 */
105 #define SEGY_EH_SPREAD_OFFSET 1139
106 #define SEGY_EH_SPREAD_MAX_DIST 1159
107 #define SEGY_EH_SPREAD_GR_INTER 1181
108 /* C16 */
109 #define SEGY_EH_GEOPH_PER_GROUP 1225
110 #define SEGY_EH_GEOPH_SPACING 1237
111 #define SEGY_EH_GEOPH_FREQUENCY 1251
112 #define SEGY_EH_GEOPH_MFG 1259
113 #define SEGY_EH_GEOPH_MODEL 1274
114 /* C17 */
115 #define SEGY_EH_PATTERN2 1296
116 #define SEGY_EH_PATTERN2_LENGTH 1330
117 #define SEGY_EH_PATTERN2_WIDTH 1343
118 /* C18 */
119 /* one of many */
120 #define SEGY_EH_TS_RECORD 1382
121 #define SEGY_EH_TS_CDP 1393
122 #define SEGY_EH_TS_OTHER 1401
123 /* C19 */
124 /* one of many */
125 #define SEGY_EH_AR_NONE 1464
126 #define SEGY_EH_AR_SPHERICAL 1474
127 #define SEGY_EH_AR_AGC 1494
128 #define SEGY_EH_AR_OTHER 1501
129 /* C20 */
130 #define SEGY_EH_MAP_PROJECTION 1539
131 #define SEGY_EH_ZONE_ID 1568
132 #define SEGY_EH_COORD_UNITS 1591
133 /* C21 */
134 #define SEGY_EH_PROCESSING1 1615
135 /* C22 */
136 #define SEGY_EH_PROCESSING2 1695
137 /* C## */
138 #define SEGY_EH_CLINE(x) (4+80*((x)-1))
139 
140 /*
141  * BINARY HEADER (400 bytes)
142  */
143 /* Имя поля Смещение в байтах от начала файла */
144 #define SEGY_BH_JOB_ID 3200
145 #define SEGY_BH_LINE_NO 3204
146 #define SEGY_BH_REEL_NO 3208
147 #define SEGY_BH_DATA_TRACES_REC 3212
148 #define SEGY_BH_AUX_TRACES_REC 3214
149 #define SEGY_BH_SAMPLE_INTERVAL 3216
150 #define SEGY_BH_ORIG_SAMPLE_INT 3218
151 #define SEGY_BH_SAMPLES_TRACE 3220
152 #define SEGY_BH_ORIG_SAMPLES_TR 3222
153 #define SEGY_BH_DATA_SAMPLE_FMT 3224
154 # define SEGY_DSF_REAL_4 1
155 # define SEGY_DSF_INT_4 2
156 # define SEGY_DSF_INT_2 3
157 # define SEGY_DSF_FIXG_4 4
158 # define SEGY_DSF_IEEE_REAL_4 5
159 # define SEGY_DSF_INT_1 8
160 #define SEGY_BH_CDP_FOLD 3226
161 #define SEGY_BH_TRACES_SORTED 3228
162 # define SEGY_TS_AS_RECORDED 1
163 # define SEGY_TS_CDP_ENSEMBLE 2
164 # define SEGY_TS_SINGLE_FOLD 3
165 # define SEGY_TS_HORIZ_STACKED 4
166 #define SEGY_BH_VERTICAL_SUM 3230
167 #define SEGY_BH_SWEEP_S_FREQ 3232
168 #define SEGY_BH_SWEEP_E_FREQ 3234
169 #define SEGY_BH_SWEEP_LENGTH 3236
170 #define SEGY_BH_SWEEP_TYPE 3238
171 # define SEGY_ST_LINEAR 1
172 # define SEGY_ST_PARABOLIC 2
173 # define SEGY_ST_EXPONENTIAL 3
174 # define SEGY_ST_OTHER 4
175 #define SEGY_BH_SWEEP_TR_NUMBER 3240
176 #define SEGY_BH_SWEEP_TAP_S_LEN 3242
177 #define SEGY_BH_SWEEP_TAP_E_LEN 3244
178 #define SEGY_BH_SWEEP_TAP_TYPE 3246
179 # define SEGY_STT_LINEAR 1
180 # define SEGY_STT_COS 2
181 # define SEGY_STT_OTHER 3
182 #define SEGY_BH_COR_DATA_TRACES 3248
183 # define SEGY_CDT_NO 1
184 # define SEGY_CDT_YES 2
185 #define SEGY_BH_BIN_GAIN_RECOV 3250
186 # define SEGY_BGR_YES 1
187 # define SEGY_BGR_NO 2
188 #define SEGY_BH_AMPL_RECOV_METH 3252
189 # define SEGY_ARM_NONE 1
190 # define SEGY_ARM_SPHER_DIV 2
191 # define SEGY_ARM_AGC 3
192 # define SEGY_ARM_OTHER 4
193 #define SEGY_BH_MEASUREMENT 3254
194 # define SEGY_M_METERS 1
195 # define SEGY_M_FEET 2
196 #define SEGY_BH_IMP_POLARITY 3256
197 # define SEGY_IP_NEGATIVE 1
198 # define SEGY_IP_POSITIVE 2
199 #define SEGY_BH_VIBR_POLARITY 3258
200 # define SEGY_VP_337_22 1
201 # define SEGY_VP_22_67 2
202 # define SEGY_VP_67_112 3
203 # define SEGY_VP_112_157 4
204 # define SEGY_VP_157_202 5
205 # define SEGY_VP_202_247 6
206 # define SEGY_VP_247_292 7
207 # define SEGY_VP_292_337 8
208 
209 
210 /***********************************************************************
211  *
212  * Формат заголовка трассы SEGY (Trace identification header).
213  *
214  ***********************************************************************/
215 
216 /*
217  * BINARY TRACE HEADER (240 bytes)
218  */
219 /* Имя поля Смещение в байтах от начала трассы */
220 #define SEGY_TH_SEQ_NUM_LINE 0
221 #define SEGY_TH_SEQ_NUM_REEL 4
222 #define SEGY_TH_FIELD_REC_NUM 8
223 #define SEGY_TH_NUM_REC 12
224 #define SEGY_TH_SP_NUM 16
225 #define SEGY_TH_CDP_NUM 20
226 #define SEGY_TH_NUM_CDP_ENSEM 24
227 #define SEGY_TH_TRACE_ID 28
228 # define SEGY_TRID_OTHER (-1)
229 # define SEGY_TRID_UNKNOWN 0
230 # define SEGY_TRID_SEISMIC 1
231 # define SEGY_TRID_DEAD 2
232 # define SEGY_TRID_DUMMY 3
233 # define SEGY_TRID_TIME_BREAK 4
234 # define SEGY_TRID_UPHOLE 5
235 # define SEGY_TRID_SWEEP 6
236 # define SEGY_TRID_TIMING 7
237 # define SEGY_TRID_WATER_BREAK 8
238 # define SEGY_TRID_NF_GUN_SIGN 9
239 # define SEGY_TRID_FF_GUN_SIGN 10
240 # define SEGY_TRID_SEIS_PRES_SENS 11
241 # define SEGY_TRID_MC_VERT_COMP 12
242 # define SEGY_TRID_MC_XLINE_COMP 13
243 # define SEGY_TRID_MC_INLINE_COMP 14
244 # define SEGY_TRID_RMC_VERT_COMP 15
245 # define SEGY_TRID_RMC_TRANS_COMP 16
246 # define SEGY_TRID_RMC_RADIA_COMP 17
247 # define SEGY_TRID_VIB_REACT_MASS 18
248 # define SEGY_TRID_VIB_BASEPLATE 19
249 # define SEGY_TRID_VIB_EST_GFORCE 20
250 # define SEGY_TRID_VIB_REFERECE 21
251 # define SEGY_TRID_TIME_VEL_PAIR 22
252 #define SEGY_TH_VER_SUMMED 30
253 #define SEGY_TH_HOR_STACKED 32
254 #define SEGY_TH_DATA_USE 34
255 # define SEGY_DU_PRODUCTION 1
256 # define SEGY_DU_TEST 2
257 #define SEGY_TH_DISTANCE 36
258 #define SEGY_TH_RCV_GRP_ELEV 40
259 #define SEGY_TH_SOURCE_ELEV 44
260 #define SEGY_TH_SRC_DEPTH 48
261 #define SEGY_TH_RCV_DATUM_ELEV 52
262 #define SEGY_TH_SRC_DATUM_ELEV 56
263 #define SEGY_TH_WATER_DEPTH_SRC 60
264 #define SEGY_TH_WATER_DEPTH_RCV 64
265 #define SEGY_TH_ELEV_SCALER 68
266 /* Scaler for elevations (40-64): >0 - multiplier; <0 - divider */
267 #define SEGY_TH_COORD_SCALER 70
268 /* Scaler for coordinates (72-86): >0 - multiplier; <0 - divider */
269 #define SEGY_TH_SRC_X 72
270 #define SEGY_TH_SRC_Y 76
271 #define SEGY_TH_RCV_X 80
272 #define SEGY_TH_RCV_Y 84
273 #define SEGY_TH_COORD_UNIT 88
274 # define SEGY_CU_LENGTH 1
275 # define SEGY_CU_SECONDS_OF_ARC 2
276 #define SEGY_TH_WEATHERING_VEL 90
277 #define SEGY_TH_SUBWEATHER_VEL 92
278 #define SEGY_TH_SRC_UPHOLE_TIME 94
279 #define SEGY_TH_RCV_UPHOLE_TIME 96
280 #define SEGY_TH_SRC_STATIC_CORR 98
281 #define SEGY_TH_RCV_STATIC_CORR 100
282 #define SEGY_TH_TOTAL_STATIC 102
283 #define SEGY_TH_LAG_TIME_A 104
284 #define SEGY_TH_LAG_TIME_B 106
285 #define SEGY_TH_DELAY_REC_TIME 108
286 #define SEGY_TH_MUTE_TIME_START 110
287 #define SEGY_TH_MUTE_TIME_END 112
288 #define SEGY_TH_SAMPLES_TRACE 114
289 #define SEGY_TH_SAMPLE_INTERVAL 116
290 #define SEGY_TH_FIELD_GAIN_TYPE 118
291 # define SEGY_FGT_FIXED 1
292 # define SEGY_FGT_BINARY 2
293 # define SEGY_FGT_FLOATING_PT 3
294 #define SEGY_TH_GAIN_CONSTANT 120
295 #define SEGY_TH_INITIAL_GAIN 122
296 #define SEGY_TH_CORRELATED 124
297 # define SEGY_C_NO 1
298 # define SEGY_C_YES 2
299 #define SEGY_TH_SWEEP_S_FREQ 126
300 #define SEGY_TH_SWEEP_E_FREQ 128
301 #define SEGY_TH_SWEEP_LENGTH 130
302 #define SEGY_TH_SWEEP_TYPE 132
303 /* the same values as in SEGY_BH_SWEEP_TYPE */
304 #define SEGY_TH_SWEEP_TAP_S_LEN 134
305 #define SEGY_TH_SWEEP_TAP_E_LEN 136
306 #define SEGY_TH_SWEEP_TAP_TYPE 138
307 /* the same values as in SEGY_BH_SWEEP_TAP_TYPE */
308 #define SEGY_TH_ALIAS_FILT_FREQ 140
309 #define SEGY_TH_ALIAS_FILT_SLOP 142
310 #define SEGY_TH_NOTCH_FILT_FREQ 144
311 #define SEGY_TH_NOTCH_FILT_SLOP 146
312 #define SEGY_TH_LOW_CUT_FREQ 148
313 #define SEGY_TH_HIGH_CUT_FREQ 150
314 #define SEGY_TH_LOW_CUT_SLOPE 152
315 #define SEGY_TH_HIGH_CUT_SLOPE 154
316 #define SEGY_TH_YEAR_DATA_REC 156
317 #define SEGY_TH_DAY_OF_YEAR 158
318 #define SEGY_TH_24_HOUR_OF_DAY 160
319 #define SEGY_TH_MINUTE_OF_HOUR 162
320 #define SEGY_TH_SECOND_OF_MINUT 164
321 #define SEGY_TH_TIME_BASIS_CODE 166
322 # define SEGY_TBC_LOCAL 1
323 # define SEGY_TBC_GMT 2
324 # define SEGY_TBC_OTHER 3
325 #define SEGY_TH_WEIGHT_FACTOR 168
326 #define SEGY_TH_ROLL_GP_GRP_NO 170
327 #define SEGY_TH_TRACE_GP_GRP_NO 172
328 #define SEGY_TH_LAST_GP_GRP_NO 174
329 #define SEGY_TH_GAP_SIZE 176
330 #define SEGY_TH_OVERTRAVEL_TAP 178
331 # define SEGY_OT_DOWN_OR_BEHIND 1
332 # define SEGY_OT_UP_OR_AHEAD 2
333 
334 /* VSP extensions: */
335 #define SEGY_TH_VSP_HCAB 180
336 #define SEGY_TH_VSP_XSP 184
337 #define SEGY_TH_VSP_YSP 188
338 #define SEGY_TH_VSP_ZSP 192
339 #define SEGY_TH_VSP_XOP 196
340 #define SEGY_TH_VSP_YOP 200
341 #define SEGY_TH_VSP_ZOP 204
342 #define SEGY_TH_VSP_XDP 208
343 #define SEGY_TH_VSP_YDP 212
344 #define SEGY_TH_VSP_ZDP 216
345 #define SEGY_TH_VSP_COMP 220
346 #define SEGY_TH_VSP_TYPE 221
347 
348 
349 /*
350  * Следующая условно-обрабатываемая часть действительна только если
351  * данный файл подключен НЕ из программы трансформации (смотри ft).
352  */
353 #ifndef _filetrans_
354 
355 #include <mix/Types.h>
356 
357 /***********************************************************************
358  * Описание структуры файла трасс формата SEG-Y
359  ***********************************************************************/
360 
361 /* Бинарный заголовок файла формата SEG-Y
362  Содержит общую информацию о трассах / typedef struct { /* Имя в структуре Символьное смещение Смещение в байтах */ Int4 job_id; /* SEGY_BH_JOB_ID 3200 */ Int4 line_no; /**SEGY_BH_LINE_NO 3204 */ Int4 reel_no; /**SEGY_BH_REEL_NO 3208 */ Int2 data_traces_rec; /**SEGY_BH_DATA_TRACES_REC 3212 */ Int2 aux_traces_rec; /**SEGY_BH_AUX_TRACES_REC 3214 */ Int2 sample_interval; /**SEGY_BH_SAMPLE_INTERVAL 3216 */ Int2 orig_sample_int; /* SEGY_BH_ORIG_SAMPLE_INT 3218 */ Int2 samples_trace; /**SEGY_BH_SAMPLES_TRACE 3220 */ Int2 orig_samples_tr; /* SEGY_BH_ORIG_SAMPLES_TR 3222 */ Int2 data_sample_fmt; /**SEGY_BH_DATA_SAMPLE_FMT 3224 */ /* SEGY_DSF_REAL_4 1 SEGY_DSF_INT_4 2 SEGY_DSF_INT_2 3 SEGY_DSF_FIXG_4 4 SEGY_DSF_IEEE_REAL_4 5 SEGY_DSF_INT_1 8 */ Int2 cdp_fold; /**SEGY_BH_CDP_FOLD 3226 */ Int2 traces_sorted; /* SEGY_BH_TRACES_SORTED 3228 */ /* SEGY_TS_AS_RECORDED 1 SEGY_TS_CDP_ENSEMBLE 2 SEGY_TS_SINGLE_FOLD 3 SEGY_TS_HORIZ_STACKED 4 */ Int2 vertical_sum; /* SEGY_BH_VERTICAL_SUM 3230 */ Int2 sweep_s_freq; /* SEGY_BH_SWEEP_S_FREQ 3232 */ Int2 sweep_e_freq; /* SEGY_BH_SWEEP_E_FREQ 3234 */ Int2 sweep_length; /* SEGY_BH_SWEEP_LENGTH 3236 */ Int2 sweep_type; /* SEGY_BH_SWEEP_TYPE 3238 */ /* SEGY_ST_LINEAR 1 SEGY_ST_PARABOLIC 2 SEGY_ST_EXPONENTIAL 3 SEGY_ST_OTHER 4 */ Int2 sweep_tr_number; /* SEGY_BH_SWEEP_TR_NUMBER 3240 */ Int2 sweep_tap_s_len; /* SEGY_BH_SWEEP_TAP_S_LEN 3242 */ Int2 sweep_tap_e_len; /* SEGY_BH_SWEEP_TAP_E_LEN 3244 */ Int2 sweep_tap_type; /* SEGY_BH_SWEEP_TAP_TYPE 3246 */ /* SEGY_STT_LINEAR 1 SEGY_STT_COS 2 SEGY_STT_OTHER 3 */ Int2 cor_data_traces; /* SEGY_BH_COR_DATA_TRACES 3248 */ /* SEGY_CDT_NO 1 SEGY_CDT_YES 2 */ Int2 bin_gain_recov; /* SEGY_BH_BIN_GAIN_RECOV 3250 */ /* SEGY_BGR_YES 1 SEGY_BGR_NO 2 */ Int2 ampl_recov_meth; /* SEGY_BH_AMPL_RECOV_METH 3252 */ /* SEGY_ARM_NONE 1 SEGY_ARM_SPHER_DIV 2 SEGY_ARM_AGC 3 SEGY_ARM_OTHER 4 */ Int2 measurement; /**SEGY_BH_MEASUREMENT 3254 */ /* SEGY_M_METERS 1 SEGY_M_FEET 2 */ Int2 imp_polarity; /* SEGY_BH_IMP_POLARITY 3256 */ /* SEGY_IP_NEGATIVE 1 SEGY_IP_POSITIVE 2 */ Int2 vibr_polarity; /* SEGY_BH_VIBR_POLARITY 3258 */ /* SEGY_VP_337_22 1 SEGY_VP_22_67 2 SEGY_VP_67_112 3 SEGY_VP_112_157 4 SEGY_VP_157_202 5 SEGY_VP_202_247 6 SEGY_VP_247_292 7 SEGY_VP_292_337 8 */ #ifdef NO_VSP_EXTENSION Int1 reserved[340]; #else Int1 reserved[340]; #endif /* NO_VSP_EXTENSION */ } SEGY_BinaryHeader; /* Структура, удобная для преобразования бинарного заголовка файла формата SEG-Y */ typedef struct { Int4 data1_int_4[3]; Int2 data2_int_2[24]; Int1 data3_undef[340]; } SEGY_BinaryHeader_blocks; /* Бинарный заголовок трассы формата SEG-Y (с расширениями для ВСП) Содержит информацию о конкретной трассе */ typedef struct { /* Имя в структуре Символьное смещение Смещение в байтах */ Int4 seq_num_line; /**SEGY_TH_SEQ_NUM_LINE 0 */ Int4 seq_num_reel; /* SEGY_TH_SEQ_NUM_REEL 4 */ Int4 field_rec_num; /**SEGY_TH_FIELD_REC_NUM 8 */ Int4 num_rec; /**SEGY_TH_NUM_REC 12 */ Int4 sp_num; /* SEGY_TH_SP_NUM 16 */ Int4 cdp_num; /* SEGY_TH_CDP_NUM 20 */ Int4 num_cdp_ensem; /* SEGY_TH_NUM_CDP_ENSEM 24 */ Int2 trace_id; /**SEGY_TH_TRACE_ID 28 */ /* SEGY_TRID_SEISMIC 1 SEGY_TRID_DEAD 2 SEGY_TRID_DUMMY 3 SEGY_TRID_TIME_BREAK 4 SEGY_TRID_UPHOLE 5 SEGY_TRID_SWEEP 6 SEGY_TRID_TIMING 7 SEGY_TRID_WATER_BREAK 8 */ Int2 ver_summed; /* SEGY_TH_VER_SUMMED 30 */ Int2 hor_stacked; /* SEGY_TH_HOR_STACKED 32 */ Int2 data_use; /* SEGY_TH_DATA_USE 34 */ /* SEGY_DU_PRODUCTION 1 SEGY_DU_TEST 2 */ Int4 distance; /* SEGY_TH_DISTANCE 36 */ Int4 rcv_grp_elev; /* SEGY_TH_RCV_GRP_ELEV 40 */ Int4 source_elev; /* SEGY_TH_SOURCE_ELEV 44 */ Int4 src_depth; /* SEGY_TH_SRC_DEPTH 48 */ Int4 rcv_datum_elev; /* SEGY_TH_RCV_DATUM_ELEV 52 */ Int4 src_datum_elev; /* SEGY_TH_SRC_DATUM_ELEV 56 */ Int4 water_depth_src; /* SEGY_TH_WATER_DEPTH_SRC 60 */ Int4 water_depth_rcv; /* SEGY_TH_WATER_DEPTH_RCV 64 */ /* Scaler for elevations (40-64): >0 - multiplier; <0 - divider */ Int2 elev_scaler; /* SEGY_TH_ELEV_SCALER 68 */ /* Scaler for coordinates (72-86): >0 - multiplier; <0 - divider */ Int2 coord_scaler; /* SEGY_TH_COORD_SCALER 70 */ Int4 src_x; /* SEGY_TH_SRC_X 72 */ Int4 src_y; /* SEGY_TH_SRC_Y 76 */ Int4 rcv_x; /* SEGY_TH_RCV_X 80 */ Int4 rcv_y; /* SEGY_TH_RCV_Y 84 */ Int2 coord_unit; /* SEGY_TH_COORD_UNIT 88 */ /* SEGY_CU_LENGTH 1 SEGY_CU_SECONDS_OF_ARC 2 */ Int2 weathering_vel; /* SEGY_TH_WEATHERING_VEL 90 */ Int2 subweather_vel; /* SEGY_TH_SUBWEATHER_VEL 92 */ Int2 src_uphole_time; /* SEGY_TH_SRC_UPHOLE_TIME 94 */ Int2 rcv_uphole_time; /* SEGY_TH_RCV_UPHOLE_TIME 96 */ Int2 src_static_corr; /* SEGY_TH_SRC_STATIC_CORR 98 */ Int2 rcv_static_corr; /* SEGY_TH_RCV_STATIC_CORR 100 */ Int2 total_static; /* SEGY_TH_TOTAL_STATIC 102 */ Int2 lag_time_a; /* SEGY_TH_LAG_TIME_A 104 */ Int2 lag_time_b; /* SEGY_TH_LAG_TIME_B 106 */ Int2 delay_rec_time; /* SEGY_TH_DELAY_REC_TIME 108 */ Int2 mute_time_start; /* SEGY_TH_MUTE_TIME_START 110 */ Int2 mute_time_end; /* SEGY_TH_MUTE_TIME_END 112 */ Int2 samples_trace; /**SEGY_TH_SAMPLES_TRACE 114 */ Int2 sample_interval; /**SEGY_TH_SAMPLE_INTERVAL 116 */ Int2 field_gain_type; /* SEGY_TH_FIELD_GAIN_TYPE 118 */ /* SEGY_FGT_FIXED 1 SEGY_FGT_BINARY 2 SEGY_FGT_FLOATING_PT 3 */ Int2 gain_constant; /* SEGY_TH_GAIN_CONSTANT 120 */ Int2 initial_gain; /* SEGY_TH_INITIAL_GAIN 122 */ Int2 correlated; /* SEGY_TH_CORRELATED 124 */ /* SEGY_C_NO 1 SEGY_C_YES 2 */ Int2 sweep_s_freq; /* SEGY_TH_SWEEP_S_FREQ 126 */ Int2 sweep_e_freq; /* SEGY_TH_SWEEP_E_FREQ 128 */ Int2 sweep_length; /* SEGY_TH_SWEEP_LENGTH 130 */ Int2 sweep_type; /* SEGY_TH_SWEEP_TYPE 132 */ /* SEGY_ST_LINEAR 1 SEGY_ST_PARABOLIC 2 SEGY_ST_EXPONENTIAL 3 SEGY_ST_OTHER 4 */ Int2 sweep_tap_s_len; /* SEGY_TH_SWEEP_TAP_S_LEN 134 */ Int2 sweep_tap_e_len; /* SEGY_TH_SWEEP_TAP_E_LEN 136 */ Int2 sweep_tap_type; /* SEGY_TH_SWEEP_TAP_TYPE 138 */ /* SEGY_STT_LINEAR 1 SEGY_STT_COS 2 SEGY_STT_OTHER 3 */ Int2 alias_filt_freq; /* SEGY_TH_ALIAS_FILT_FREQ 140 */ Int2 alias_filt_slop; /* SEGY_TH_ALIAS_FILT_SLOP 142 */ Int2 notch_filt_freq; /* SEGY_TH_NOTCH_FILT_FREQ 144 */ Int2 notch_filt_slop; /* SEGY_TH_NOTCH_FILT_SLOP 146 */ Int2 low_cut_freq; /* SEGY_TH_LOW_CUT_FREQ 148 */ Int2 high_cut_freq; /* SEGY_TH_HIGH_CUT_FREQ 150 */ Int2 low_cut_slope; /* SEGY_TH_LOW_CUT_SLOPE 152 */ Int2 high_cut_slope; /* SEGY_TH_HIGH_CUT_SLOPE 154 */ Int2 year_data_rec; /* SEGY_TH_YEAR_DATA_REC 156 */ Int2 day_of_year; /* SEGY_TH_DAY_OF_YEAR 158 */ Int2 hour24_of_day; /* SEGY_TH_24_HOUR_OF_DAY 160 */ Int2 minute_of_hour; /* SEGY_TH_MINUTE_OF_HOUR 162 */ Int2 second_of_minut; /* SEGY_TH_SECOND_OF_MINUT 164 */ Int2 time_basis_code; /* SEGY_TH_TIME_BASIS_CODE 166 */ /* SEGY_TBC_LOCAL 1 SEGY_TBC_GMT 2 SEGY_TBC_OTHER 3 */ Int2 weight_factor; /* SEGY_TH_WEIGHT_FACTOR 168 */ Int2 roll_gp_grp_no; /* SEGY_TH_ROLL_GP_GRP_NO 170 */ Int2 trace_gp_grp_no; /* SEGY_TH_TRACE_GP_GRP_NO 172 */ Int2 last_gp_grp_no; /* SEGY_TH_LAST_GP_GRP_NO 174 */ Int2 gap_size; /* SEGY_TH_GAP_SIZE 176 */ Int2 overtravel_tap; /* SEGY_TH_OVERTRAVEL_TAP 178 */ /* SEGY_OT_DOWN_OR_BEHIND 1 SEGY_OT_UP_OR_AHEAD 2 */ #ifdef NO_VSP_EXTENSION Int1 reserved[60]; #else Int4 vsp_hcab; /* SEGY_TH_VSP_HCAB 180 */ Int4 vsp_xsp; /* SEGY_TH_VSP_XSP 184 */ Int4 vsp_ysp; /* SEGY_TH_VSP_YSP 188 */ Int4 vsp_zsp; /* SEGY_TH_VSP_ZSP 192 */ Int4 vsp_xop; /* SEGY_TH_VSP_XOP 196 */ Int4 vsp_yop; /* SEGY_TH_VSP_YOP 200 */ Int4 vsp_zop; /* SEGY_TH_VSP_ZOP 204 */ Int4 vsp_xdp; /* SEGY_TH_VSP_XDP 208 */ Int4 vsp_ydp; /* SEGY_TH_VSP_YDP 212 */ Int4 vsp_zdp; /* SEGY_TH_VSP_ZDP 216 */ Char vsp_comp; /* SEGY_TH_VSP_COMP 220 */ Char vsp_type; /* SEGY_TH_VSP_TYPE 221 */ Int1 reserved[18]; #endif /* NO_VSP_EXTENSION */ } SEGY_TraceHeader; /* Структура, удобная для преобразования заголовка трассы формата SEG-Y */ typedef struct { Int4 data1_int_4[7]; Int2 data2_int_2[4]; Int4 data3_int_4[8]; Int2 data4_int_2[2]; Int4 data5_int_4[4]; Int2 data6_int_2[46]; #ifdef NO_VSP_EXTENSION Int1 data7_undef[60]; #else Int4 data7_int_4[10]; Int1 data8_int_1[2]; Int1 data9_undef[18]; #endif /* NO_VSP_EXTENSION */ } SEGY_TraceHeader_blocks; #endif /* _filetrans_ */ #endif /* segy_file.h */ */
363 typedef struct
364 {
365  /* Имя в структуре Символьное смещение Смещение в байтах */
366  Int4 job_id; /* SEGY_BH_JOB_ID 3200 */
367  Int4 line_no;
368  Int4 reel_no;
372  Int2 orig_sample_int; /* SEGY_BH_ORIG_SAMPLE_INT 3218 */
373  Int2 samples_trace;
374  Int2 orig_samples_tr; /* SEGY_BH_ORIG_SAMPLES_TR 3222 */
375  Int2 data_sample_fmt;
376  /* SEGY_DSF_REAL_4 1
377  SEGY_DSF_INT_4 2
378  SEGY_DSF_INT_2 3
379  SEGY_DSF_FIXG_4 4
380  SEGY_DSF_IEEE_REAL_4 5
381  SEGY_DSF_INT_1 8 */
382  Int2 cdp_fold;
383  Int2 traces_sorted; /* SEGY_BH_TRACES_SORTED 3228 */
384  /* SEGY_TS_AS_RECORDED 1
385  SEGY_TS_CDP_ENSEMBLE 2
386  SEGY_TS_SINGLE_FOLD 3
387  SEGY_TS_HORIZ_STACKED 4 */
388  Int2 vertical_sum; /* SEGY_BH_VERTICAL_SUM 3230 */
389  Int2 sweep_s_freq; /* SEGY_BH_SWEEP_S_FREQ 3232 */
390  Int2 sweep_e_freq; /* SEGY_BH_SWEEP_E_FREQ 3234 */
391  Int2 sweep_length; /* SEGY_BH_SWEEP_LENGTH 3236 */
392  Int2 sweep_type; /* SEGY_BH_SWEEP_TYPE 3238 */
393  /* SEGY_ST_LINEAR 1
394  SEGY_ST_PARABOLIC 2
395  SEGY_ST_EXPONENTIAL 3
396  SEGY_ST_OTHER 4 */
397  Int2 sweep_tr_number; /* SEGY_BH_SWEEP_TR_NUMBER 3240 */
398  Int2 sweep_tap_s_len; /* SEGY_BH_SWEEP_TAP_S_LEN 3242 */
399  Int2 sweep_tap_e_len; /* SEGY_BH_SWEEP_TAP_E_LEN 3244 */
400  Int2 sweep_tap_type; /* SEGY_BH_SWEEP_TAP_TYPE 3246 */
401  /* SEGY_STT_LINEAR 1
402  SEGY_STT_COS 2
403  SEGY_STT_OTHER 3 */
404  Int2 cor_data_traces; /* SEGY_BH_COR_DATA_TRACES 3248 */
405  /* SEGY_CDT_NO 1
406  SEGY_CDT_YES 2 */
407  Int2 bin_gain_recov; /* SEGY_BH_BIN_GAIN_RECOV 3250 */
408  /* SEGY_BGR_YES 1
409  SEGY_BGR_NO 2 */
410  Int2 ampl_recov_meth; /* SEGY_BH_AMPL_RECOV_METH 3252 */
411  /* SEGY_ARM_NONE 1
412  SEGY_ARM_SPHER_DIV 2
413  SEGY_ARM_AGC 3
414  SEGY_ARM_OTHER 4 */
415  Int2 measurement;
416  /* SEGY_M_METERS 1
417  SEGY_M_FEET 2 */
418  Int2 imp_polarity; /* SEGY_BH_IMP_POLARITY 3256 */
419  /* SEGY_IP_NEGATIVE 1
420  SEGY_IP_POSITIVE 2 */
421  Int2 vibr_polarity; /* SEGY_BH_VIBR_POLARITY 3258 */
422  /* SEGY_VP_337_22 1
423  SEGY_VP_22_67 2
424  SEGY_VP_67_112 3
425  SEGY_VP_112_157 4
426  SEGY_VP_157_202 5
427  SEGY_VP_202_247 6
428  SEGY_VP_247_292 7
429  SEGY_VP_292_337 8 */
430 
431 #ifdef NO_VSP_EXTENSION
432  Int1 reserved[340];
433 #else
434  Int1 reserved[340];
435 #endif /* NO_VSP_EXTENSION */
436 
438 
439 /* Структура, удобная для преобразования
440  бинарного заголовка файла формата SEG-Y */
441 typedef struct
442 {
443  Int4 data1_int_4[3];
444  Int2 data2_int_2[24];
445  Int1 data3_undef[340];
446 
448 
449 
450 /* Бинарный заголовок трассы формата SEG-Y (с расширениями для ВСП)
451  Содержит информацию о конкретной трассе */
452 typedef struct
453 {
454  /* Имя в структуре Символьное смещение Смещение в байтах */
455  Int4 seq_num_line;
456  Int4 seq_num_reel; /* SEGY_TH_SEQ_NUM_REEL 4 */
457  Int4 field_rec_num;
458  Int4 num_rec;
459  Int4 sp_num; /* SEGY_TH_SP_NUM 16 */
460  Int4 cdp_num; /* SEGY_TH_CDP_NUM 20 */
461  Int4 num_cdp_ensem; /* SEGY_TH_NUM_CDP_ENSEM 24 */
462  Int2 trace_id;
463  /* SEGY_TRID_SEISMIC 1
464  SEGY_TRID_DEAD 2
465  SEGY_TRID_DUMMY 3
466  SEGY_TRID_TIME_BREAK 4
467  SEGY_TRID_UPHOLE 5
468  SEGY_TRID_SWEEP 6
469  SEGY_TRID_TIMING 7
470  SEGY_TRID_WATER_BREAK 8 */
471  Int2 ver_summed; /* SEGY_TH_VER_SUMMED 30 */
472  Int2 hor_stacked; /* SEGY_TH_HOR_STACKED 32 */
473  Int2 data_use; /* SEGY_TH_DATA_USE 34 */
474  /* SEGY_DU_PRODUCTION 1
475  SEGY_DU_TEST 2 */
476  Int4 distance; /* SEGY_TH_DISTANCE 36 */
477  Int4 rcv_grp_elev; /* SEGY_TH_RCV_GRP_ELEV 40 */
478  Int4 source_elev; /* SEGY_TH_SOURCE_ELEV 44 */
479  Int4 src_depth; /* SEGY_TH_SRC_DEPTH 48 */
480  Int4 rcv_datum_elev; /* SEGY_TH_RCV_DATUM_ELEV 52 */
481  Int4 src_datum_elev; /* SEGY_TH_SRC_DATUM_ELEV 56 */
482  Int4 water_depth_src; /* SEGY_TH_WATER_DEPTH_SRC 60 */
483  Int4 water_depth_rcv; /* SEGY_TH_WATER_DEPTH_RCV 64 */
484  /* Scaler for elevations (40-64): >0 - multiplier; <0 - divider */
485  Int2 elev_scaler; /* SEGY_TH_ELEV_SCALER 68 */
486  /* Scaler for coordinates (72-86): >0 - multiplier; <0 - divider */
487  Int2 coord_scaler; /* SEGY_TH_COORD_SCALER 70 */
488  Int4 src_x; /* SEGY_TH_SRC_X 72 */
489  Int4 src_y; /* SEGY_TH_SRC_Y 76 */
490  Int4 rcv_x; /* SEGY_TH_RCV_X 80 */
491  Int4 rcv_y; /* SEGY_TH_RCV_Y 84 */
492  Int2 coord_unit; /* SEGY_TH_COORD_UNIT 88 */
493  /* SEGY_CU_LENGTH 1
494  SEGY_CU_SECONDS_OF_ARC 2 */
495  Int2 weathering_vel; /* SEGY_TH_WEATHERING_VEL 90 */
496  Int2 subweather_vel; /* SEGY_TH_SUBWEATHER_VEL 92 */
497  Int2 src_uphole_time; /* SEGY_TH_SRC_UPHOLE_TIME 94 */
498  Int2 rcv_uphole_time; /* SEGY_TH_RCV_UPHOLE_TIME 96 */
499  Int2 src_static_corr; /* SEGY_TH_SRC_STATIC_CORR 98 */
500  Int2 rcv_static_corr; /* SEGY_TH_RCV_STATIC_CORR 100 */
501  Int2 total_static; /* SEGY_TH_TOTAL_STATIC 102 */
502  Int2 lag_time_a; /* SEGY_TH_LAG_TIME_A 104 */
503  Int2 lag_time_b; /* SEGY_TH_LAG_TIME_B 106 */
504  Int2 delay_rec_time; /* SEGY_TH_DELAY_REC_TIME 108 */
505  Int2 mute_time_start; /* SEGY_TH_MUTE_TIME_START 110 */
506  Int2 mute_time_end; /* SEGY_TH_MUTE_TIME_END 112 */
507  Int2 samples_trace;
509  Int2 field_gain_type; /* SEGY_TH_FIELD_GAIN_TYPE 118 */
510  /* SEGY_FGT_FIXED 1
511  SEGY_FGT_BINARY 2
512  SEGY_FGT_FLOATING_PT 3 */
513  Int2 gain_constant; /* SEGY_TH_GAIN_CONSTANT 120 */
514  Int2 initial_gain; /* SEGY_TH_INITIAL_GAIN 122 */
515  Int2 correlated; /* SEGY_TH_CORRELATED 124 */
516  /* SEGY_C_NO 1
517  SEGY_C_YES 2 */
518  Int2 sweep_s_freq; /* SEGY_TH_SWEEP_S_FREQ 126 */
519  Int2 sweep_e_freq; /* SEGY_TH_SWEEP_E_FREQ 128 */
520  Int2 sweep_length; /* SEGY_TH_SWEEP_LENGTH 130 */
521  Int2 sweep_type; /* SEGY_TH_SWEEP_TYPE 132 */
522  /* SEGY_ST_LINEAR 1
523  SEGY_ST_PARABOLIC 2
524  SEGY_ST_EXPONENTIAL 3
525  SEGY_ST_OTHER 4 */
526  Int2 sweep_tap_s_len; /* SEGY_TH_SWEEP_TAP_S_LEN 134 */
527  Int2 sweep_tap_e_len; /* SEGY_TH_SWEEP_TAP_E_LEN 136 */
528  Int2 sweep_tap_type; /* SEGY_TH_SWEEP_TAP_TYPE 138 */
529  /* SEGY_STT_LINEAR 1
530  SEGY_STT_COS 2
531  SEGY_STT_OTHER 3 */
532  Int2 alias_filt_freq; /* SEGY_TH_ALIAS_FILT_FREQ 140 */
533  Int2 alias_filt_slop; /* SEGY_TH_ALIAS_FILT_SLOP 142 */
534  Int2 notch_filt_freq; /* SEGY_TH_NOTCH_FILT_FREQ 144 */
535  Int2 notch_filt_slop; /* SEGY_TH_NOTCH_FILT_SLOP 146 */
536  Int2 low_cut_freq; /* SEGY_TH_LOW_CUT_FREQ 148 */
537  Int2 high_cut_freq; /* SEGY_TH_HIGH_CUT_FREQ 150 */
538  Int2 low_cut_slope; /* SEGY_TH_LOW_CUT_SLOPE 152 */
539  Int2 high_cut_slope; /* SEGY_TH_HIGH_CUT_SLOPE 154 */
540  Int2 year_data_rec; /* SEGY_TH_YEAR_DATA_REC 156 */
541  Int2 day_of_year; /* SEGY_TH_DAY_OF_YEAR 158 */
542  Int2 hour24_of_day; /* SEGY_TH_24_HOUR_OF_DAY 160 */
543  Int2 minute_of_hour; /* SEGY_TH_MINUTE_OF_HOUR 162 */
544  Int2 second_of_minut; /* SEGY_TH_SECOND_OF_MINUT 164 */
545  Int2 time_basis_code; /* SEGY_TH_TIME_BASIS_CODE 166 */
546  /* SEGY_TBC_LOCAL 1
547  SEGY_TBC_GMT 2
548  SEGY_TBC_OTHER 3 */
549  Int2 weight_factor; /* SEGY_TH_WEIGHT_FACTOR 168 */
550  Int2 roll_gp_grp_no; /* SEGY_TH_ROLL_GP_GRP_NO 170 */
551  Int2 trace_gp_grp_no; /* SEGY_TH_TRACE_GP_GRP_NO 172 */
552  Int2 last_gp_grp_no; /* SEGY_TH_LAST_GP_GRP_NO 174 */
553  Int2 gap_size; /* SEGY_TH_GAP_SIZE 176 */
554  Int2 overtravel_tap; /* SEGY_TH_OVERTRAVEL_TAP 178 */
555  /* SEGY_OT_DOWN_OR_BEHIND 1
556  SEGY_OT_UP_OR_AHEAD 2 */
557 
558 #ifdef NO_VSP_EXTENSION
559  Int1 reserved[60];
560 #else
561  Int4 vsp_hcab; /* SEGY_TH_VSP_HCAB 180 */
562  Int4 vsp_xsp; /* SEGY_TH_VSP_XSP 184 */
563  Int4 vsp_ysp; /* SEGY_TH_VSP_YSP 188 */
564  Int4 vsp_zsp; /* SEGY_TH_VSP_ZSP 192 */
565  Int4 vsp_xop; /* SEGY_TH_VSP_XOP 196 */
566  Int4 vsp_yop; /* SEGY_TH_VSP_YOP 200 */
567  Int4 vsp_zop; /* SEGY_TH_VSP_ZOP 204 */
568  Int4 vsp_xdp; /* SEGY_TH_VSP_XDP 208 */
569  Int4 vsp_ydp; /* SEGY_TH_VSP_YDP 212 */
570  Int4 vsp_zdp; /* SEGY_TH_VSP_ZDP 216 */
571  Char vsp_comp; /* SEGY_TH_VSP_COMP 220 */
572  Char vsp_type; /* SEGY_TH_VSP_TYPE 221 */
573 
574  Int1 reserved[18];
575 #endif /* NO_VSP_EXTENSION */
576 
578 
579 /* Структура, удобная для преобразования
580  заголовка трассы формата SEG-Y */
581 typedef struct
582 {
583  Int4 data1_int_4[7];
584  Int2 data2_int_2[4];
585  Int4 data3_int_4[8];
586  Int2 data4_int_2[2];
587  Int4 data5_int_4[4];
588  Int2 data6_int_2[46];
589 #ifdef NO_VSP_EXTENSION
590  Int1 data7_undef[60];
591 #else
592  Int4 data7_int_4[10];
593  Int1 data8_int_1[2];
594  Int1 data9_undef[18];
595 #endif /* NO_VSP_EXTENSION */
596 
598 
599 
600 #endif /* _filetrans_ */
601 
602 #endif /* segy_file.h */
Definition: segy_file.h:581
Definition: segy_file.h:441
Int4 reel_no
Definition: segy_file.h:368
Int2 aux_traces_rec
Definition: segy_file.h:370
Int2 imp_polarity
Definition: segy_file.h:418
Int2 sample_interval
Definition: segy_file.h:371
Int2 ver_summed
Definition: segy_file.h:471
Int2 sample_interval
Definition: segy_file.h:508
Int2 field_gain_type
Definition: segy_file.h:509
Int2 data_traces_rec
Definition: segy_file.h:369
Int2 orig_sample_int
Definition: segy_file.h:372
Int2 orig_samples_tr
Definition: segy_file.h:374
Int4 num_rec
Definition: segy_file.h:458
Int2 traces_sorted
Definition: segy_file.h:383
Int4 seq_num_reel
Definition: segy_file.h:456
Definition: segy_file.h:452
Int2 cdp_fold
Definition: segy_file.h:382
Definition: segy_file.h:363
Int4 sp_num
Definition: segy_file.h:459