SEGY Exchange Format
Despite its age, the SEGY data exchange format remains popular. Originally
designed for 1/2 inch tape, it has evolved into a disk format as well. It
consists of the following:
- Text Reel Header 3200 byte EBCDIC encoded 80 character records,
beginning with the letter “C”. Origins of EBCDIC (Expanded Binary Coded
Decimal) are with the main frame computers, largely built by IBM at the time
SEGY was created. This is not ASCII encoding, typical of today's personal
computers and work stations. As an aside, EBCDIC (29 key punch) evolved from
an
earlier, BCD (Binary Coded Decimal, 26 key punch), format. The use of IBM
cards is extremely rare today.
- Binary Reel Header 400 byte binary integer encoded information
about the entire reel of data. This is in Big Endian byte order (most
significant byte first).
Where the Seismic Unix (SU) program segywrite uses a pipe to the
dd program for the conversions between ASCII and EBCDIC, the BSU
program bcnv.c uses library functions found in
bsu-3.0.2/src/libIBM to do the conversions. The requisite functions
were downloaded from IBM in the original EBCDIC, converted to ASCII and then
edited to make the small static library libibm.a.
The reel headers are then followed by (trace header, data) signals. These are
encoded as follows for each signal:
- Trace Header 240 byte mixture of 2 byte and 4 byte integers as
defined in 6.1 above. Big Endian byte order.
- Data Each trace has the same number of digital samples, stored
in
either 4 byte IBM floating point, 4 byte integer, or 2 byte integer format.
Only one format is used in a data set. The sample interval is always the same
for all the traces. NOTE: The IBM floating point format is different than the
native format, IEEE floats, found on today's workstations and personal
computers
Both IBM and IEEE are 4 byte floats. This difference goes beyond byte order.
Program bcnv is used to convert between SEGY (exchange format above)
and BSEGY (used by the BSU software). If you really have data on tape,
recommend that you use Seismic Unix (SU) programs, segyread and
segywrite. The program, bcnv, has been updated. The current
version of bcnv will create SEGY data that can be read by SU program
segyread. The reverse direction is also true. That is, SEGY data
created by SU program segywrite can be read by BSU program
bcnv. This has been tested successfully on 4 byte floats.