if (FALSE) {
theENDIAN = .Platform$endian
BIGLONG = FALSE
### write1segy is in rseis2segy
data(KH)
apath = tempdir()
J = rseis2segy(KH, sel=1, path=apath, BIGLONG=BIGLONG )
L = list.files(path=J, full.names=TRUE)
Z = read1segy(L[1], Iendian = theENDIAN, HEADONLY = FALSE, BIGLONG = BIGLONG)
plot(Z$amp, type='l')
########## same with SAC files:
J = rseis2sac(KH, sel = 1, win = c(0, 1), path = apath, BIGLONG = BIGLONG)
L = list.files(path=J, pattern='.SAC', full.names=TRUE)
Z = read1sac(L[1], Iendian = theENDIAN, HEADONLY = FALSE, BIGLONG = BIGLONG)
plot(Z$amp, type='l')
}
Run the code above in your browser using DataLab