Learn R Programming

RSEIS (version 4.1-1)

JSAC.seis: JSAC.seis

Description

Read SEGY/SAC format binary data

Usage

JSAC.seis(fnames, Iendian = 1 , HEADONLY=FALSE,
BIGLONG=FALSE, PLOT = -1, RAW=FALSE)
JSEGY.seis(fnames, Iendian = 1 , HEADONLY=FALSE,
BIGLONG=FALSE, PLOT = -1, RAW=FALSE)

Value

List containing the seismic data and header information. Each trace consists of a list with:

fn

original file name

sta

station name

comp

compnent

dt

delta t in seconds

DATTIM

time list

yr

year

jd

julian day

mo

month

dom

day of month

hr

hour

mi

minute

sec

sec

msec

milliseconds

dt

delta t in seconds

t1

time start of trace

t2

time end of trace

off

off-set

N

number of points in trace

units

units

amp

vector of trace values

HEAD

Full header as a data-frame of values (mixture of float and character strings)

N

Number of samples in trace

units

Units of samples, possibly: counts, volts, s, m/s, Pa, etc

IO

list: kind, Iendian, BIGLONG flags for I/O

Arguments

fnames

vector of file names to be extracted and converted.

Iendian

vector, Endian-ness of the data: 1,2,3: "little", "big", "swap". Default = 1 (little)

HEADONLY

logical, TRUE= header information only

BIGLONG

logical, TRUE=long=8 bytes

PLOT

integer, <0 no plot; 0 interactive; >0 number of seconds to sleep

RAW

logical, default=FALSE(convert to volts) , TRUE (return counts intead of volts)

Author

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

Details

Uses readBin to extract data in SAC format. user must know what kind of machine the data was created on for I/O purposes.

For SEGY data the program is the same, although SEGY data does not have the problem of the BIGLONG so that is ignored.

For either code, a full header is returned, although the header for each format may be different.

See Also

Mine.seis

Examples

Run this code

if (FALSE) {


####  this will return a list of traces
Lname  <-  list.files(path='/data/wadati/bourbon/LaurelCanNC/R005.01' ,
 pattern="08.005.01.41.23.9024", full.names=TRUE)

S1   <-  JSAC.seis(Lname, Iendian = 1, PLOT = -1)


#####################   from a data base example: this will return one
#####                    trace header
f1  <-  DB$fn[200]

j1  <-  JSAC.seis(f1, Iendian=1, HEADONLY=TRUE , BIGLONG=FALSE, PLOT=-1)

print( j1[[1]]$HEAD )


#############   example for SEGY data: one SEGY  header

dir  <-  "/data/wadati/soju/SEISMIC_DATA/Reventador2005/rev05/SEGY/R251.01"
lf  <-  list.files(path=dir, pat="05.251", full.names=TRUE)
f1  <-  lf[1]
j1  <-  JSEGY.seis(f1, Iendian=1, HEADONLY=TRUE , BIGLONG=FALSE, PLOT=-1)


print( j1[[1]]$HEAD )

}




Run the code above in your browser using DataLab