heterovar               package:adlift               R Documentation

_h_e_t_e_r_o_v_a_r

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

     Estimates individual wavelet coefficient variances using a sliding
     window approach.

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

     heterovar(y, detail, al)

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

       y: a vector of the gridpoints of 'removelist' after executing
          the forward transform, in the order of the gridpoint vector.

  detail: the vector of detail coefficients after the forward transform
          has been performed, in the order of the gridpoint vector.

      al: The list of indices into 'removelist' divided into artificial
          levels.

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

     The function works out the interval endpoints for each gridpoint
     in 'removelist', based on an initial window length of one fifth of
     the range of 'y', and then adjusts them so that they lie within
     the range of 'y'. The indices of the 'removelist' points inside
     these intervals are then compared against the indices of the first
     artificial level for the data. These new indices are then used to
     compute the individual coefficient variances, based on the detail
     values of the new indices. If any of the window indices list
     entries contains less than four values, then the initial window
     length is increased by 5% and the process redone, until each
     window contains at least four coefficients.

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

     ep1: a two-column matrix with the (true) endpoints of the windows
          from which to calculate the coefficient variances (according
          to the specified window length). 

     ep2: a two-column matrix with the endpoints of the windows from
          which to calculate the coefficient variances (adjusted to be
          of the window length and within the range of 'y'). 

  idlist: a list of indices into 'y' showing the points each interval
          contains.

newidlist: a list of indices into 'y' showing the points each interval
          contains, which are also in the first artificial level.

   dlist: a list of detail coefficients which correspond to the indices
          in 'newidlist'.

  varvec: a vector of median absolute deviation values (from the
          median) for the coefficients in 'dlist'.

 varvec1: a vector of median absolute deviation values (from the
          median), centered at zero, for the coefficients in 'dlist'.

 varvec2: a vector of median absolute deviation values (from the
          median), centered at zero, for the coefficients in 'dlist'.

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

     Matt Nunes (matt.nunes@bristol.ac.uk), Marina Popa
     (Marina.Popa@bristol.ac.uk)

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

     'denoisehetero'

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

     x1<-runif(256)
     #
     y1<-make.signal2("doppler",x=x1)
     #
     fwd<-fwtnp(x1,y1,LocalPred=AdaptNeigh,neighbours=2)
     #
     y<-fwd$lengthsremove
     rem<-fwd$removelist
     al<-artlev1(y,rem)
     #
     yrem<-x1[sort(rem)]
     detail<-fwd$coeff[sort(rem)]
     #
     h<-heterovar(yrem,detail,al)
     #
     h$varvec[1:10]
     #
     #the first ten coefficient variances to be used in the normalisation of the detail 
     #coefficients

