From 4f64046a40cfdc826d2b9dc4c16876457aabd99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Meyer-Conde=E3=80=80=E3=80=80=E3=80=80=20=20?= =?UTF-8?q?=E3=83=A1=E3=82=A4=E3=83=A4=E3=83=BC=E3=83=9E=E3=82=B3=E3=83=88?= <37673095+meiyasan@users.noreply.github.com> Date: Sat, 12 Apr 2025 19:21:05 +0900 Subject: [PATCH 1/3] Update _cwt.py --- pywt/_cwt.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pywt/_cwt.py b/pywt/_cwt.py index 0d69095b..8bbd6005 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=24): """ cwt(data, scales, wavelet) @@ -60,7 +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 ------- coefs : array_like @@ -115,7 +117,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 From 9cb389b991d62e273f0646991dabe61e0413cfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Meyer-Conde=E3=80=80=E3=80=80=E3=80=80=20=20?= =?UTF-8?q?=E3=83=A1=E3=82=A4=E3=83=A4=E3=83=BC=E3=83=9E=E3=82=B3=E3=83=88?= <37673095+meiyasan@users.noreply.github.com> Date: Sat, 12 Apr 2025 19:27:59 +0900 Subject: [PATCH 2/3] Fixed linter --- pywt/_cwt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pywt/_cwt.py b/pywt/_cwt.py index 8bbd6005..742cd802 100644 --- a/pywt/_cwt.py +++ b/pywt/_cwt.py @@ -62,7 +62,8 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1, preci used. precision : int, optional Parameter used to control the wavelet precision (useful towards lower frequency regions) - + + Returns ------- coefs : array_like From 81e88149fa8eadcc5b24077eab04a4a0a7ba199c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Meyer-Conde=E3=80=80=E3=80=80=E3=80=80=20=20?= =?UTF-8?q?=E3=83=A1=E3=82=A4=E3=83=A4=E3=83=BC=E3=83=9E=E3=82=B3=E3=83=88?= <37673095+meiyasan@users.noreply.github.com> Date: Tue, 15 Apr 2025 11:26:32 +0900 Subject: [PATCH 3/3] set precision to current default value 10 --- pywt/_cwt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywt/_cwt.py b/pywt/_cwt.py index 742cd802..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, precision=24): +def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1, precision=10): """ cwt(data, scales, wavelet)