Finds local maxima in sequential data.

peaks_find(object, ...)

# S4 method for GammaSpectrum
peaks_find(object, method = c("MAD"), SNR = 2, span = NULL, ...)

Arguments

object

A GammaSpectrum or PeakPosition object.

...

Extra parameters to be passed to internal methods.

method

A character string specifying the method to be used for background noise estimation (see below).

SNR

An integer giving the signal-to-noise-ratio for peak detection (see below).

span

An integer giving the half window size (in number of channels). If NULL, 5% of the number of channels is used as the half window size.

Value

An object of class PeakPosition.

Details

A local maximum has to be the highest one in the given window and has to be higher than \(SNR \times noise\) to be recognized as peak.

The following methods are available for noise estimation:

MAD

Median Absolute Deviation.

See also

Other signal processing: baseline, signal_integrate(), signal_slice(), signal_stabilize(), smooth()

Author

N. Frerebeau

Examples

## Import a Canberra CNF file spc_file <- system.file("extdata/LaBr.CNF", package = "gamma") spc <- read(spc_file) ## Find peaks (pks <- peaks_find(spc))
#> 2 peaks were detected: #> channel energy #> 1 35 94.93504 #> 2 496 1491.71339
plot(spc, pks)