50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


RSEIS (version 3.3-3)

JSAC.seis: JSAC.seis

Description

Read SEGY/SAC format binary data

Usage

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

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 0="" no="" plot;="" interactive;="">0 number of seconds to sleep
RAW
logical, default=FALSE(convert to volts) , TRUE (return counts intead of volts)

Value

  • List containing the seismic data and header information. Each trace consists of a list with:
  • fnoriginal file name
  • stastation name
  • compcompnent
  • dtdelta t in seconds
  • DATTIMtime list
  • yryear
  • jdjulian day
  • momonth
  • domday of month
  • hrhour
  • miminute
  • secsec
  • msecmilliseconds
  • dtdelta t in seconds
  • t1time start of trace
  • t2time end of trace
  • offoff-set
  • Nnumber of points in trace
  • unitsunits
  • ampvector of trace values
  • HEADFull header as a data-frame of values (mixture of float and character strings)
  • NNumber of samples in trace
  • unitsUnits of samples, possibly: counts, volts, s, m/s, Pa, etc
  • IOlist: kind, Iendian, BIGLONG flags for I/O

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
####  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