module base_wavelt_mod
  implicit none
 
contains

  real function wavelet(t, fm, wvlt_type)
    real    :: t,fm, PI
    integer :: wvlt_type
    PI = 3.14159265359

    if (wvlt_type==1) then
       wavelet=(1.0-2.0*(PI*fm*t)**2)*exp(-(PI*fm*t)**2)
    else if(wvlt_type==2) then
       wavelet=(3.0-2.0*(PI*fm*t)**2)*exp(-(PI*fm*t)**2)*(-2.0*PI*PI*fm*fm*t)
    else
       stop
    end if
  end function


end module
