\HeaderA{smoothDWT}{smooth (denoise) the spectrum by DWT (Discrete Wavelet Transform)}{smoothDWT}
\keyword{methods}{smoothDWT}
\begin{Description}\relax
Smooth (denoise) the spectrum by DWT (Discrete Wavelet Transform)
\end{Description}
\begin{Usage}
\begin{verbatim}
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'))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{ms}] a vector representing the mass spectrum 
\item[\code{nLevel}] the level of DWT decomposition 
\item[\code{wf}] the name of wavelet for DWT 
\item[\code{localNoiseTh}] local noise level threshold 
\item[\code{localWinSize}] local window size for estimate local noise threshold 
\item[\code{globalNoiseTh}] global noise level threshold 
\item[\code{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. 
\item[\code{method}] 'dwt' or 'modwt' used for decomposition 
\end{ldescription}
\end{Arguments}
\begin{Value}
return the smoothed mass spectrum with the 'detail' component of DWT as an attribute 'detail'.
\end{Value}
\begin{Author}\relax
Pan Du
\end{Author}

