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)
| 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 | """ |