Learn R Programming

RSEIS (version 4.2-4)

write1segy: Write One segy/sac file

Description

Write out one segy binary format file.

Usage

write1segy(alist, fn = NULL, BIGLONG = FALSE)
write1sac(alist, fn = NULL, BIGLONG = FALSE)

Value

Side effects in the file system.

Arguments

alist

list of traces with segy/sac header and an integer/real format time series

fn

Output file name

BIGLONG

logical, indicating whether long is 8 or 4 bytes.

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

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.

See Also

rseis2segy, read1sac, read1segy

Examples

Run this code

if (FALSE) {
 theENDIAN =  .Platform$endian
BIGLONG = FALSE
###  write1segy is in rseis2segy
data(KH)
apath = tempdir()
J = rseis2segy(KH, sel=1, path=apath, BIGLONG=BIGLONG )
L = list.files(path=J, full.names=TRUE)

Z = read1segy(L[1], Iendian = theENDIAN, HEADONLY = FALSE, BIGLONG = BIGLONG)
plot(Z$amp, type='l')

##########   same with SAC files:
J =  rseis2sac(KH, sel = 1, win = c(0, 1), path = apath, BIGLONG = BIGLONG)
L = list.files(path=J, pattern='.SAC', full.names=TRUE)

Z = read1sac(L[1], Iendian = theENDIAN, HEADONLY = FALSE, BIGLONG = BIGLONG)

plot(Z$amp, type='l')

}


Run the code above in your browser using DataLab