read1segy: Read one SEGY/SAC file

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/read1segy.R

Description

Read one SEGY/SAC file

Usage

1
2
read1segy(fname, Iendian = 1, HEADONLY = FALSE, BIGLONG = FALSE)
read1sac(fname, Iendian = 1, HEADONLY = FALSE, BIGLONG = FALSE )

Arguments

fname

character, file name

Iendian

Endian of the input file name

HEADONLY

logical, TRUE=return only header (default=FALSE)

BIGLONG

logical, indicating whether long is 8 or 4 bytes.

Details

Segy format files are in integer format. The time series ususally represents counts recorded in a data acquisition system. The header includes meta-data and other identifying information.

SAC data is stored as floats, typically volts.

Value

list of header and times series

Note

The Endian-ness of the input files is set by the system that created them. If the read1segy or read1sac does not make sense, try a different endian or BIGLONG setting.

Author(s)

Jonathan M. Lees<[email protected]>

See Also

write1sac, write1segy, sac2rseis, segy2rseis, prepSEIS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 

fnames = list.files(path="/Users/lees/Site/Buf2014/ALL_SEGY",
                                     pattern=NULL, full.names=TRUE )

for(i in 1:length(fnames))
{
fn1  = fnames[i]

bed =  read1segy(fn1   , Iendian = 1 , HEADONLY=TRUE, BIGLONG=FALSE)
scaly[i] =  bed$HEAD$scale_fac
print(paste(i, fn1, bed$HEAD$station_name , bed$HEAD$channel_name,
       bed$HEAD$scale_fac, bed$HEAD$gainConst)  )

}



## End(Not run)

RSEIS documentation built on Aug. 23, 2018, 1:04 a.m.