signal_spectrum function

Calculate the spectrum of a time series

Calculate the spectrum of a time series

The power spectral density estimate of the time series is calculated using different approaches.

signal_spectrum(data, dt, method = "periodogram", n, res, log = FALSE, ...)

Arguments

  • data: eseis object, numeric vector or list of objects, data set to be processed.

  • dt: Numeric value, sampling period. If omitted, dt

    is set to 1/200. Only needed if data is no eseis object.

  • method: Character value, calculation method. One out of "periodogram" and "autoregressive". default is "periodogram".

  • n: Numeric value, optional number of samples in running window used for smoothing the spectrogram. Only applied if a number is provided. Smoothing is performed as running mean.

  • res: Numeric value, optional resolution of the spectrum, i.e. the number of power and frequency values. If omitted, the full resolution is returned. If used, a spline interpolation is performed.

  • log: Logical value, option to interpolate the spectrum with log spaced frequency values. Default is FALSE.

  • ...: Additional arguments passed to the function.

Returns

Data frame with frequency and power vector

Details

If the res option is used, the frequency and power vectors will be interpolated using a spline interpolator, using equally spaced frequency values. If desired, the additional option log = TRUE can be used to interpolate with log spaced frequency values.

Examples

## load example data set data(rockfall) ## calculate spectrum with standard setup s <- signal_spectrum(data = rockfall_eseis) ## plot spectrum plot_spectrum(data = s)

Author(s)

Michael Dietze

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

Useful links