MCPcopy Create free account
hub / github.com/PyWavelets/pywt / reconstruct

Method reconstruct

pywt/_wavelet_packets.py:731–748  ·  view source on GitHub ↗

Reconstruct data value using coefficients from subnodes. Parameters ---------- update : bool, optional If True (default), then data values will be replaced by reconstruction values, also in subnodes.

(self, update=True)

Source from the content-addressed store, hash-verified

729 (self.data, self.wavelet, self.mode, self.maxlevel))
730
731 def reconstruct(self, update=True):
732 """
733 Reconstruct data value using coefficients from subnodes.
734
735 Parameters
736 ----------
737 update : bool, optional
738 If True (default), then data values will be replaced by
739 reconstruction values, also in subnodes.
740 """
741 if self.has_any_subnode:
742 data = super().reconstruct(update)
743 if self.data_size is not None and (data.shape != self.data_size):
744 data = data[[slice(sz) for sz in self.data_size]]
745 if update:
746 self.data = data
747 return data
748 return self.data # return original data
749
750 def get_level(self, level, order="natural", decompose=True):
751 """

Callers 5

test_reconstructing_dataFunction · 0.95
test_removing_nodesFunction · 0.95
test_db3_roundtripFunction · 0.95
test_wavelet_packet_axisFunction · 0.95

Calls 1

reconstructMethod · 0.45

Tested by 5

test_reconstructing_dataFunction · 0.76
test_removing_nodesFunction · 0.76
test_db3_roundtripFunction · 0.76
test_wavelet_packet_axisFunction · 0.76