align                package:wavelets                R Documentation

_A_l_i_g_n _W_a_v_e_l_e_t _T_r_a_n_s_f_o_r_m _C_o_e_f_f_i_c_i_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Aligns both wavelet (high pass) and scaling (low pass)
     coefficients of objects of class 'dwt', 'modwt', 'dwpt', and
     'modwpt' using phase shift values computed by 'wt.filter.shift'.

_U_s_a_g_e:

     align(wt, coe=FALSE, inverse=FALSE)

_A_r_g_u_m_e_n_t_s:

      wt: An object of class 'dwt', 'modwt', 'dwpt', or 'modwpt'.

     coe: Logical value indicating whether to use center of energy
          method in computing phase shifts.

 inverse: Logical value indicating whether to shift wavelet and scaling
          coefficients of an aligned object back to their original
          positions.

_D_e_t_a_i_l_s:

     An object of class 'dwt', 'modwt', is characterized as 'unaligned'
     if the value in the 'aligned' slot is 'FALSE'. Similarly, these
     objects are classified as 'aligned' if the value in the 'aligned'
     slot is 'TRUE'. Thus, 'align' will only operate on an 'unaligned'
     wavelet transform object if 'inverse = FALSE' and on an 'aligned'
     wavelet transform object if 'inverse = TRUE'.

     The argument 'coe' is passed to the 'wt.filter.shift' function to
     determine what method to use for computing phase shifts (see
     documentation for 'wt.filter.shift').

_V_a_l_u_e:

     Either an aligned or unaligned object of the same class as 'wt'
     (see Details above).

_A_u_t_h_o_r(_s):

     Eric Aldrich. ealdrich@gmail.com.

_R_e_f_e_r_e_n_c_e_s:

     Percival, D. B. and A. T. Walden (2000) _Wavelet Methods for Time
     Series Analysis_, Cambridge University Press.

_S_e_e _A_l_s_o:

     'wt.filter.shift', 'dwt', 'modwt'.

_E_x_a_m_p_l_e_s:

     # obtain the two series listed in Percival and Walden (2000), page 42
     X1 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,.7,.9,0,.3)
     X2 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,-.7,.9,0,.3)

     # combine them and compute DWT
     newX <- cbind(X1,X2)
     wt <- dwt(newX, n.levels=3, boundary="reflection", fast=FALSE)

     # align
     wt.aligned <- align(wt)

