write_mseed function

Write seismic traces as mseed file to disk.

Write seismic traces as mseed file to disk.

This function converts seismic traces to mseed files and writes them to disk. It makes use of the Python library 'ObsPy'. Thus, this software must be installed, to make use of this function.

write_mseed(data, file, time, component, station, location, network, dt)

Arguments

  • data: eseis object or numeric vector, data set to be processed. Most other arguments can be omitted if data is an eseis object.
  • file: Character scalar, mseed file name with extension.
  • time: 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.
  • component: Character value, component ID, optional.
  • station: Character value, station ID, optional.
  • location: Character vector of length four, station location data (latitude, longitude, elevation, depth), optional.
  • network: Character value, network ID, optional.
  • dt: Numeric value, sampling period. Only needed if no time vector is provided.

Returns

A binary file written to disk.

Details

The ObsPy Python library can be installed following the information provided here: "https://github.com/obspy/obspy/wiki".

Since the ObsPy functionality through R is not able to interpret path definitions using the tilde symbol, e.g. "~/Downloads", this Linux type definition must be avoided.

Examples

## Not run: ## load example data data("rockfall") ## write as mseed file write_mseed(data = rockfall_eseis, file = "rockfall.mseed") ## End(Not run)

Author(s)

Michael Dietze

  • Maintainer: Michael Dietze
  • License: GPL-3
  • Last published: 2025-03-25

Useful links