This function converts seismic traces to sac files and writes them to disk.
write_sac(
data,
file,
time,
component,
unit,
station,
location,
network,
dt,
autoname = FALSE,
parameters,
biglong = FALSE
)
A binary file written to disk.
eseis
object or numeric
vector, data set to
be processed. Most other arguments can be omitted if data
is an
eseis
object.
Character
scalar, sac file name with extension.
POSIXct
vector, time vector corresponding to the
seismic trace. Alternatively, the start time stamp can be provided as
POSIXct
value and a value for dt
must be given.
Character
value, component ID, optional.
Character
value, unit of the signal, optional. One out
of "unknown"
, "displacement"
, "velocity"
,
"volts"
, "acceleration"
. Default is "unknown"
.
Character
value, station ID, optinal.
Character
vector of length four, station location
data (latitude, longitude, elevation, depth), optional.
Character
value, network ID, optional.
Numeric
value, sampling period. Only needed if no time
vector is provided.
Logical
value, option to let the function generate
the file name automatically. Default is FALSE
.
Data frame
sac parameter list, as obtained from
list_sacparameters
. Allows user-specific modifications. If this
data frame is provided, it overrides all other arguments.
Logical
value, biglong option, default is
FALSE
Michael Dietze
For description of the sac file format see https://ds.iris.edu/files/sac-manual/manual/file_format.html. Currently the following parameters are not supported when writing the sac file: LAT, LON, ELEVATION, NETWORK.
if (FALSE) {
## load example data
data("rockfall")
## write as sac file
write_sac(data = rockfall_eseis)
}
Run the code above in your browser using DataLab