segy.c File Reference

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <assert.h>
#include <sys/types.h>
#include "common.h"

Include dependency graph for segy.c:

Go to the source code of this file.

Functions

void UpdateSegyHeader (int ch)
void InitSegyHeader (int ch)
FILE * OpenSegyChannel (int channel)
 open a segy file for output
void CloseSegyFile (int channel)
 end a SEGY channel file The segy header is updated according to the previous information structure
void AbortSegyFile (int channel)
 cancel a SEGY channel file
void AddSegyData (int channel)
 process one channel

Variables

struct SegyHead segyHeader [MAX_CHANNEL]
FILE * segyChannelFile [MAX_CHANNEL]
char segyChannelFileName [MAX_CHANNEL][128]


Function Documentation

void AbortSegyFile ( int  channel  ) 

cancel a SEGY channel file

Parameters:
channel the channel to cancel

Definition at line 294 of file segy.c.

References PrintDebug, segyChannelFile, and segyChannelFileName.

Referenced by AddSegyData().

void AddSegyData ( int  channel  ) 

process one channel

Definition at line 306 of file segy.c.

References AbortSegyFile(), HWConfigType::data, HWConfig, infoHeader, InfoHeaderType::npts, Titan2SRType::npts, OpenSegyChannel(), PrintError, segyChannelFile, segyChannelFileName, HWConfigType::srExp, and HWConfigType::srObs.

Referenced by EndSuperFrame().

Here is the call graph for this function:

void CloseSegyFile ( int  channel  ) 

end a SEGY channel file The segy header is updated according to the previous information structure

Parameters:
channel the channel to close

Definition at line 265 of file segy.c.

References FileName(), fileNameOptions, infoHeader, noWrite, InfoHeaderType::npts, PrintLog, Rename(), segyChannelFile, segyChannelFileName, segyHeader, and UpdateSegyHeader().

Referenced by FlushDataFiles().

Here is the call graph for this function:

void InitSegyHeader ( int  ch  ) 

Definition at line 202 of file segy.c.

References Titan2SRType::div, infoHeader, segyHeader, InfoHeaderType::sr, and station.

Referenced by OpenSegyChannel().

FILE* OpenSegyChannel ( int  channel  ) 

open a segy file for output

Parameters:
channel the channel number
Returns:
the correponding FILE* pointer, NULL on error

Definition at line 235 of file segy.c.

References FILE_BUFFER_SIZE, InitInfoHeader(), InitSegyHeader(), OpenTempFile(), PrintError, segyChannelFile, segyChannelFileName, and segyHeader.

Referenced by AddSegyData().

Here is the call graph for this function:

void UpdateSegyHeader ( int  ch  ) 

Definition at line 166 of file segy.c.

References correctedTime, infoHeader, InfoHeaderType::npts, segyHeader, and UpdateInfoHeader().

Referenced by CloseSegyFile().

Here is the call graph for this function:


Variable Documentation

FILE* segyChannelFile[MAX_CHANNEL]

Initial value:

 {
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
}

Definition at line 156 of file segy.c.

Referenced by AbortSegyFile(), AddSegyData(), CloseSegyFile(), and OpenSegyChannel().

char segyChannelFileName[MAX_CHANNEL][128]

Definition at line 163 of file segy.c.

Referenced by AbortSegyFile(), AddSegyData(), CloseSegyFile(), and OpenSegyChannel().

struct SegyHead segyHeader[MAX_CHANNEL]

Definition at line 155 of file segy.c.

Referenced by CloseSegyFile(), InitSegyHeader(), OpenSegyChannel(), and UpdateSegyHeader().


Generated on Tue Jul 22 23:11:57 2008 for Titan2Reader by  doxygen 1.5.6