getpacket.wpst          package:wavethresh          R Documentation

_G_e_t _p_a_c_k_e_t _o_f _c_o_e_f_f_i_c_i_e_n_t_s _f_r_o_m _a _n_o_n-_d_e_c_i_m_a_t_e_d _w_a_v_e_l_e_t _p_a_c_k_e_t _o_b_j_e_c_t (_w_p_s_t).

_D_e_s_c_r_i_p_t_i_o_n:

     This function extracts and returns a packet of coefficients from a
     non-decimated wavelet packet ('wpst') object.

_U_s_a_g_e:

     getpacket.wpst(wpst, level, index, ... )

_A_r_g_u_m_e_n_t_s:

    wpst: Non-decimated wavelet packet object from which you wish to
          extract the packet from.

   level: The resolution level of the coefficients that you wish to
          extract. Can range from 0 to 'nlevels'(wpst). The
          coefficients at level 'nlevels' are the data the created the
          'wpst.object'.  

   index: The index number within the resolution level of the packet of
          coefficients that you wish to extract. Index ranges from 0 to
          (4^r)-1 where 'r = nlevels - level'. 

     ...: any other arguments

_D_e_t_a_i_l_s:

     The 'wpst' transform produces a non-decimated wavelet packet
     object. This is a "cross" between a 'wavelet packet' object and a
     'non-decimated wavelet' object. In other words the transform
     produces _wavelet packet_ coefficients at every possible integer
     shift (unlike the ordinary wavelet packet transform which is
     aligned to a dyadic grid). 

     Each packet of coefficients is obtained by chaining together the
     effect of the two _packet operators_ DG and DH: these are the high
     and low pass quadrature mirror filters of the Mallat pyramid
     algorithm scheme followed by both even _and_ odd decimation. For a
     full description of this algorithm and how coefficients are stored
     within see Nason, Sapatinas and Sawczenko, 1998. 

     Note that this function extracts _packets_. If you want to obtain
     the wavelet packet coefficients for each shift you need to use the
     'accessD.wpst'function. This function extracts particular wavelet
     packet coefficients for a particular shift. In particular, this
     function returns a number of coefficients dependent on the scale
     level requested whereas 'accessD.wpst' always returns a vector of
     coefficients of length equal to the input data that created the
     'wpst.object' initially.

_V_a_l_u_e:

     A vector containing the packet of non-decimated wavelet packet
     coefficients that you wished to extract.

_R_E_L_E_A_S_E:

     Version 3.9 Copyright Guy Nason 1998

_S_e_e _A_l_s_o:

     'accessD.wpst', 'wpst',

_E_x_a_m_p_l_e_s:

     #
     # Create some random data
     #
     #myrand <- rnorm(16)
     #myrand
     # [1]  0.19268626 -0.41737181 -0.30806613  0.07435407  0.99871757
     # [6] -0.58935121 -1.38049759 -0.13346631  1.55555403 -1.60581265
     #[11]  0.14353621  1.21277774  1.13762337 -1.08577934 -0.29745609
     #[16]  0.50977512
     #
     # Do the non-decimated wavelet packet transform
     #
     #myrwpst <- wpst(myrand)
     #
     # Let's access what is a level nlevels(myrwpst)
     #
     #getpacket(myrwpst, nlevels(myrwpst), index=0)
     # [1]  0.19268626 -0.41737181 -0.30806613  0.07435407  0.99871757
     # [6] -0.58935121 -1.38049759 -0.13346631  1.55555403 -1.60581265
     #[11]  0.14353621  1.21277774  1.13762337 -1.08577934 -0.29745609
     #[16]  0.50977512
     #
     # I.e. the data that created the object.
     #
     # How about extracting the 3rd (last) packet at level 3?
     #
     #getpacket(myrwpst, 3, index=3)
     #[1] -2.660657144  0.688415755 -1.764060698  0.717267105 -0.206916242
     #[6] -0.659983747  0.005836952 -0.196874007
     #
     # Of course, there are only 8 coefficients at this level.

