Learn R Programming

RSEIS (version 4.2-4)

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, rseis2sac

Examples

Run this code

#####  make some SAC files, then read them in
data(GH)
apath = tempdir()
##  setwd(apath)
## apath = 'TEMP'
J =  rseis2sac(GH, sel =1:5,  path = apath, BIGLONG =FALSE )

####### next read them in
Lname  <-  list.files(path=J , pattern='SAC', full.names=TRUE)

S1   <-  JSAC.seis(Lname, Iendian = .Platform$endian, BIGLONG =FALSE ,  PLOT = -1)

####  check just the first one
i = 1
  plotGH(S1[[i]])


Run the code above in your browser using DataLab