signal_snr | R Documentation |
The function calculates the signal-to-noise ratio of an input signal vector as the ratio between mean and max.
signal_snr(
data,
scale = "lin",
detrend = FALSE,
envelope = FALSE,
method = "max-mean"
)
data |
|
scale |
|
detrend |
|
envelope |
|
method |
|
Numeric
value, signal-to-noise ratio.
Michael Dietze
## load example data set
data(rockfall)
## remove mean and calculate envelope beforehand
x_prep <- signal_envelope(signal_detrend(rockfall_eseis))
## calculate snr
snr <- signal_snr(data = x_prep)
print(snr$snr)
## calculate snr with preprocessing during function call, and in dB scale
snr_dB <- signal_snr(data = rockfall_eseis, detrend = TRUE,
envelope = TRUE, scale = "dB")
print(snr_dB$snr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.