cwt             package:MassSpecWavelet             R Documentation

_C_o_n_t_i_n_u_o_u_s _W_a_v_e_l_e_t _T_r_a_n_s_f_o_r_m (_C_W_T)

_D_e_s_c_r_i_p_t_i_o_n:

     CWT(Continuous Wavelet Transform) with Mexican Hat wavelet (by
     default) to match the peaks in Mass Spectrometry spectrum

_U_s_a_g_e:

     cwt(ms, scales = 1, wavelet = "mexh")

_A_r_g_u_m_e_n_t_s:

      ms: Mass Spectrometry spectrum (a vector of MS intensities)

  scales: a vector represents the scales at which to perform CWT. 

 wavelet: The wavelet base, Mexican Hat by default. User can provide
          wavelet Psi(x) as a form of two row matrix. The first  row is
          the x value, and the second row is Psi(x) corresponding to x.            

_V_a_l_u_e:

     The return is the 2-D CWT coefficient matrix, with column names as
     the scale. Each column is the CWT coefficients at that scale.

_A_u_t_h_o_r(_s):

     Pan Du, Simon Lin

_E_x_a_m_p_l_e_s:

             data(exampleMS)
             scales <- seq(1, 64, 3)
             wCoefs <- cwt(exampleMS[5000:11000], scales=scales, wavelet='mexh')

             ## Plot the 2-D CWT coefficients as image (It may take a while!)
             xTickInterval <- 1000
             image(5000:11000, scales, wCoefs, col=terrain.colors(256), axes=FALSE, xlab='m/z index', ylab='CWT coefficient scale', main='CWT coefficients')
             axis(1, at=seq(5000, 11000, by=xTickInterval))
             axis(2, at=c(1, seq(10, 64, by=10)))
             box()

