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()

