segy_drv_rev1 | index /Users/schwehr/projects/xcore/src/segy-py/segy_drv_rev1.py |
Module to read segy files. No writing at this time.
Copyright (C) 2005 Kurt Schwehr
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: segy_drv_rev1.py,v 1.9 2005/06/16 20:21:42 schwehr Exp $
The SEGY Rev 1 standard was published in 2002:
http://seg.org/publications/tech-stand/seg_y_rev1.doc
http://seg.org/publications/tech-stand/seg_y_rev1.pdf
The SEG Y Data Exchange Format (rev 0) was published in 1975, and has
achieved widespread usage. However, since 1975, the nature of seismic
data acquisition, processing, and seismic hardware has changed
significantly. SEG Y rev 1 addresses these changes and updates the
format for modern usage.
Modules | ||||||
|
Classes | ||||||||||
|
Data | ||
DRIVER_NAME = 'rev1' binaryHeaderEntries = {'AmpRecovMeth': [3253, 3254, 'Amplitude recovery method'], 'AuxTracesPerEnsemble': [3215, 3216, 'Number of auxiliary traces per ensemble'], 'BinGainRecovered': [3251, 3252, 'Binary gain recovered. 1=yes, 2=no'], 'CorrelatedTraces': [3249, 3250, 'Correlated data traces. 1=no, 2=yes'], 'EnsembleFold': [3227, 3228, 'The expected number of data traces per trace ensemble - the CMP fold'], 'FixedLenTraceFlag': [3503, 3504, '1 indeicates that all trances in this file are all the same length'], 'ImpulsePolarity': [3257, 3258, 'Impulse signal polarity. increasing pres or move give negative value'], 'JobId': [3201, 3204, 'Job identification number'], 'LineNo': [3205, 3208, 'Line number'], 'MeasurementSystem': [3255, 3256, '1 = Meters, 2 = Feet'], ...} coordUnits = {1: 'Length (meters or feet)', 2: 'Seconds of arc', 3: 'Decimal degrees', 4: 'Degrees, minutes, seconds (DMS)Note: To encode +...6 + MM*104 + SS*102 with bytes 71-72 set to -100.'} dataFormatStruct = {1: None, 2: '>i', 3: '>h', 4: None, 5: 'f', 6: None, 7: None, 8: '>b'} dataFormats = {1: '4-byte IBM floating point', 2: '4-byte, twos complement integer', 3: '2-byte, twos complement integer', 4: '4-byte, fixed-point with gain(obsolete)', 5: '4-byte IEEE floating-point', 6: 'Not currently used', 7: 'Not currently used', 8: '1-byte, twos complement integer'} dataUse = {1: 'Production', 2: 'Test'} fileHeaderShortList = ['JobId', 'LineNo', 'ReelNo', 'TracesPerEnsemble', 'SampleInterval', 'SamplesPerTrace', 'SampleFormat', 'SweepStart', 'SweepEnd', 'SweepLenSweepType', 'FixedLenTraceFlag'] fileHeaderTables = {'SampleFormat': {1: '4-byte IBM floating point', 2: '4-byte, twos complement integer', 3: '2-byte, twos complement integer', 4: '4-byte, fixed-point with gain(obsolete)', 5: '4-byte IEEE floating-point', 6: 'Not currently used', 7: 'Not currently used', 8: '1-byte, twos complement integer'}, 'SweepType': {1: 'linear', 2: 'parabolic', 3: 'exponential', 4: 'other'}, 'TraceSorting': {-1: 'Other', 0: 'Unknown', 1: 'As recorded', 2: 'CDP ensemble', 3: 'Single fold continuous profile', 4: 'Horizontally stacked', 5: 'Common source point', 6: 'Common receiver point', 7: 'Common offset point', 8: 'Common mid-point', ...}} gainType = {1: 'fixed', 2: 'binary', 3: 'floating point'} overTravel = {1: 'down (or behind) ', 2: 'up (or ahead)'} srcMeasUnits = {-1: 'Other (should be described in Source Measurement Unit stanza, page 39)', 0: 'Unknown', 1: 'Joule (J)', 2: 'Kilowatt (kW)', 3: 'Pascal (Pa)', 4: 'Bar (Bar)', 5: 'Bar-meter (Bar-m)', 6: 'Newton (N)', 7: 'Kilograms (kg)'} srcTypeOrient = {-1: 'Other (should be described in Source Type/Orientation stanza, page 38)', 0: 'Unknown', 1: 'Vibratory - Vertical orientation', 2: 'Vibratory - Cross-line orientation', 3: 'Vibratory - In-line orientation', 4: 'Impulsive - Vertical orientation', 5: 'Impulsive - Cross-line orientation', 6: 'Impulsive - In-line orientation', 7: 'Distributed Impulsive - Vertical orientation', 8: 'Distributed Impulsive - Cross-line orientation', ...} structIntCodes = {1: '>b', 2: '>h', 4: '>i', 8: '>q'} sweepTypeCodes = {1: 'linear', 2: 'parabolic', 3: 'exponential', 4: 'other'} taperType = {1: 'linear ', 2: 'cos2', 3: 'other'} textFileHeaderEntries = {'AREA': [2, 11], 'CLIENT': [1, 5], 'COMPANY': [1, 35], 'CREW NO': [1, 65], 'LINE': [2, 5], 'MAP ID': [2, 49], 'REAL NO': [3, 5]} timeBasis = {1: 'Local', 2: 'GMT (Greenwich Mean Time)', 3: 'Other, should be explained in a user defined stanza in the Extended Textual File Header', 4: 'UTC (Coordinated Universal Time)'} traceHdrSize = 240 traceHeader = {'AliasFiltFreq': [141, 142, 'Alias filter frequency (Hz), if used.'], 'AliasFiltSlope': [143, 144, 'Alias filter slope (dB/octave).'], 'CoordUnits': [89, 90, 'Coordinate units: '], 'Correlated': [125, 126, 'Correlated: 1 = no, 2 = yes'], 'DataUse': [35, 36, 'Data use: '], 'Day': [159, 160, 'Day of year (Julian day for GMT and UTC time basis).'], 'Delay': [109, 110, 'Delay recording time - Time in milliseconds betw... effect should appear in the Textual File Header.'], 'DevTrId': [213, 214, 'Device/Trace Identifier - The unit number or id ...y of the trace number (Trace Header bytes 25-28).'], 'DistanceCenter': [37, 40, 'Distance from center of the source point to the ... if opposite to direction in which line is shot).'], 'ESrcPtNo': [17, 20, 'Energy source point number - Used when more than...eader bytes 197-202 be used for shotpoint number.'], ...} traceHeaderShortList = ['LineSeqNo', 'FileSeqNo', 'FieldRecNo', 'TraceNo', 'EnsembleNo', 'TraceNoEnsemble', 'X', 'Y', 'GrpX', 'GrpY', 'WxVel', 'SubWxVel', 'LagTA', 'LagTB', 'Delay', 'TraceSamples', 'SampleInterval', 'SweepFreqStart', 'SweepFreqEnd', 'SweepLen', ...] traceHeaderTables = {'CoordUnits': {1: 'Length (meters or feet)', 2: 'Seconds of arc', 3: 'Decimal degrees', 4: 'Degrees, minutes, seconds (DMS)Note: To encode +...6 + MM*104 + SS*102 with bytes 71-72 set to -100.'}, 'DataUse': {1: 'Production', 2: 'Test'}, 'GainType': {1: 'fixed', 2: 'binary', 3: 'floating point'}, 'OverTravel': {1: 'down (or behind) ', 2: 'up (or ahead)'}, 'SrcMeasUnits': {-1: 'Other (should be described in Source Measurement Unit stanza, page 39)', 0: 'Unknown', 1: 'Joule (J)', 2: 'Kilowatt (kW)', 3: 'Pascal (Pa)', 4: 'Bar (Bar)', 5: 'Bar-meter (Bar-m)', 6: 'Newton (N)', 7: 'Kilograms (kg)'}, 'SrcTypeOrient': {-1: 'Other (should be described in Source Type/Orientation stanza, page 38)', 0: 'Unknown', 1: 'Vibratory - Vertical orientation', 2: 'Vibratory - Cross-line orientation', 3: 'Vibratory - In-line orientation', 4: 'Impulsive - Vertical orientation', 5: 'Impulsive - Cross-line orientation', 6: 'Impulsive - In-line orientation', 7: 'Distributed Impulsive - Vertical orientation', 8: 'Distributed Impulsive - Cross-line orientation', ...}, 'SweepType': {1: 'linear', 2: 'parabolic', 3: 'exponential', 4: 'other'}, 'TaperType': {1: 'linear ', 2: 'cos2', 3: 'other'}, 'TimeBasis': {1: 'Local', 2: 'GMT (Greenwich Mean Time)', 3: 'Other, should be explained in a user defined stanza in the Extended Textual File Header', 4: 'UTC (Coordinated Universal Time)'}, 'TraceId': {-1: 'Other', 0: 'Unknown', 1: 'Seismic data', 2: 'Dead', 3: 'Dummy', 4: 'Time break', 5: 'Uphole', 6: 'Sweep', 7: 'Timing', 8: 'Waterbreak', ...}, ...} traceIdCode = {-1: 'Other', 0: 'Unknown', 1: 'Seismic data', 2: 'Dead', 3: 'Dummy', 4: 'Time break', 5: 'Uphole', 6: 'Sweep', 7: 'Timing', 8: 'Waterbreak', ...} traceSortingCodes = {-1: 'Other', 0: 'Unknown', 1: 'As recorded', 2: 'CDP ensemble', 3: 'Single fold continuous profile', 4: 'Horizontally stacked', 5: 'Common source point', 6: 'Common receiver point', 7: 'Common offset point', 8: 'Common mid-point', ...} traceUnits = {-1: 'Other (should be described in Data Sample Measurement Units Stanza)', 0: 'Unknown', 1: 'Pascal (Pa)', 2: 'Volts (v)', 3: 'Millivolts (mV)', 4: 'Amperes (A)', 5: 'Meters (m)', 6: 'Meters per second (m/s)', 7: 'Meters per second squared (m/s2)', 8: 'Newton (N)', ...} transdUnits = {-1: 'Other (should be described in Data Sample Measurement Unit stanza, page 36)', 0: 'Unknown', 1: 'Pascal (Pa)', 2: 'Volts (v)', 3: 'Millivolts (mV)', 4: 'Amperes (A)', 5: 'Meters (m)', 6: 'Meters per second (m/s)', 7: 'Meters per second squared (m/s2)', 8: 'Newton (N)', ...} |