Last chance! 50% off unlimited learning
Sale ends in
Mine a seismic data base to extract secions of time limited data
Mine.seis(at1, at2, DB, grepsta, grepcomp, kind = 1, Iendian=1,
BIGLONG=FALSE, CHOP=TRUE, verbose=FALSE, chtoken=NULL, statoken=NULL, RAW=FALSE)
List of seismograms cut from the database
time 1 in julian days
time 2 in julian days
data base structure to searcth through that provides the files where data is to extracted from
which stations to extract
which components to extract
kind of data, -1="RDS", 0="RDATA" , 0="RDATA", 1 = "segy", 2 = "sac"
Endian-ness of the data: 1,2,3: "little", "big", "swap". Default = 1 (little)
logical, TRUE=long=8 bytes
cut the data to a window using CHOP.SEISN
print out intermediate information for debugging
channel token for selecting channels (NULL)
station token for selecting stations (NULL)
logical, default=FALSE(convert to volts) , TRUE (return counts intead of volts)
Jonathan M. Lees<jonathan.lees.edu>
The data base is a list or dataframe containing the files names, the beginning time (t1) and ending time (t2) for each file in the data base. Mine.seis uses grep on the file names to extract specific files from the DB list.
Mine.seis needs to know what format the data was created in: little/big endian and the size of the LONG.
If data was created on a little endian machine but is being read on big endian machine, need to call the endian "swap" for swapping.
If data was created on a machine with LONG=4 bytes, be sure to call the program with BIGLONG=FALSE.
Use sysinfo to findout the system parameters for the local system. You need to know, however, what machine the binary files were created on.
In some situation the chanel name and the station name are not embedded in the file headers - in that case use the token from the file name.
makeDB, GLUEseisMAT, JGET.seis, JSAC.seis, JSEGY.seis, sysinfo
if (FALSE) {
####### Assume k97DB already exists
for(i in 1:24)
{
at1 <- 232+(i-1)/24
at2 <- at1+1/24
GH <- Mine.seis(at1, at2, k97DB, "kar1", c("4", "1") )
w <- swig(GH)
if(identical(w$but, "QUIT"))break
}
}
Run the code above in your browser using DataLab