Description Usage Arguments Details Value References See Also Examples
Forms a multiresolution decomposition (MRD) by taking a specified discrete wavelet transform of the input spectrum and subsequently inverting each level of the transform back to the "time" domain. The resulting components of the MRD form an octave-band decomposition of the original spectrum, and can be summed together to reconstruct the original spectrum. Summing only a subset of these components can be viewed as a denoising operation if the "noisy" components are excluded from the summation.
1 2 3 4 | msDenoiseMRD(x, wavelet="s8",
levels=1, xform="modwt", reflect=TRUE,
keep.smooth=TRUE, keep.details=TRUE,
process="msDenoiseMRD")
|
x |
A vector containing a uniformly-sampled real-valued time series. |
keep.details |
A logical value. If |
keep.smooth |
A logical value. If |
levels |
An integer vector of integers denoting the MRD detail(s) to sum over in forming
a denoised approximation to the orginal spectrum (the summation is performed across scale and nto across time).
All values must be positive integers,
and cannot exceed |
process |
A character string denoting the name of the
process to register with the (embedded) event history object of the input
after processing the input data. This process is not updated if it
already exists in the event history. Default: |
reflect |
A logical value. If |
wavelet |
A character string denoting the filter type.
See |
xform |
A character string denoting the wavelet transform type.
Choices are |
Performs a level J decimated or undecimated discrete wavelet transform on the input series and inverts the transform at each level separately to produce details D1,...,DJ and smooth SJ. The decomposition is additive such that the original series X may be reconstructed ala X=D1 + D2 + ... DJ + SJ. As the effective wavelet filters at level j are nominally associated with approximate band pass filters, the details Dj correspond approximately to normalized frequencies on the interval [1/2^(j+1), 1/2^j], while the content of the smooth SJ corresponds approximately to normalized frequencies [0, 1/2^(J+1)]. The collection of details and smooth form a multiresolution decomposition (MRD).
With the intent of removing unwanted noise events,
a summation over a subset of MRD components may be
calculated yielding a smooth approximation to the
original spectrum. For example, summing all MRD components
beyond D1 is tantamount to a low-pass filtering
of the original spectrum (whether or not this is a relevant
and sufficient noise removal technique is left to the discretion
of the practitioner). This function allows the user to specify
the decomposition levels they wish to sum over in order to form
a multiresolution approximation. The inclusion of the last level's smooth
in the summation is controlled by the optional keep.smooth
argument.
The user may also select either a decimated wavelet transform (DWT) or an undecimated wavelet transform (MODWT). However, we recommend that the user stick with the MODWT for the following reasons:
Unlike the DWT, the MODWT is translation invariant, meaning that a (circular) shift of the input spectrum will result in a corresponding (circular) shift of the transform coefficients.
The MODWT coefficients are a result of cycle-spinning, where averages are taken over all unique DWTs resulting from various circular shifts of the original spectrum. The resulting MODWT MRD is relatively more smooth than the corresponding DWT MRD.
Unlike the DWT MRD, the MODWT MRD produces components that are associated with exactly zero phase filter operations such that events (such as peaks) in the details and smooth line up exactly with those of the original spectrum in TOF (or m/z).
The DWT is faster than the MODWT, but the MODWT is still quite fast, requiring multiplication and summation operations on the same order as the popular Fast Fourier Transform.
A vector containing the denoised series.
D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.
T.W. Randolph and Y. Yasui, Multiscale Processing of Mass Spectrometry Data, Biometrics, 62:589–97, 2006.
T.W. Randolph, Scale-based normalization of spectral data, Disease Biomarkers, 2:135–144, 2006.
msDenoise
, msDenoiseWaveletThreshold
, msNoise
,
wavDaubechies
, wavDWT
, wavMODWT
,
wavMRD
, msSmoothLoess
, msSmoothSpline
,
msSmoothKsmooth
, msSmoothSupsmu
, msSmoothApprox
,
msDenoiseSmooth
, eventHistory
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | if (!exists("qcset")) data("qcset", package="msProcess")
## obtain a subset of a mass spectrum and add some
## noise
x <- qcset$intensity[5000:7000,1]
sd.noise <- 2
set.seed(100)
xnoise <- x + rnorm(length(x), sd=sd.noise)
mz <- as.matrix(as.numeric(names(x)))
## define two different ranges of summation levels
lev1 <- 6:8
lev2 <- 4:8
## calculate MODWT MRDs over these levels
z1 <- msDenoiseMRD(xnoise, levels=lev1)
z2 <- msDenoiseMRD(xnoise, levels=lev2)
## plot the results
Slab <- "S8"
lab1 <- paste(paste("D", lev1, sep="", collapse="+"), Slab, sep="+")
lab2 <- paste(paste("D", lev2, sep="", collapse="+"), Slab, sep="+")
msPlot(matlines=list(
list(x=mz, y=cbind(z1, z2), lty=1, lwd=3),
list(x=mz, y=cbind(xnoise, xnoise), type="p", pch="o", cex=0.15)),
yref=FALSE, xlab="m/z", ylab="MODWT MRD",
text=list(x=rep(8300,2), y=c(2300,1650),
labels=c(lab2,lab1), adj=0, col=2:1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.