Learn R Programming

MassSpecWavelet (version 1.38.0)

smoothDWT: smooth (denoise) the spectrum by DWT (Discrete Wavelet Transform)

Description

Smooth (denoise) the spectrum by DWT (Discrete Wavelet Transform)

Usage

smoothDWT(ms, nLevel = 6, wf = "la8", localNoiseTh = seq(1, 0, by = -0.2), localWinSize = 500, globalNoiseTh = 0.75, smoothMethod = c("soft", "hard"), method = c('dwt', 'modwt'))

Arguments

ms
a vector representing the mass spectrum
nLevel
the level of DWT decomposition
wf
the name of wavelet for DWT
localNoiseTh
local noise level threshold
localWinSize
local window size for estimate local noise threshold
globalNoiseTh
global noise level threshold
smoothMethod
the method used for denoising. 'hard' means keeping the dwt coefficients higher than the threshold unchanged; "soft" means the dwt coefficients higher than the threshold were subtracted by the threshold.
method
'dwt' or 'modwt' used for decomposition

Value

return the smoothed mass spectrum with the 'detail' component of DWT as an attribute 'detail'.

Details

References

Examples

Run this code

Run the code above in your browser using DataLab