diff --git a/pywt/_cwt.py b/pywt/_cwt.py index 0d69095b..d3e0a7e3 100644 --- a/pywt/_cwt.py +++ b/pywt/_cwt.py @@ -24,7 +24,7 @@ def next_fast_len(n): return 2**ceil(np.log2(n)) -def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): +def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1, precision=10): """ cwt(data, scales, wavelet) @@ -60,6 +60,9 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): axis: int, optional Axis over which to compute the CWT. If not given, the last axis is used. + precision : int, optional + Parameter used to control the wavelet precision (useful towards lower frequency regions) + Returns ------- @@ -115,7 +118,7 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1): dt_out = dt_cplx if wavelet.complex_cwt else dt out = np.empty((np.size(scales),) + data.shape, dtype=dt_out) - precision = 10 + int_psi, x = integrate_wavelet(wavelet, precision=precision) int_psi = np.conj(int_psi) if wavelet.complex_cwt else int_psi