Learn R Programming

eseis (version 0.6.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)

Value

Numeric value, signal-to-noise ratio.

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.

Author

Michael Dietze

Examples

Run this code

## 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