Learn R Programming

eseis (version 0.5.0)

signal_snr: Calculate signal-to-noise-ratio.

Description

The function calculates the signal-to-noise ratio of an input signal vector as the ratio between mean and max.

Usage

signal_snr(data, detrend = FALSE)

Arguments

data

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

detrend

Logical value, optionally detrend data set before calcualting snr.

Value

Numeric value, signal-to-noise ratio.

Examples

Run this code
# NOT RUN {
## load example data set
data(rockfall)

## calculate snr with detrend option off and on
snr <- signal_snr(data = rockfall_eseis)
print(snr$snr)

snr <- signal_snr(data = rockfall_eseis, 
                  detrend = TRUE)
print(snr$snr)
                     
# }

Run the code above in your browser using DataLab