This function is generic (see Methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include:
atrous, cp.crystal, cp.crystal.2d, cpt, cpt.2d, decompose, dwt, dwt.molecule, molecule, nd.dwt, rob.dwt, wp.crystal, wp.crystal.2d, wp.nd.crystal, wpt, wpt.2d.
reconstruct(x, rob.resid=F)
For 2-D transforms, a reconstructed image with the same dimensions as the original image.
For the non-decimated wavelet transform and crystals, the reconstructed signal is the average of the reconstructions from low-pass and high-pass filters, which is equivalent to the average over the decimations.
For cosine packet transforms and crystals, the inverse transform is obtained by applying the inverse DCT followed by the appropriate untapering operator.
For molecules and atoms, the inverse transform is obtained by first converting the molecule or atom to a wavelet packet or cosine packet transform, and then inverting that transform.
See the section "Pyramid Algorithm" and the chapter "Algorithms and Filters" of the S+WAVELETS User's Manual for more details about inverse transforms.
xx <- rnorm(511) # white noise of length 511 yy <- dwt(xx, wavelet="bs2.4", boundary="reflection") zz <- reconstruct(yy) # reconstruct from wavelet coefficients vecnorm(xx-zz) # check perfect reconstructionyy <- make.signal("twochirp", 129) ww <- wp.table(yy, wavelet="s8", boundary="zero", n.level=3) bb <- best.basis(ww) # select the best basis zz <- reconstruct(bb) # reconstruct from the best basis vecnorm(yy-zz) # check perfect reconstruction