Calculate the detail sequences for wavelet transform crystals.

USAGE:

wavDetail( x, level = 3, osc = 2 )

DESCRIPTION:

Let W(j,n) be a discrete wavelet packet crystal where j is the decomposition level and n is the oscillation index. The detail sequence D(j,t) is formed (essentially) by reconstructing the transform after zeroing out all other crystals except W(j,n). Since the DWT and MODWT are subsets of the DWPT and MODWPT, respectively, their crystals can also be converted to detail sequences. The wavDetail function calculates the details for a DWT, MODWT, DWPT, or MODWPT in an optimized way.

REQUIRED ARGUMENTS:

x
An object of class WaveletTransform or WaveletPacket.

OPTIONAL ARGUMENTS:

level
An integer (vector) containing the decomposition level(s) corresponding to the crystal(s) to be decomposed. Default: If the input is of class WaveletTransform, then the default is to return the details at all levels of the transform, i.e. a full multiresolution decomposition. If the input is of class WaveletPacket, then the default is to return the details of the last (highest) decomposition level.
osc
An integer (vector) containing the oscillation indices corresponding to the crystal(s) to be decomposed. Default: the default values are coordinated with that of the level argument.

VALUE:

result
An object of class decompose.

REFERENCES:

(1) D. B. Percival and A. T. Walden, ``Wavelet Methods for Time Series Analysis'', Cambridge University Press, 2000.

SEE ALSO:

, , , , , , .

EXAMPLES:

   ## calculate various wavelet transforms of the
   ## first difference of the atomic clock sequence
   x <- diff( as.vector( atomclock ) )
   x.dwt <- wavDWT(x, n.levels = 3)
   x.dwpt <- wavDWPT(x, n.levels = 3)
   x.modwt <- wavMODWT(x, n.levels = 3)
   x.modwpt <- wavMODWPT(x, n.levels = 3)

   ## calculate the wavelet details for all crystals
   ## of the DWT
   ## and MODWT
   wavDetail( x.dwt )
   wavDetail( x.modwt )

   ## calculate the wavelet details for the last level
   ## of the DWPT and MODWPT
   wavDetail( x.dwpt )
   wavDetail( x.modwpt )

   ## calculate the wavelet details for all crystals in
   ## the second level of the DWPT
   wavDetail( x.dwpt, level = 2 )

   ## calculate the detail for crystal W(3,2)
   ## of the MODWPT
   wavDetail( x.modwpt, level = 3, osc = 2 )

   ## calculate the detail for crystal W(3,2)
   ## of the DWPT
   wavDetail( x.dwpt, level = 3, osc = 2 )

   ## plot the wavelet details for levels
   ## 1 and 3 of the MODWT
   plot( wavDetail( x.modwt, level = c(1,3) ) )