View source: R/convert2Rseis.R
convert2Rseis | R Documentation |
Convert Seismic in SAC or SEGY format to RSEIS native format.
convert2Rseis(FLS, NEWDIR = ".", kind = 1, Iendian = "little", BIGLONG =
FALSE, NEWsta = "", NEWcomp = "")
FLS |
array of File names |
NEWDIR |
Destination directory path |
kind |
an integer 1, 2, 3; 0=R(DAT) , 1 = segy, 2 = sac, 3 = AH. |
Iendian |
Endian-ness of the data: 1,2,3: "little", "big", "swap". Default = 1 (little) |
BIGLONG |
logical, TRUE=long=8 bytes |
NEWsta |
character vector, stations associated with the vector of files |
NEWcomp |
character vector, component name associated with the vector of files |
Converts the data to R format so it can be loaded with the load command. After this conversion, files should be loaded in subsequent calls by using kind=0.
Side effects - creates new files on local system
JGET.seis extracts digital seismic data from binary files stored in the file system. The program uses readBin for I/O and passes data back to R. Currently SAC, SEGY formats are installed but it is easy to extend. AH format is available for LINUX systems, but there were problems compiling in WINDOWS and MACOS so this feature was removed. A filter for mseed format is currently being developed.
Jonathan M. Lees<jonathan.lees@unc.edu>
JGET.seis, JSAC.seis , Mine.seis
Iendian = .Platform$endian
data(GH)
########## create some SAC files:
apath = tempdir()
J = rseis2sac(GH, sel = 1:5, path = apath, BIGLONG =FALSE )
#### get SAC file file names:
Lname <- list.files(path=J , pattern='SAC', full.names=TRUE)
##### convert each file to a saved RSEIS file, saved in apath
#### reading in SAC files, kind=2
convert2Rseis(Lname, NEWDIR = apath, kind = 2, Iendian = Iendian, BIGLONG =
FALSE )
#### check if files are there
list.files(path=apath)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.