\HeaderA{accessC.mwd}{Get Smoothed Data from Wavelet Structure}{accessC.mwd}
\keyword{manip}{accessC.mwd}
\begin{Description}\relax
The smoothed and original data from a multiple wavelet decomposition structure, \code{\LinkA{mwd.object}{mwd.object}}  ect  (e.g. returned from \code{\LinkA{mwd}{mwd}}) are packed into a single matrix in that structure.  TRUE  his function extracts the data corresponding to a particular resolution level.
\end{Description}
\begin{Usage}
\begin{verbatim}
accessC.mwd(mwd, level = mwd$nlevels, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{mwd}] Multiple wavelet decomposition structure from which you wish to extract the smoothed or original data if the structure is from a wavelet decomposition, or the reconstructed data if the structure is from a wavelet reconstruction.
\item[\code{level}] The level that you wish to extract. By default, this is the level with most detail (in the case of structures from a decomposition this is the original data, in the case of structures from a reconstruction this is the top-level reconstruction).
\item[\code{...}] any other arguments
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \LinkA{mwd}{mwd} function produces a wavelet decomposition structure.

For decomposition, the top level contains the original data, and subsequent lower levels contain the successively smoothed data. So if there are \code{mwd\$filter\$npsi*2\textasciicircum{}m} original data points (\code{mwd\$filter\$npsi} is the multiplicity of wavelets), there will be \code{m+1} levels indexed 0,1,...,m. So 

\code{accessC.mwd(Mwd, level=m)}

pulls out the original data, as does

\code{accessC.mwd(mwd)}

To get hold of lower levels just specify the level that you're interested in, e.g. 

\code{accessC.mwd(mwd, level=2)}

Gets hold of the second level.

The need for this function is a consequence of the pyramidal structure of Mallat's algorithm and the memory efficiency gain achieved by storing the pyramid as a linear matrix of coefficients. AccessC obtains information about where the smoothed data appears from the fl.dbase component of mwd, in particular the array \code{fl.dbase\$first.last.c} which gives a complete specification of index numbers and offsets for \code{mwd\$C}. 

Note also that this function only gets information from \LinkA{mwd}{mwd} class objects. To \emph{put} coefficients into \LinkA{mwd}{mwd} structures you have to use the \LinkA{putC.mwd}{putC.mwd} function. 

See Downie and Silverman, 1998.
\end{Details}
\begin{Value}
A matrix with \code{mwd\$filter\$npsi} rows containing the extracted data of all the coefficients at that level.
\end{Value}
\begin{Section}{RELEASE}
Version 3.9.6 (Although Copyright Tim Downie 1995-6.)
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{accessD.mwd}{accessD.mwd}}, \code{\LinkA{draw.mwd}{draw.mwd}}, \code{\LinkA{mfirst.last}{mfirst.last}}, \code{\LinkA{mfilter.select}{mfilter.select}}, \code{\LinkA{mwd}{mwd}}, \code{\LinkA{mwd.object}{mwd.object}}, \code{\LinkA{mwr}{mwr}}, \code{\LinkA{plot.mwd}{plot.mwd}}, \code{\LinkA{print.mwd}{print.mwd}}, \code{\LinkA{putC.mwd}{putC.mwd}}, \code{\LinkA{putD.mwd}{putD.mwd}}, \code{\LinkA{summary.mwd}{summary.mwd}}, \code{\LinkA{threshold.mwd}{threshold.mwd}}, \code{\LinkA{wd}{wd}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
#
# Get the 3rd level of smoothed data from a decomposition
#
#accessC.mwd(mwd(data), level=3)
\end{ExampleCode}
\end{Examples}

