NAME Read SEG Y - Read seismic data from SEG Y format into field AUTHOR INFORMATION John Tee AVS Inc. Consultant 17 Dawnay Road, Great Bookham, Leatherhead, Surrey KT23 4PE, UK Tel/Fax (+44) 0372 459214 SUMMARY Name Read segy Type Input Inputs NONE Outputs Field Output - field Parameters Name Type Default Choices Read SEGY File Browser browser File Type Filename Send Data oneshot Samples/trace idial 1500 100 UNBOUND Traces/file idial 200 1 UNBOUND Start sample idial 1 0 Samples/trace End sample idial 1500 0 Samples/trace Start trace idial 1 0 Traces/file End trace idial 200 0 Traces/file Reel Header1 text browser Reel Header2 text browser DESCRIPTION READ SEG Y is an data input module which reads seismic data stored in the SEG Y format. SEG "Y" is a format devised by the Society of Exploration Geophysicists (SEG), for transfer of demultiplexed seismic data on 9-track tape. SEG Y was published in 1974, and superceded the SEG "Ex" format. SEG Y defines, for each tape reel, a 3200 byte EBCDIC text header, followed by a 400 byte binary header. The data follows as a variable number of traces. Each trace has a 240 byte header, followed by a variable number of samples, each represented as a 4-byte real value. The READ SEGY File Browser may be used to select a SEG Y format file which has been copied to disk (using dd), or to select the name of a tape device on which a SEG Y reel is mounted and correctly positioned. The portability of direct reading from tape is not guaranteed. When a new file is selected, READ SEG Y displays the contents of the first (text) header and second (binary) header in the Reel Header1 and Reel Header2 text windows. The trace data is not read at this stage, in case the file is excessively large. If the samples/trace and traces/reel are defined in header2, the start and end dials are set to the extent of the data stored in the file. If these values are not in header2, the End Sample dial is set to the byte-count of the trace data records less the trace header size. This is expected to be equal to the number of samples per trace. The End Traces remains unchanged (initial default 200). In order to read the whole of the trace data, the Send Data button may be pressed. Alternatively, adjustment of any of the widgets (eg to select a subregion of the data) will cause the module to run. +++++++++++++++++++++++++++++++++++ Important Note on File Byte Order The byte order of the data in the file is dependent on the architecture of the machine on which it was written. This module can automatically detect and correct the byte order, if the SEG Y file was written by a Fortran program, but not if it was written by a C program. (The Fortran-written files contain a characteristic byte count preceding the data which is used to determine the order.) You should check the file contents to be sure whether the byte order is correct (reduce the values of "End trace" and "End sample" to do this quickly). Incorrect byte order results in data values ranging from 1.0e+26 or thereabouts to 1.0e-26, as seen in the "Print Field" module. If the results look incorrect, change the value of the "Byte order" widget until sensible values are obtained. If you are going to read a number of files from the same source, it will be worth while saving a network with the "Byte order" parameter set correctly, or changing the default "Byte order" in the module itself. The existence of four different byte orders is considered plausible (0123, 3210, 2301, 1032). Note also that the number of bytes read from each buffer on the file is determined by the byte count stored within the file, and not the samples/trace value. This is because the entire buffer must be read for tape files to be accessed directly. +++++++++++++++++++++++++++++++++++ Note on File Sizes The READ SEGY module attempts to derive the size of the data file from the data in the header ("Aux traces/rec" and "Smp/trace(reel)"). If these values are not plausible, the size defaults to 1125 samples/trace, and 4000 traces. The "Samples/trace" field should be set to the correct value manually, if it is wrong. Attempting to read the whole of the file, if it is larger than the actual data, will cause a non-fatal error message to be displayed. +++++++++++++++++++++++++++++++++++ Note on Data Coordinates SEG Y files may or may not contain latitude/longitude data in the trace header records. If this data is present, it can be used to provide the coordinate information for the output files, which will then be spatially referenced with respect to one another in the geometry viewer. Since many SEG Y files do not contain valid data for lat/long, this module uses a separate input data file (don4.flt) to provide this information A simple "dummy" data file is created by the supplied program write_don4. The dummy data file always creates the same coordinate range. If your data contains valid lat/long values, which you want to use, you should comment out the code which reads the file don4.flt, and copy the contents of the trace header (header3e(1) and header3e(2) to the lat and long variables in the read_data routine. +++++++++++++++++++++++++++++++++++ INPUTS PARAMETERS Read SEGY File Browser (browser) Used to select the input file. Send Data Used to read the data from the file without changing the other parameters. Samples/trace (typein) Used to define the number of samples (x-dimension) in the file. If this value is defined in the second header, the value is inserted in place of the typein value. Traces/file (typein) Used to define the number of traces (y-dimension) in the file. If this value is defined in the second header, the value is inserted in place of the typein value. Start sample (idial) Selects the first sample of the trace to be output to the field. The first sample in the trace is number 1. If the start and end samples are 0, no data is read. End sample (idial) Selects the last sample of the trace to be output to the field Start trace (idial) Selects the first trace from the SEG Y file to be output to the field End sample (idial) Selects the last trace from the SEG Y file to be output to the field Reel Header1 (text browser) Displays the contents of the first (text) header of the SEG Y file Reel Header2 (text browser) Displays the contents of the second (binary) header of the SEG Y file OUTPUTS Field Output - field Following execution of the module, the output field contains the data from the SEG Y file (excluding the trace headers) between the nominated start and end traces (y dimension), and start and end samples (x dimension). EXAMPLE NETWORKS GENERATE COLORMAP READ SEG Y | ___________________________| | | | COLOR RANGE DOWNSIZE |___________________ | | | FIELD TO MESH | GEOMETRY VIEWER RELATED MODULES SEE ALSO REFERENCE "Recommended Standards for Digital Tape Formats" K.M.Barry, D.A.Cavers and C.W.Kneale. (The subcommittee on Demultiplexed Field Tape Formats of the SEG Technical Standards Committee, 1974)