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

trcHdr   Pointer to a buffer of memory, 240 bytes long, containing the SEG-Y  formatted trace header. This memory should already be byte-swapped and  formatted for the outside world. The seisioTrcHdr_* functions help  do this for you.

trcData   An array of nSamp data samples. Unlike trcHdr, this array does not need to be byte-swapped for the outside world. 

Returns:

status code. A value of 0 means success.

Todo:

Handle outrageous values of nSamp and trcNum. Better (more descriptive) error handling.

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

Writes a trace of 4-byte IEEE 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).

trcHdr   Pointer to a buffer of memory, 240 bytes long, containing the SEG-Y  formatted trace header. This memory should already be byte-swapped and  formatted for the outside world. The seisioTrcHdr_* functions help  do this for you.

trcData   An array of nSamp data samples. Unlike trcHdr, this array does not need to be byte-swapped for the outside world.  

Returns:

status code. A value of 0 means success.

Todo:

Handle outrageous values of nSamp and trcNum. Better (more descriptive) error handling

int seisio_writeTrcI2 (int id, const int trcNum, const int nSamp, char * trcHdr, int16 * trcData)

Writes a trace of 2-byte integer 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).

trcHdr   Pointer to a buffer of memory, 240 bytes long, containing the SEG-Y  formatted trace header. This memory should already be byte-swapped and  formatted for the outside world. The seisioTrcHdr_* functions help  do this for you.

trcData   An array of nSamp data samples. Unlike trcHdr, this array does not need to be byte-swapped for the outside world. 

Returns:

status code. A value of 0 means success.

Todo:

Handle outrageous values of nSamp and trcNum. Better (more descriptive) error handling

int seisio_writeTrcI4 (int id, const int trcNum, const int nSamp, char * trcHdr, int32 * trcData)

Writes a trace of 4-byte integer 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).

trcHdr   Pointer to a buffer of memory, 240 bytes long, containing the SEG-Y  formatted trace header. This memory should already be byte-swapped and  formatted for the outside world. The seisioTrcHdr_* functions help  do this for you.

trcData   An array of nSamp data samples. Unlike trcHdr, this array does not need to be byte-swapped for the outside world. 

Returns:

status code. A value of 0 means success.

Todo:

Handle outrageous values of nSamp and trcNum. Better (more descriptive) error handling


seisioFileHdr.c File Reference

seismic file header object.

#include <stdio.h>

#include <stdlib.h>

#include "seisio.h"

#include "seisioFileHdr.h"

#include "seisioHdrDefn.h"

#include "seisioHdr.h"

#include "string.h"

Functions

·  int seisioFileHdr_new (int seisioHdrDefnID)

Creates a new seismic file header object instance.