python - 在哪里可以看到可以传递给 scipy.signal.cwt 的内置小波函数列表?

标签 python scipy signal-processing wavelet

scipy.signal.cwt 的文档 says :

scipy.signal.cwt(data, wavelet, widths)

wavelet : function Wavelet function, which should take 2 arguments. The first argument is the number of points that the returned vector will have (len(wavelet(width,length)) == length). The second is a width parameter, defining the size of the wavelet (e.g. standard deviation of a gaussian). See ricker, which satisfies these requirements.wavelet : function Wavelet function, which should take 2 arguments.

除了 scipy.signal.ricket,我还可以传递给 scipy.signal.cwt 的其他内置小波函数是什么?

我在 scipy / scipy / signal / wavelets.py 中看到

__all__ = ['daub', 'qmf', 'cascade', 'morlet', 'ricker', 'cwt']

并查看每个小波函数的参数,只有 ricket 似乎可以与 scipy.signal.cwt(data, wavelet, widths) 一起使用(仅作为ricker 正好接受 2 个参数。

最佳答案

我问了question on the SciPy Users List , 答案 1:

I found the module for CWT quite confusing, so I rolled my own:

https://github.com/Dapid/fast-pycwt

It is built for speed (I got my running time from 4 h down to 20 min). It is not thoroughly tested, and it is limited to single and double; but for me it is in a "good enough" state.

答案2:

You might also find my version useful:

https://github.com/aaren/wavelets

I also found scipy wavelets confusing. My version includes a faster cwt that can take wavelets expressed in either frequency or time.

I found it more intuitive to have wavelet functions that take time/frequency and width as arguments rather than the present method (I prefer thinking in real space rather than sample space).

Presently, the morlet wavelet that comes with scipy, scipy.signal.wavelets.morlet, cannot be used as input to cwt. This is unfortunate I think.

Additionally, the present cwt doesn't allow complex output. This doesn't make a difference for ricker but wavelet functions are complex in general.

My modified 'cwt' method is here:

https://github.com/aaren/wavelets/blob/master/wavelets.py#L15

It can accept wavelet functions defined in time or frequency space, uses fftconvolve, and allows complex output.

My background on this is based on a reading of Torrence and Compo:

Torrence and Compo, 'A Practical Guide to Wavelet Analysis' (BAMS, 1998)

http://paos.colorado.edu/research/wavelets/

hope that helps a bit,

aaron

关于python - 在哪里可以看到可以传递给 scipy.signal.cwt 的内置小波函数列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23730383/

相关文章:

python - 两个列表之间的指数拟合

c# - C# 中的 IIR 低通滤波器在 x86 模式下中断

python - pandas 面板 'iterrows'(遍历长轴)

python - 使用 Python 和 ODRPACK 拟合参数的约束

python - pip 安装 mod_wsgi 错误

python - CrawlerProcess 与 CrawlerRunner

python - 两个仅影响零值的稀疏矩阵的点积

python - 使用掩蔽数组的一行计算数组行的平均值

python - Lomb-Scargle 与 FFT 功率谱 : crashes with evenly spaced data

java - 程序针对特定 .WAV 文件返回 "could not get audio input stream from input file"