Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pywt/_cwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
-------
Expand Down Expand Up @@ -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

Expand Down