\HeaderA{getLocalMaximumCWT}{Identify the local maximum of each column in 2-D CWT coefficients matrix}{getLocalMaximumCWT}
\keyword{methods}{getLocalMaximumCWT}
\begin{Description}\relax
Identify the local maximum of each column in 2-D CWT coefficients matrix by using a slide window.
The size of slide window linearly changes from the coarse scale (bigger window size) to detail scale.
The scale of CWT increases with the column index.
\end{Description}
\begin{Usage}
\begin{verbatim}
getLocalMaximumCWT(wCoefs, minWinSize= 5, amp.Th = 0)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{wCoefs}] 2-D CWT coefficients, each column corresponding to CWT coefficient at one scale. The column name is the scale.
\item[\code{minWinSize}] The minimum slide window size used.
\item[\code{amp.Th}] The minimum peak amplitude. 
\end{ldescription}
\end{Arguments}
\begin{Value}
return a matrix with same dimension as CWT coefficient matrix, wCoefs. The local maxima are marked as 1, others are 0.
\end{Value}
\begin{Author}\relax
Pan Du
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{localMaximum}{localMaximum}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
        data(exampleMS)
        scales <- seq(1, 64, 3)
        wCoefs <- cwt(exampleMS[5000:11000], scales=scales, wavelet='mexh')
        
        localMax <- getLocalMaximumCWT(wCoefs)
        plotLocalMax(localMax)
\end{ExampleCode}
\end{Examples}

