prep.spikes: Remove spikes from Raman spectra

View source: R/prep.R

prep.spikesR Documentation

Remove spikes from Raman spectra

Description

Removes spikes from Raman spectra using median absolute deviation computed for signal differences. See [1] for more details

Usage

prep.spikes(data, width = 5, threshold = 6)

Arguments

data

a matrix with data values

width

width of the moving median filter

threshold

threshold to compare modified z-score value with to detect the spike.

Value

data matrix with processed values

References

1. Darren A. Whitaker, Kevin Hayes, A simple algorithm for despiking Raman spectra, Chemometrics and Intelligent Laboratory Systems, 179, 2018, pp. 82-84, 10.1016/j.chemolab.2018.06.009.


mdatools documentation built on March 6, 2026, 5:08 p.m.