简体   繁体   English

如何使用pywavelets定义自定义Ricker小波?

[英]How to define a custom Ricker wavelet using pywavelets?

I have been struggling with defining a custom wavelet using pywavelets. 我一直在努力使用pywavelets定义自定义小波。 I would like to perform a DWT using the ricker wavelet. 我想使用ricker小波执行DWT。 However, the ricker wavelet does not seem to be part of the in-built wavelet family provided by pywavelets. 但是,ricker小波似乎不属于pywavelets提供的内置小波家族。 The official pywavelet documentation gives an example illustrationg how to define a custom Haar wavelet. 官方pywavelet文档提供了一个示例插图,说明如何定义自定义Haar小波。 http://www.pybytes.com/pywavelets/ref/wavelets.html 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. 由于需要为Ricker小波输入函数形式,因此我无法在此示例的基础上使用pywavelets创建自定义Ricker小波。

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 ): 抱歉,我没有关于pywavelet的直接答案,但是以防万一,另一个答案要花一些时间才会出现,您可能需要考虑使用我用来创建Ricker小波的旧方法(使用称为“ 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM