Crewes Seismic I/O Library File Index. Function Documentation. Functions to access seimic header definitions, страница 6

Sets the data format for a new or existing SEG-Y file.

For new files, this sets the data format. For existing files, this overrides the dataformat stored within the file. This function is useful if a file has a data format which is incorrect.

Parameters:

dataFmt   The data format. Possible values are  SEISIO_FMT_AUTO SEISIO_FMT_F4IEEE SEISIO_FMT_F4IBM SEISIO_FMT_I4 SEISIO_FMT_I2

id   seisio file identification number

int seisio_setTrcLengthFmt (int id, int fmt)

Sets the file to be fixed-trace-length or variable-trace-length.

Parameters:

fmt   Supply one of FIXED_TRACE_LENGTH or VARIABLE_TRACE_LENGTH

id   seisio file identification number

Todo:

Handle the case when setTrcLengthFmt is called after we start writing to a file.

int seisio_writeFileDataHdr (int id, char * fileDataHdr)

Writes a file data header to a SEG-Y file.

A SEG-Y file data header (binary header) is required near the start of  all SEG-Y files. It consists of 400 bytes of numeric (non-human readable)  data -- containing about 100 header words. The most commonly used header words relate to number of samples per trace in the file. In reality, few of the data header words are usually set by software.  The seisioFileHdr_* functions should be used to read and/or write value  the file header prior to calling this function.

This function can be called at any time between seisio_open and seisio_close. It is most efficient however, if this function is called after seisio_writeFileHdr but before seios_writeTrc*.

Parameters:

id   seisio file identification number

trcNum   The trace number to read. The first trace number in a file is 1. If a trace number of 0 is specified, the trace will be read in sequential order.

trcHdr   Pointer to a buffer of memory, 240 bytes long, to be filled with the SEG-Y  formatted trace header. The seisioTrcHdr_* functions can be used to  access/modify this trace header.

trcData   An array to be filled with nSamp data samples. Unlike trcHdr, this  array will be byte-swapped and ready for use. Call seisio_getMaxNSamp to determine how long an array you need to supply.

Returns:

status code. A value of 0 means success.

Todo:

Handle outrageous values of trcNum. Allow for truncated trace-length reads so we can guess at numSmp and not scan the whole file.

int seisio_writeFileHdr (int id, char * fileHdr)

Writes the file header to a SEG-Y file.

This function writes the entire file header which is comprised of the "file text header"  (EBCDIC header) and "file data header"  (reel header).

Parameters:

id   seisio file identification number.

fileHdr   Array of characters containing the file header.

int seisio_writeFileTextHdr (int id, char * fileTextHdr)

Writes the text portion of file header to a SEG-Y file.

The file text header consists of 40 lines of text, where each line of text  is 80 columns wide. All SEG-Y files should contain a filled-out file text header.

This function can be called at any time between seisio_open and seisio_close.  It is most efficient however, if this function is called after seisio_open,  and before seisio_writeHdr (or seisio_writeTrc* for that matter).

Parameters:

id   seisio file identification number

fileTextHdr   An array of 3600 characters for writing to the file text header. This header is usually encoded in EBCDIC, not ASCII. The function seisioFileHdr_setText function should be called to populate this array of characters.

Returns:

0 if successful.

int seisio_writeTrcF4IBM (int id, const int trcNum, const int nSamp, char * trcHdr, float * trcData)

Writes a trace of 4-byte IBM floating point data and an associated trace header to a file.

Parameters:

id   seisio file identification number

trcNum   The trace number to write. The first trace number in a file is 1. If a trace number of 0 is specified, the trace will be written in sequential order.

nSamp   Number of samples in the trace (allowed to vary from trace to  trace).