DEPARTMENT OF THE INTERIOR
U.S. GEOLOGICAL SURVEY
DUMPSEGY V1.0: A Program to Examine the Contents of SEG-Y
Disk-Image Seismic Data
by F.N. Zihlman 1
Open-File Report 92-590
Although this program has been extensively tested, the Geological
Survey can not guarantee that it will give accurate results in
all applications nor that it will work on all computer systems.
This report is preliminary and has not been reviewed for
conformity with U.S Geological Survey editorial standards and
stratigraphic nomenclature. Any use of trade names is for
descriptive purposes only and does not imply endorsement by the
U.S. Geological Survey.
1 U.S. Geological Survey, Box 25046, Denver Federal Center,
Denver, CO 80225
1992
CONTENTS
Abstract......................................................1
Introduction..................................................1
System requirements...........................................2
Program function..............................................3
DUMPSEGY Overview.............................................4
File information display......................................5
Default display...............................................5
EBCDIC header option..........................................6
Binary header option..........................................7
Trace header option...........................................7
Floating point sample option..................................8
File and/or header information only option....................9
Trace range option............................................9
File output option...........................................10
Copy as binary option........................................11
Creating new SEG-Y files.....................................11
Data sample conversion.......................................13
Sample data file.............................................14
Disclaimer...................................................15
Reference....................................................16
TABLES
Table 1. DUMPSEGY command line options....................17
2. SEG-Y binary header values definitions...........17
3. SEG-Y trace header values definitions............20
FIGURES
Figure 1. Program usage information display................23
2. SEG-Y file information display...................23
3. An example of the default DUMPSEGY sample display24
4. An example of the EBCDIC header display..........24
5. An example of the binary header display..........25
6. An example of a data trace header display........27
7. An example of a floating point sample display....28
DUMPSEGY V1.0
ABSTRACT
DUMPSEGY is a character-based interactive program written in
C and designed to display the header information and hexadecimal
and floating point sample values of digital seismic data stored
in industry-standard SEG-Y format. DUMPSEGY is started at the
system command line prompt, and requires at a minimum the SEG-Y
data file path and name. Up to eight display options may be
included on the command line following the data file name.
DUMPSEGY, invoked with no options, will display information about
the SEG-Y file opened, prompt the user for the sequential trace
number of the seismic data trace to be displayed, directly access
that trace, and display the hexadecimal values of the samples
comprising that trace.
DUMPSEGY options allow: 1) displaying the SEG-Y EBCDIC
header, 2) displaying the binary header, 3) displaying the
individual data trace header information of the user-selected
trace, 4) displaying the individual samples that comprise a trace
translated from the SEG-Y format into their floating point
values, 5) displaying only the file information and or header
information, with no display of the individual samples, for
selected data traces, 6) specifying a file to receive the output,
7) specifying a sequential range of traces to display, including
an increment between sequential traces, and 8) copying portions
and components of the input file in binary format allowing the
construction of a new SEG-Y file from the original.
If started without specifying a trace range, DUMPSEGY will
prompt the user for other data traces to display until the user
enters 0 to exit the program
INTRODUCTION
The combination of low cost, powerful personal computers
(PC's) possessing hard disk drives with hundreds of megabytes of
storage allows a "mainframe" level of computing on a user's desk.
Desktop PC's have increased in processing power to the point that
an Intel 80486 processor-based DOS PC running at 25 Mhz was able
to execute a computationally intensive seismic data processing
algorithm 50% faster than the same source code running on a VAX
11/780 with an attached array processor (Miller, 1992, personal
communication). This increase in desktop computing power and
disk storage has made the PC-based real-time display of seismic
data a practical reality.
DUMPSEGY uses the seismic data stored in industry-standard
SEG-Y format. A typical amount of seismic data occupies many
megabytes of storage space and thus, for practical purposes, a
hard disk or CD-ROM is necessary. PLOTSEGY (Zihlman, 1992)
provides a means of real-time display of SEG-Y seismic data in
the DOS environment. DUMPSEGY provides a method of examining the
SEG-Y header information and sample values of the seismic data
1
DUMPSEGY V1.0
and as such may be seen as a companion program to PLOTSEGY. Like
PLOTSEGY, DUMPSEGY was written for operating systems which
internally store floating point numbers using the IEEE format,
such as DOS or UNIX (see DATA SAMPLE CONVERSION, below).
DUMPSEGY was written in ANSI C allowing the source code to be
compiled and used in any operating system environment, such as
DOS or UNIX, having compilers supporting the ANSI standard.
SYSTEM REQUIREMENTS
DUMPSEGY was developed in C using Borland C/C++ 3.0 on an
ALR BusinessVEISA with a 33 Mhz Intel 80386 processor, an 80387
math coprocessor, and MS-DOS 4.01.
DOS ENVIRONMENT
DUMPSEGY has the following DOS hardware and software
requirements:
* Intel 80286 or higher processor.
* DOS 3.0 or later.
* A hard disk drive or CD-ROM containing the input
file(s).
* A math coprocessor is NOT required, but will be used
if available and is strongly recommended.
Please refer to the EBCDIC Header Display section below for
source code compilation information concerning that display.
UNIX ENVIRONMENT
DUMPSEGY has the following UNIX software requirement:
* Source code must be compiled using an ANSI compliant
compiler.
Please refer to the EBCDIC Header Display section below for
source code compilation information concerning that display.
PROGRAM FUNCTION
DUMPSEGY is started at the system command line prompt by
typing
DUMPSEGY -e -b -t -c -v -n -f -r
first:last:increment
A description of each of the options is given in Table 1.
The is required. DUMPSEGY and the must
be separated with at least one space. Options may be entered in
any order and in either upper or lower case. The hyphen (-)
2
DUMPSEGY V1.0
before each option is required and no blanks are allowed between
the hyphen and the option character. All options must be
separated from one another and from the any file name with at
least one or more spaces. Option "-f" must have at least one
space separating it and the following name, which
must be a valid file name for the operating system in use.
Option "-r" must have at least one space separating it and the
starting and stopping trace range following it. The trace range
must be given as starting trace number:ending trace number, where
the starting and ending trace number are integer values
representing the sequential seismic data trace numbers in the
file. The starting and ending trace numbers must be separated
with a colon (:). Optionally, a trace increment may be included
following the ending trace number and separated from it by a
colon (:). No spaces between the starting trace number, the
ending trace number and the trace increment are allowed.
Entering DUMPSEGY without an will display
information on how to use the program as shown in Figure 1.
3
DUMPSEGY V1.0
DUMPSEGY OVERVIEW
A SEG-Y file, whether on tape or disk, is composed of a 3200
byte EBCDIC-format header, followed by a 400 byte binary header,
which in turn is followed by individual data traces. Each data
trace is composed of a 240 byte trace header followed by the 4
byte SEG-Y samples comprising the actual data for that trace.
DUMPSEGY uses a library of C routines, SEGYLIB.C, designed
to read SEG-Y files and originally written for the DOS SEG-Y
display program PLOTSEGY (Zihlman, 1992). Currently, the
routines in that library allow a maximum of 6000 samples per
trace. Data sets having more than 6000 samples per trace may
cause DUMPSEGY to fail and should be resampled to have 6000
samples per trace or less.
Starting DUMPSEGY with no command line options will produce
the default display as described below. The "-e" and/or "-b"
options will display the EBCDIC header and/or the binary header
following the File Information display, the "-v" option will
translate the SEG-Y data samples into their actual floating point
values, the "-n" option will display file and header information
only, the "-f" option will direct output to a disk file, and the
"-r" option will display a user-defined range of traces, the "-c"
option will output the data in binary form.
If the "-f" option is used without the "-c" option, the
output file is opened as an ASCII text file and DUMPSEGY will
decode the binary information of the input file into ASCII text
before writing it to the output file. If the "-f" option is used
with the "-c" option, the output file is opened as a binary file
and the information requested using the command line options will
be written to the output file in binary form.
The "-v" and "-c" options are mutually exclusive and starting
DUMPSEGY specifying both on the command line will cause DUMPSEGY
to display the program usage information and exit.
4
DUMPSEGY V1.0
FILE INFORMATION DISPLAY
After successfully opening the file specified on the command
line, DUMPSEGY will determine and return the following file
information:
* File name.
* Sample interval, in microseconds.
* Number of samples per seismic trace.
* Maximum time value per seismic trace, in
milliseconds.
* Bytes per seismic trace.
* Bytes in the file.
* Number of seismic traces in the file.
If the "-c" or "-f" options have not been used, this
information will remain on the screen until the user presses
or X. If the "-f" option has been included on the command
line, DUMPSEGY will direct the output to the specified file. If
the "-c" option has been included on the command line no file
information is output by DUMPSEGY. Figure 2 is an example of the
File Information Display.
DEFAULT DISPLAY
Starting DUMPSEGY with no options will produce a default
display composed of the SEG-Y file information, as discussed
above, followed by a prompt for a sequential trace number to
display. Enter 0 (zero) to exit the program. Enter a value
between 1 and the sequential number of the last trace in the SEG-
Y file to display the hexadecimal value of each sample within
that trace. The hexadecimal values displayed are the
untranslated SEG-Y samples, not their actual floating point
values (see Floating Point Sample Display, below). Four samples
(16 bytes) are displayed per line as a series of eight, 2 byte
(four digit) hexadecimal numbers, separated from each other by a
blank. The byte number of the first byte displayed and the byte
number of the last byte displayed, relative to the first byte of
the SEG-Y FILE, are displayed within square brackets on the left
at the start of each line. All samples comprising the data trace
are displayed without pause to the end of that trace. After the
last sample has been displayed, the user is prompted for another
trace number. Figure 3 is an example of the default sample
display.
EBCDIC HEADER OPTION: -e or -E
The "-e" or "-E" option directs DUMPSEGY to process the SEG-
Y file EBCDIC header. If the "-c" and "-f" options have not been
included on the command line this option will display the 3200
byte EBCDIC header, translated to ASCII, as a series of 40 lines
of text 80 characters in length. DUMPSEGY will stop at the end
5
DUMPSEGY V1.0
of 20 lines of text and prompt the user to continue the display
by pressing , or to exit the program by pressing X.
Figure 4 is an example of an ASCII translation of the EBCDIC
header.
The "-c" option directs DUMPSEGY to copy the EBCDIC header
in binary form.
The "-f " option directs DUMPSEGY to output the
EBCDIC header information to that file.
The ASCII translation of the EBCDIC header is displayed
differently on DOS and UNIX systems, depending on how the
DUMPSEGY source code is compiled. On DOS systems, the EBCDIC
header information is displayed as 40 text strings of 80
characters each, with no "new line" character at the end. As the
default DOS display is 80 characters per line, the display will
"wrap" around to the following line at the end of each 80
character string.
UNIX systems will display the EBCDIC header as a series of
40 text strings, 80 characters each, with a "new line" character
at the end.
The source code must be compiled for the desired operating
system with the appropriate "define" value ("DOS_SYSTEM" or
"UNIX_SYSTEM") defined and the other commented out. If the wrong
one is "defined" the EBCDIC header information will be displayed
inappropriately. If both "DOS_SYSTEM" and "UNIX_SYSTEM" are
defined each line of the EBCDIC header will be displayed twice.
If neither are defined no EBCDIC header information will be
displayed. Please refer to the source code file DSGYMAIN.C for
more information.
BINARY HEADER OPTION: -b or -B
The "-b" or "-B" option directs DUMPSEGY to process the 400
byte SEG-Y file binary header. Only the first 60 bytes of the
binary header are defined by the Society of Exploration
Geophysics (SEG) (Barry, et al., 1975), and if the "-c" option is
not used only those 60 bytes are processed. If the "-c" and "-f"
options have not been included on the command line, each SEG-
defined header value is displayed, one header value per display
line, and is composed of four items: the header value's starting
and ending location, in bytes, relative to the first byte of the
file, the header value's name, the header value's decimal value,
and the header value's actual hexadecimal value. The header
value's starting and ending byte locations are enclosed in square
brackets. DUMPSEGY will stop after 22 lines of text and prompt
the user to continue the display by pressing , or to exit the
program by pressing X. Pressing will display the
remaining SEG-defined header values, and again prompt the user to
continue the display by pressing , or to exit the program by
6
DUMPSEGY V1.0
pressing X. Table 2 is a list of SEG-defined binary header
values, the byte location in the header where they may be found,
and how many bytes comprise those header values. Figure 5 is an
example of the binary header display.
The "-c" option directs DUMPSEGY to copy the full 400 byte
binary header in binary form.
The "-f " option directs DUMPSEGY to output the
binary header information to that file.
TRACE HEADER OPTION: -t ot -T
The "-t" or "-T" option directs DUMPSEGY to process each
data trace header. Only the first 180 bytes of the 240 byte data
trace header are defined by the Society of Exploration Geophysics
(Barry, et al., 1975), and if the "-c" option has not been used,
only those 180 bytes are processed. If the "-c" and "-f" options
have not been used, each SEG-defined header value is displayed,
with one header value per display line and is composed of four
items: the header value's location within the file, the header
value's name, the header value's decimal value, and the header
value's actual hexadecimal value. The header value's starting
and ending byte locations, relative to the first byte in the
file, are enclosed in square brackets. DUMPSEGY will stop after
22 lines of text and prompt the user to continue the display by
pressing , or to exit the program by pressing X.
Pressing will display another 22 line set of SEG-defined
header values, and again prompt the user, until all SEG-defined
trace header values have been displayed or the user exits the
program. Table 3 describes the starting and ending byte
locations and the definition of each SEG-defined trace header
value. Figure 6 is an example of the trace header display.
The "-c" option directs DUMPSEGY to copy the full 240 bytes
of each trace header in binary form.
The "-f " option directs DUMPSEGY to output the
data trace header information to that file.
FLOATING POINT SAMPLE OPTION: -v or -V
The "-v" or "-V" option directs DUMPSEGY to process the
individual SEG-Y samples into their floating point values. If
the "-f" option is not used, DUMPSEGY will display four samples
(16 bytes) per line, separated from each other by a blank.
Actual calculation of the floating point number of each sample is
given below (see DATA SAMPLE CONVERSION, below). The byte range,
relative to the first byte of the SEG-Y FILE, of the four samples
displayed is shown within square brackets on the left at the
start of each line. All samples comprising the data trace are
displayed without pause to the end of that trace. After the last
7
DUMPSEGY V1.0
sample has been displayed, the user is prompted to enter another
trace number. Figure 7 is an example of the floating point
sample display.
The "-c" and "-v" options are mutually exclusive and
including both on the command line will cause DUMPSEGY to display
the program usage information and exit.
The "-f " option directs DUMPSEGY to output the
SEG-Y samples floating point values to that file.
FILE AND/OR HEADER INFORMATION ONLY OPTION: -n or -N
The "-n" or "-N" option directs DUMPSEGY to process only the
header information requested using the "-e", "-b", and "-t"
options. No data samples are processed. This option was
provided to allow the output of header information to a file
without including the individual samples for the selected data
traces.
If no header options are specified and the "-c" and "-f"
options are not used, DUMPSEGY will display only information
about the file specified (see FILE INFORMATION DISPLAY, above).
Using the "-e" (see EBCDIC HEADER OPTION, above), "-b" (see
BINARY HEADER OPTION, above), and "-t" (see TRACE HEADER OPTION,
above) command line options will display the specified
information as discussed above.
If the "-n" and "-v" options (see FLOATING POINT SAMPLE
OPTION, above) are issued together, the "-n" option will disable
the floating point sample option.
The "-c" option directs DUMPSEGY to copy any header
information requested in binary form.
The "-f " option directs DUMPSEGY to output the
information to that file.
TRACE RANGE OPTION: -r or -R
The "-r first:last:increment" or "-R first:last:increment"
option directs DUMPSEGY tp process only those data traces within
the range specified by "first:last". The value "first" is an
integer number representing the sequential data trace number of
the first trace to display, and the value "last" is an integer
number representing the sequential data trace number of the last
trace to display, relative to the first data trace in the SEG-Y
file as trace number 1. The trace increment is an integer number
which DUMPSEGY will use to step through the data. If no
increment is included in the range option an increment of 1 is
used.
8
DUMPSEGY V1.0
If the value of "first" is less than "last" and the trace
increment is a positive integer, DUMPSEGY will maintain the trace
"direction", or order, of the input file. If the value of
"first" is greater than "last" and the increment is a negative
integer, DUMPSEGY will output the data in reverse order relative
to the input file. This allows DUMPSEGY to "reverse sort" the
input data. If the value of "first" equals the value of "last",
DUMPSEGY will process only that one data trace. Entering range
information in a form other than described above will cause
DUMPSEGY to behave unpredictably.
DUMPSEGY will exit to the system command line after
processing the range of data specified. The output from DUMPSEGY
for that trace range specified will be displayed on the user's
terminal unless it has been directed to an output file (see FILE
OUTPUT OPTION, below). If the output is displayed on the
terminal, the user will have to respond to all the interactive
prompts during the processing of traces within the specified
range. If the output has been directed to a disk file, DUMPSEGY
will not process any interactive prompts.
FILE OUTPUT OPTION: -f or -F
The "-f " or "-F " option directs
DUMPSEGY to send the any output to the file specified by "file
name". If DUMPSEGY can not open the file specified it will
display a message to the user's terminal that it could not open
"file name" and that output from the program will be redirected
to the user's terminal. With the display of this message, the
user may press to continue, or X to exit the program.
If this option is used without the "-r" option, DUMPSEGY
will prompt the user for a data trace number, process that trace,
and output all information to the specified file, and again
prompt the user until a 0 (zero) is entered to exit the program.
If the "-r" option is used, DUMPSEGY will process all the data
traces in the specified range, output all information to the
specified file, and exit the program.
The "-c" option directs DUMPSEGY to open the specified
output file in binary mode. If no "-c" option is present, the
output file is opened in text mode.
COPYING THE DATA IN BINARY FORM OPTION: -c or -C
The "-c" or "-C" option issued on the command line will
"copy", or read, the specified input data in binary form. The "-
c" and "-v" options are mutually exclusive and including both on
the command line will cause DUMPSEGY to display the program usage
information and exit. The user is recommended to specify an
output file using the "-f" option. This option allows new SEG-Y
9
DUMPSEGY V1.0
files to be created from portions of the original SEG-Y input
file. See CREATING NEW SEG-Y FILES, below.
CREATING NEW SEG-Y FILES
New SEG-Y files may be created from the original SEG-Y input
file using the appropriate command line options, as shown in a
series of examples below.
Example 1: General form of creating a SEG-Y file.
DUMPSEGY -c -e -b -t -f {-r
first:last:increment}
The "-c", "-e", "-b", "-t" options are necessary to copy the
EBCDIC header, the binary header, all data trace headers, and the
data trace samples to output a fully functional SEG-Y file.
Optionally, a trace range and increment could be included.
10
DUMPSEGY V1.0
Example 2: Creating a SEG-Y file which is a subset of the input
file.
DUMPSEGY -c -e -b -t -f -r 1:500
A range may be specified to create a subset of the original
SEG-Y file, creating a SEG-Y containing the first
500 traces of the .
Example 3: Creating a single channel SEG-Y file from a
multichannel input file.
DUMPSEGY -c -e -b -t -f -r 30:480:30
DUMPSEGY may be used to create a single fold ("100 percent")
SEG-Y file from multichannel SEG-Y data. If the
consists of 30 channel (30 traces per "shot") demultiplexed
seismic data having 6 auxilary traces followed by 24 data traces,
where the 30th trace in each "shot" is the trace nearest to the
energy source (the "near trace"), the above DUMPSEGY command
would produce an consisting of 16 traces
representing the near trace from the 451 traces processed: traces
30, 60, 90, ..., 480 from the .
Example 4: Creating a SEG-Y file having the reverse sort order of
the input file.
DUMPSEGY -c -e -b -t -f -r 500:1:-1
This will create a SEG-Y containing the first
500 traces from the "reverse sorted" into the
. Where the has a trace order starting
with trace "1" and increasing, the will start with
trace "500" of the and end with trace "1" of the
.
11
DUMPSEGY V1.0
Example 5: Creating a SEG-Y file from multiple input files.
DUMPSEGY -c -e -b -t -f -r 1:50
DUMPSEGY -c -t -f -r 101:150
DUMPSEGY -c -t -f -r 201:250
New SEG-Y files may be created from portions of the same or
different SEG-Y files in a manner similar to shown above. The
first call to DUMPSEGY will create a full SEG-Y
consisting of the data from the for the trace range
specified. The next two calls to DUMPSEGY will create having only the trace headers and sample values for the
data trace range specified. These three files may be
concatenated together using the appropriate operating system
command(s) to produce a SEG-Y file consisting of traces 1 - 50,
101 - 150, and 201 - 250 from the same or different .
An example of the DOS method of contatenation is shown below:
copy /B + /B +
The /B option is necessary to process binary format files
and ignore the control-Z end of file marker in all but the last
of the files to be concatenated.
DATA SAMPLE CONVERSION
Each SEG-Y sample is stored as four consecutive bytes in
IBM-compatible format as defined in IBM Form GA 22-6821 (Barry,
et al, 1975). These four bytes form a 32 bit word as defined by
the SEG Committee on Technical Standards for the SEG-Y format
(Barry, et al., 1975). Since DOS and UNIX-based systems
internally represent numbers using the IEEE format, reading the
IBM-format sample will result in the byte order being changed.
For example, a 32 bit sample value may have the hexadecimal value
459AEAEB in IBM-format representation. Reading this value and
assigning it to a long integer variable will convert it into the
IEEE-format resulting in a hexadecimal value of EBEA9A45. In
order to maintain the proper byte order, each byte of the four
byte (32 bit) word must be read as an unsigned character and the
sample built by "left-shifting" each byte into it's proper
position.
Each 32 bit sample is then decomposed into a sign bit (Qs),
a 7 bit characteristic (Qc) and a 24 bit fraction (Qf). The
corresponding sample value may be calculated by the following:
sample value = Qs * 16^(Qc-64) * Qf
where 16^(Qc-64) is 16 raised to the (Qc-64) power.
SAMPLE DATA FILE
12
DUMPSEGY V1.0
Included with this software publication is SAMPLE.SGY, a DOS
copy of the first 125 traces of the SEG-Y final stacked section
for the seismic line 624-79, located in the Point Barrow region
in the National Petroleum Reserve in Alaska. SAMPLE.SGY,
requiring 783600 bytes of disk space, may be used as an input
file name for DUMPSEGY.
13
DUMPSEGY V1.0
DISCLAIMER
This software publication was prepared by an agency of the
United States Government. Neither the United States Government
nor any agency thereof, nor any of their employees, make any
warranty, expressed or implied, or assumes any legal liability or
responsibility for the accuracy, completeness, or usefulness of
the information, apparatus, product, or process disclosed in this
report. Reference therein to any specific commercial product,
process, or service by trade name, trademark, manufacturer, or
otherwise does not constitute or imply its endorsement,
recommendation, or favoring by the United States Government or
any agency thereof.
Although all data and software have been used by the USGS,
no warranty, expressed or implied, is made by the USGS as to the
accuracy of the data and related materials and/or functioning of
the software. The act of distribution shall not constitute any
such warranty and no responsibility is assumed by the USGS in the
use of this data, software, or related materials.
14
DUMPSEGY V1.0
REFERENCE
Barry, K.M., Cavers, D.A., and Kneale, C.W., 1975, Recommended
standards for digital tape formats, in Digital Tape Standards;
Society of Exploration Geophysicists ["Recommended standards
for digital tape formats" reprinted from Geophysics, v. 32, p.
1073 - 1084; v. 37, p. 36-44; v. 40, p. 344 - 352.] p. 22 - 30.
Zihlman, F.N., 1992, PLOTSEGY V1.0: A DOS graphics program to
display SEG-Y disk-image seismic data; U.S. Geological Survey
Open File 92-349A and 92-349B.
15
DUMPSEGY V1.0
TABLES
Table 1: DUMPSEGY command line options.
-e.......................Display the 40 line EBCDIC header.
-b.......................Display the 60 SEG-defined bytes of
the binary header.
-t.......................Display the 180 SEG-defined bytes
of each data trace header.
-v.......................Display the floating point value
for each sample.
-n.......................Display file and header information
only, no trace samples.
-f .........Send the output to a file. If the
"-c" option is included, open the
file as a binary file, else open it
as a text file.
-r first:last:increment..Process a range of traces.
-c.......................copy any requested information in
binary format. If the "-f" option
is included, open that file as a
binary file.
Table 2: SEG-defined binary header values (Barry, et al., 1975).
An example of the default display format for data trace
number 1 from the example data set. Byte 3841 is the
first sample in the data trace. Byte 9840 is the last
byte of the last sample of the data trace. There are
6000 bytes in this data trace, with 4 bytes per sample,
for a total of 1500 samples per trace.
Byte Numbers Header Value Description
3201 - 3204 Job identification number.
3205 - 3208 Line number.
3209 - 3212 Reel number.
3213 - 3214 Number of data traces per record.
3215 - 3216 Number of auxiliary traces per record.
3217 - 3218 Sample interval, microseconds, this file (reel).
3219 - 3220 Sample interval, microseconds, original field
recording.
3221 - 3222 Number of samples per data trace, this file
(reel).
3223 - 3224 Number of samples per data trace, original field
recording.
3225 - 3226 Data sample format code: 1 = floating point (4
bytes)
2 = fixed point (4 bytes)
3 = fixed point (2 bytes)
4 = fixed point with gain
code (4 bytes).
16
DUMPSEGY V1.0
NOTE: DUMPSEGY only works with data sample format
code 1 data.
3227 - 3228 CDP fold.
3229 - 3230 Trace sorting code: 1 = as recorded (no
sorting)
2 = CDP ensemble
3 = single fold
continuous profile
4 = horizontally stacked
3231 - 3232 Vertical sum code: 1 = no sum
2 = two sum
...
N = N sum (N = 32,767)
3233 - 3234 Sweep frequency at start.
3235 - 3236 Sweep frequency at end.
3237 - 3238 Sweep length, ms.
3239 - 3240 Sweep type code: 1 = linear
2 = parabolic
3 = exponential
4 = other
3241 - 3242 Trace number of sweep channel.
3243 - 3244 Sweep trace taper length, ms, at start if tapered.
3245 - 3246 Sweep trace taper length, ms, at end.
3247 - 3248 Taper type: 1 = linear
2 = cos
3 = other
3249 - 3250 Correlated data traces: 1 = no
2 = yes
3251 - 3252 Binary gain recovered: 1 = yes
2 = no
3253 - 3254 Amplitude recovery method: 1 = none
2 = spherical divergence
3 = AGC
4 = other
3255 - 3256 Measurement system: 1 = meters
2 = feet
3257 - 3258 Impulse signal: 1 = Upward = negative
number.
2 = Upward = positive
number.
3259 - 3260 Vibratory polarity code - seismic signal lags
pilot signal by:
1 = 337.5 - 22.5
degrees
2 = 22.5 - 67.5
degrees
3 = 67.5 - 112.5
degrees
4 = 112.5 - 157.5
degrees
5 = 157.5 - 202.5
degrees
6 = 202.5 - 247.5
degrees
17
DUMPSEGY V1.0
7 = 247.5 - 292.5
degrees
8 = 292.5 - 337.5
degrees
3261 - 3600 Unassigned - for optional information.
18
DUMPSEGY V1.0
Table 3: SEG-defined data trace header values (Barry, et al.,
1975).
Byte Numbers Header Value Description
1 - 4 Trace sequence number within line.
5 - 8 Trace sequence number within file (reel).
9 - 12 original field record number.
13 - 16 Trace number within original field record.
17 - 20 Energy source point number.
21 - 24 CDP ensemble number.
25 - 28 Trace number within the CDP ensemble.
29 - 30 Trace identification code: 1 = seismic data
2 = dead
3 = dummy
4 = time break
5 = uphole
6 = sweep
7 = timing
8 = water break
9 = N, optional use, N =
32,767
31 - 32 Number of vertically summed traces yielding this
trace.
33 - 34 Number of horizontally stacked traces yielding
this trace.
35 - 36 Data use: 1 = production
2 = test
37 - 40 Distance from source point to receiver group.
41 - 44 Receiver group elevation - above sea level are
positive, below sea level are negative.
45 - 48 Surface elevation at source.
49 - 52 Source depth below surface (positive number).
53 - 56 Datum elevation at receiver group.
57 - 60 Datum elevation at source.
61 - 64 Water depth at source.
65 - 68 Water depth at group.
69 - 70 Scalar to be applied to all elevations & depths,
specified in bytes 41 - 68 to give the real value.
Scalar = 1, +/-10, +/-100, +/-1000, or +/-10,000.
If positive, scalar is used as a multiplier; if
negative, scalar is used as a divisor.
71 - 72 Scalar to be applied to all coordinate specified
in bytes 73 - 88 to give the real value. Scalar =
1, +/-10, +/-100, +/-1000, or +/-10,000. If
positive, scalar is used as a multiplier; if
negative, scalar is used as a divisor.
73 - 76 Source coordinate - X.
77 - 80 Source coordinate - Y.
81 - 84 Group coordinate - X.
85 - 88 Group coordinate - Y.
If the coordinate units are in seconds of arc, the
X values represent longitude and the Y values
represent latitude. A positive value designates
the number of seconds east of Greenwich Meridian
19
DUMPSEGY V1.0
or north of the equator and a negative value
designates the number of seconds south or west.
89 - 90 Coordinate units: 1 = length (meters or
feet)
2 = seconds of arc
91 - 92 weathering velocity.
93 - 94 Subweathering velocity.
95 - 96 Uphole time at source.
97 - 98 Uphole time at group.
99 - 100 Source static correction.
101 - 102 Group static correction.
103 - 104 Total static applied.
105 - 106 Lag time A. Time in ms between end of 240-byte
trace identification header and time break.
positive if time break occurs after end of header,
negative if time break occurs before end of
header. Time break is defined as the initiation
pulse which may be recorded on an auxiliary trace
or as otherwise specified by the recording system.
107 - 108 Lag time B. Time in ms between the time break and
the initiation time of the energy source. May be
positive or negative.
109 - 110 Delay recording time. Time in ms between
initiation time of energy source and time when
recording of data samples begins.
111 - 112 Mute time - start.
113 - 114 Mute time - end.
115 - 116 Number of samples in this trace.
117 - 118 Sample interval, in microseconds, for this trace.
119 - 120 Gain type of field instruments: 1 = fixed
2 = binary
3 = floating point
4 = --- N = optional use
121 - 122 Instrument gain constant.
123 - 124 Instrument early or initial gain (db).
125 - 126 Correlated: 1 = no
2 = yes
127 - 128 Sweep frequency at start.
129 - 130 Sweep frequency at end.
131 - 132 Sweep length, ms.
133 - 134 Sweep type: 1 = linear
2 = parabolic
3 = exponential
4 = other
135 - 136 Sweep trace taper length at start, ms.
137 - 138 Sweep trace taper length at end, ms.
139 - 140 Taper type: 1 = linear
2 = cos
3 = other
141 - 142 Alias filter frequency.
143 - 144 Alias filter slope.
145 - 146 Notch filter frequency.
147 - 148 Notch filter slope.
149 - 150 Low cut frequency.
20
DUMPSEGY V1.0
151 - 152 High cut frequency.
153 - 154 Low cut slope.
155 - 156 High cut slope.
157 - 158 Year data recorded.
159 - 160 Day of year.
161 - 162 Hour of day (24 hour clock).
163 - 164 Minute of hour.
165 - 166 Second of minute.
167 - 168 Time basis code: 1 = local
2 = GMT
3 = other
169 - 170 Trace weighting factor - defined as 2-N volts for
the least significant bit. (N=0, 1,...,32,767)
171 - 172 Geophone group number of roll switch position one.
173 - 174 Geophone group number of trace number one within
original field record.
175 - 176 Geophone group number of last trace within
original field record.
177 - 178 Gape size (total number of groups dropped).
179 - 180 Overtravel associated with taper at beginning or
end of line:
1 = down (or behind)
2 = up (or ahead)
181 - 240 Unassigned - for optional information.
181 - 240
21
DUMPSEGY V1.0
FIGURES
USAGE: dumpsegy {file name} {-e} {-b} {-t} {-n} {-v} {-c} {-f
file} {-r}
{file name} MUST be provided, all other parameters are optional.
-e: - display EBCDIC header record.
-b: - display BINARY header record.
-t: - display individual trace header per
trace
selected.
-v: - display actual SEG-Y sample value in
decimal.
-n: - display all information EXCEPT trace
samples.
-c: - copy data to an output file in
binary format.
This option may be used to create a
SEG-Y
file containing a subset of the
original SEG-Y
file.
-f {file name}: - redirect output to a file.
-r {start:stop:increment}: - sequential range of traces to
display,
with an optional increment.
The -v and -c options are mutually exclusive and will cause
DUMPSEGY to exit.
Optional parameters may be entered in any order.
Figure 1: Program usage information displayed to the user's
terminal when DUMPSEGY is invoked with no parameters.
========== FILE INFORMATION =========
file: SAMPLE.SGY
sample rate: 4000.0 microsec
samples per trace: 1500
data length: 6000 msec
bytes per trace: 6240
bytes in file: 3079920
traces in file: 125
Figure 2: File information retrieved and displayed upon opening
the specified SEG-Y input file.
22
DUMPSEGY V1.0
[ 3841 - 3856] 0000 0000 0000 0000 0000 0000 0000 0000
[ 3857 - 3872] 0000 0000 0000 0000 0000 0000 0000 0000
[ 3873 - 3888] 0000 0000 0000 0000 0000 0000 0000 0000
.
.
.
[ 9793 - 9808] 4788 e33a 474b c1b4 46cf 8a0f 4774 8e1f
[ 9809 - 9824] c632 662e c814 6b52 c7fb f665 47b8 af5f
[ 9825 - 9840] 4813 7b8b 474b c30c c72c e92d c612 dba9
Figure 3: An example of the default display format for data trace
number 1 from the example data set. Byte 3841 is the
first sample in the data trace. Byte 9840 is the last
byte of the last sample of the data trace. There are
6000 bytes in this data trace, with 4 bytes per sample,
for a total of 1500 samples per trace.
C1 NPRA LINE 624-79..CREATED 6/91..TAPE LIBRARY SLOT 12133
C2 GSI PARTY 1182..9.5 LINE MILES
C3 SPTS 1-57..DATA LENGTH 6000 MS..SAMPLE RATE 4 MS..6
FOLD...AGC 1000 MS
C4 SHOT POINT IN HEADER ESPNUM AT BYTE 17, 4 BYTES, INTEGER
C5 -------------------------------------------------------------
-----------
C6 NO WARRANTY EXPRESSED OR IMPLIED IS MADE BY THE U.S.
GEOLOGICAL SURVEY,
C7 DEPT OF THE INTERIOR, AS TO THE ACCURACY OF THE DATA &
RELATED MATERIALS
C8 PRESENTED HEREIN. THE ACT OF DISTRIBUTION SHALL NOT
CONSTITUTE ANY SUCH
C9 WARRANTY, AND NO RESPONSIBILITY IS ASSUMED BY THE U.S.
GEOLOGICAL SURVEY
C10 IN THE USE OF THESE DATA AND RELATED MATERIALS.
C11 -------------------------------------------------------------
-----------
C
C
C
.
.
.
C
Figure 4: An example of the EBCDIC header display initiated by
command line option "-e".
23
DUMPSEGY V1.0
[3201 - 3204] jobID 241 000000f1
[3205 - 3208] lineNumber 623779 000984a3
[3209 - 3212] reelNumber 1 00000001
[3213 - 3214] tracesPerRecord 48 0030
[3215 - 3216] auxTracesPerRecord 0 0000
[3217 - 3218] sampleRateReel 4000 0fa0
[3219 - 3220] sampleRateOrig 0 0000
[3221 - 3222] samplesPerTraceReel 1500 05dc
[3223 - 3224] samplesPerTraceOrig 1501 05dd
[3225 - 3226] dataFormatCode 1 0001
[3227 - 3228] CDPfold 48 0030
[3229 - 3230] traceSortCode 4 0004
[3231 - 3232] verticalSumCode 1 0001
[3233 - 3234] sweepFreqStart 0 0000
[3235 - 3236] sweepFreqEnd 0 0000
[3237 - 3238] sweepLength 0 0000
[3239 - 3240] sweepTypeCode 0 0000
[3241 - 3242] sweepChannelTraceNumber 0 0000
[3243 - 3244] sweepTraceTaperLengthStart 0 0000
[3245 - 3246] sweepTraceTaperLengthEnd 0 0000
[3247 - 3248] taperType 0 0000
[3249 - 3250] correlatedData 0 0000
[3251 - 3252] binaryGainRecovered 0 0000
[3253 - 3254] amplitudeRecovery 0 0000
[3255 - 3256] measurementSystem 1 0001
[3257 - 3258] impulseSignalPolarity 0 0000
[3259 - 3260] vibratoryPolarityCode 0 0000
Figure 5: An example of the binary header display initiated by
the command line option "-b".
24
DUMPSEGY V1.0
[ 3601 - 3604] traceSequenceNumberLine 1
00000001
[ 3605 - 3608] traceSequenceNumberReel 1
00000001
[ 3609 - 3612] origFieldRecordNumber 149
00000095
[ 3613 - 3616] fieldRecordTraceNumber 0
00000000
[ 3617 - 3620] energySourcePt 0
00000000
[ 3621 - 3624] cdpNumber 101
00000065
[ 3625 - 3628] traceCdpNumber 1
00000001
[ 3629 - 3630] traceIdNumber 1
0001
[ 3631 - 3632] verticallySummedTraces 1
0001
[ 3633 - 3634] horizontallyStackedTraces 1
0001
[ 3635 - 3636] dataUse 1
0001
[ 3637 - 3640] sourceToReceiver 0
00000000
[ 3641 - 3644] receiverElevation 0
00000000
[ 3645 - 3648] sourceSurfaceElevation 0
00000000
[ 3649 - 3652] sourceDepth 0
00000000
[ 3653 - 3656] receiverDatumElevation 0
00000000
[ 3657 - 3660] sourceDatumElevation 0
00000000
[ 3661 - 3664] sourceWaterDepth 0
00000000
[ 3665 - 3668] groupWaterDepth 0
00000000
[ 3669 - 3670] elevationScalar 1
0001
[ 3671 - 3672] coordinateScalar 1
0001
[ 3673 - 3676] sourceXCoordinate 0
00000000
[ 3677 - 3680] sourceYCoordinate 0
00000000
[ 3681 - 3684] groupXCoordinate 0
00000000
[ 3685 - 3688] groupYCoordinate 0
00000000
[ 3689 - 3690] coordinateUnits 1
0001
[ 3691 - 3692] weatheringVelocity 0
0000
25
DUMPSEGY V1.0
[ 3693 - 3694] subWeatheringVelocity 0
0000
[ 3695 - 3696] sourceUpholeTime 0
0000
[ 3697 - 3698] groupUpholeTime 0
0000
[ 3699 - 3700] sourceStaticCorrection 0
0000
[ 3701 - 3702] groupStaticCorrection 0
0000
[ 3703 - 3704] totalStaticApplied 0
0000
[ 3705 - 3706] lagTimeA 0
0000
[ 3707 - 3708] lagTimeB 0
0000
[ 3709 - 3710] delayRecordingTime 0
0000
[ 3711 - 3712] muteTimeStart 0
0000
[ 3713 - 3714] muteTimeEnd 6000
1770
[ 3715 - 3716] numberOfSamples 1500
05dc
[ 3717 - 3718] sampleInterval 4000
0fa0
[ 3719 - 3720] gainType 0
0000
[ 3721 - 3722] gainConstant 0
0000
[ 3723 - 3724] initialGain 0
0000
[ 3725 - 3726] correlated 0
0000
[ 3727 - 3728] sweepFrequencyStart 0
0000
[ 3729 - 3730] sweepFrequencyEnd 0
0000
[ 3731 - 3732] sweepLength 0
0000
[ 3733 - 3734] sweepType 0
0000
[ 3735 - 3736] sweepTraceTaperStart 0
0000
[ 3737 - 3738] sweepTraceTaperEnd 0
0000
[ 3739 - 3740] taperType 0
0000
[ 3741 - 3742] aliasFilterFrequency 0
0000
[ 3743 - 3744] aliasFilterSlope 0
0000
[ 3745 - 3746] notchFilterFrequency 0
0000
26
DUMPSEGY V1.0
[ 3747 - 3748] notchFilterSlope 0
0000
[ 3749 - 3750] lowCutFrequency 0
0000
[ 3751 - 3752] highCutFrequency 0
0000
[ 3753 - 3754] lowCutSlope 0
0000
[ 3755 - 3756] highCutSlope 0
0000
[ 3757 - 3758] yearRecorded 0
0000
[ 3759 - 3760] dayOfYear 0
0000
[ 3761 - 3762] hourOfDay 0
0000
[ 3763 - 3764] minuteOfHour 0
0000
[ 3765 - 3766] secondOfMinute 0
0000
[ 3767 - 3768] timeBasisCode 1
0001
[ 3769 - 3770] traceWeightingFactor 10
000a
[ 3771 - 3772] geophoneNumberRollSwitch1 0
0000
[ 3773 - 3774] geophoneNumberTrace1 0
0000
[ 3775 - 3776] geophoneNumberLastTrace 0
0000
[ 3777 - 3778] gapSize 0
0000
[ 3779 - 3780] overTravel 0
0000
Figure 6: An example of the data trace header display initiated
by command line option "-t".
27
DUMPSEGY V1.0
[ 3841 - 3856] +0.000000e+00 +0.000000e+00 +0.000000e+00
+0.000000e+00
[ 3857 - 3872] +0.000000e+00 +0.000000e+00 +0.000000e+00
+0.000000e+00
[ 3873 - 3888] +0.000000e+00 +0.000000e+00 +0.000000e+00
+0.000000e+00
.
.
.
[ 9777 - 9792] +2.087452e+08 +2.421491e+08 -6.184693e+07 -
4.641995e+07
[ 9793 - 9808] +1.435371e+08 +7.943661e+07 +1.360130e+07
+1.222169e+08
[ 9809 - 9824] -3.302958e+06 -3.425777e+08 -2.642018e+08
+1.936563e+08
[ 9825 - 9840] +3.268636e+08 +7.944211e+07 -4.709243e+07 -
1.235881e+06
Figure 7: An example of the floating point display format for
data trace number 1 from the example data set. Byte
3841 is the first sample in the data trace. Byte 9840
is the last byte of the last sample of the data trace.
There are 6000 bytes in this data trace, with 4 bytes
per sample, for a total of 1500 samples per trace.
=================================================================
======================== DUMPSEGY V2.0 ==========================
=================================================================
DUMPSEGY V2.0
Changes to the Program Version 1.0
DUMPSEGY V2.0 will determine which type of SEG-Y data is present
using the SEG-Y defined "data sample format code" read from bytes
3225-3226 of the binary coded file header. The SEG-Y defined
data sample format codes are shown below:
FORMAT CODE DATA SAMPLE FORMAT
----------- ---------------------------------
1 32 bit IBM floating point
2 32 bit fixed point
3 16 bit fixed point
4 16 bit fixed point with gain code
28