Reconstruct data using coefficients from subnodes. Parameters ---------- update : bool, optional If True (default) then the coefficients of the current node and its subnodes will be replaced with values from reconstruction.
(self, update=True)
| 1003 | self._maxlevel = maxlevel |
| 1004 | |
| 1005 | def reconstruct(self, update=True): |
| 1006 | """ |
| 1007 | Reconstruct data using coefficients from subnodes. |
| 1008 | |
| 1009 | Parameters |
| 1010 | ---------- |
| 1011 | update : bool, optional |
| 1012 | If True (default) then the coefficients of the current node |
| 1013 | and its subnodes will be replaced with values from reconstruction. |
| 1014 | """ |
| 1015 | if self.has_any_subnode: |
| 1016 | data = super().reconstruct(update) |
| 1017 | if self.data_size is not None and (data.shape != self.data_size): |
| 1018 | data = data[[slice(sz) for sz in self.data_size]] |
| 1019 | if update: |
| 1020 | self.data = data |
| 1021 | return data |
| 1022 | return self.data # return original data |
| 1023 | |
| 1024 | def get_level(self, level, decompose=True): |
| 1025 | """ |