0

I have been struggling with defining a custom wavelet using pywavelets. I would like to perform a DWT using the ricker wavelet. However, the ricker wavelet does not seem to be part of the in-built wavelet family provided by pywavelets. The official pywavelet documentation gives an example illustrationg how to define a custom Haar wavelet. http://www.pybytes.com/pywavelets/ref/wavelets.html

Since a functional form needs to be put in for the Ricker wavelet, I have been unable to build upon this example to create a custom Ricker wavelet using pywavelets.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437

1 Answers1

0

Sorry that I don't have a direct answer for you about pywavelet, but just in case another answer takes some time in appearing you might want to consider an old recipe I used to create Ricker wavelets (to build synthetic seismic maps using a software called GEOMS2):

def ricker_wavelet(f, size, dt=1):
    t = np.int_(np.linspace(-size, size, (2*size+1)/dt))
    y = (1.0 - 2.0*(np.pi**2)*(f**2)*(t**2)) * np.exp(-(np.pi**2)*(f**2)*(t**2))
    data = np.hstack((t[:,np.newaxis],y[:,np.newaxis]))
    return data
armatita
  • 12,825
  • 8
  • 48
  • 49
  • Thanks for your suggestion. But it would be better if I could use pywavelets for defining this wavelet. – Akshay S Apr 28 '16 at 06:23