signal_spectrogram {eseis} | R Documentation |
Calculate spectrograms (power spectral density estimates) from time series.
Description
This function creates spectrograms from seismic signals. It supports the standard spectrogram approach and the Welch method.
Usage
signal_spectrogram(
data,
time,
dt,
Welch = FALSE,
window,
overlap = 0.5,
window_sub,
overlap_sub = 0.5,
method = "periodogram",
cpu = NULL,
plot = FALSE,
...
)
Arguments
data |
|
time |
|
dt |
|
Welch |
|
window |
|
overlap |
|
window_sub |
|
overlap_sub |
|
method |
|
cpu |
|
plot |
|
... |
Additional arguments passed to the function. |
Details
Data containing NA
values is replaced by zeros and set to NA in the
output data set.
Value
List
with spectrogram matrix, time and frequency vectors.
Author(s)
Michael Dietze
Examples
## load example data set
data("earthquake")
## calculate and plot PSD straight away
P <- signal_spectrogram(data = s$BHZ,
time = t,
dt = 1 / 200,
plot = TRUE)
## calculate and plot PSD with defined window sizes and the Welch method
P <- signal_spectrogram(data = s$BHZ,
time = t,
dt = 1 / 200,
window = 5,
overlap = 0.9,
window_sub = 3,
overlap_sub = 0.9,
Welch = TRUE,
plot = TRUE)