Skip to content
Open
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
9 changes: 7 additions & 2 deletions wavelets/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def wavelet_power(self):
elif not self.unbias:
return np.abs(self.wavelet_transform) ** 2

def reconstruction(self, scales=None):
def reconstruction(self, scales=None, wave=None):
"""Reconstruct the original signal from the wavelet
transform. See S3.i.

Expand All @@ -411,6 +411,8 @@ def reconstruction(self, scales=None):
function from its wavelet transform using the wavelet
function Y_0. This C_d is a constant for each wavelet
function.

:param wave: custom wavelet_transform array for reconstructing a signal omitting some frequencies, if desired.
"""
dj = self.dj
dt = self.dt
Expand All @@ -421,7 +423,10 @@ def reconstruction(self, scales=None):
self.scales = scales

s = self.scales
W_n = self.wavelet_transform
if wave is None:
W_n = self.wavelet_transform
else:
W_n = wave

if scales is not None:
self.scales = old_scales
Expand Down