Decompose node data creating DWT coefficients subnodes. Performs Discrete Wavelet Transform on the `~BaseNode.data` and returns transform coefficients. Note ---- Descends to subnodes and recursively calls `~BaseNode.reconstruct` on them.
(self)
| 169 | return self.path[-self.PART_LEN:] |
| 170 | |
| 171 | def decompose(self): |
| 172 | """ |
| 173 | Decompose node data creating DWT coefficients subnodes. |
| 174 | |
| 175 | Performs Discrete Wavelet Transform on the `~BaseNode.data` and |
| 176 | returns transform coefficients. |
| 177 | |
| 178 | Note |
| 179 | ---- |
| 180 | Descends to subnodes and recursively |
| 181 | calls `~BaseNode.reconstruct` on them. |
| 182 | |
| 183 | """ |
| 184 | if self.level < self.maxlevel: |
| 185 | return self._decompose() |
| 186 | else: |
| 187 | raise ValueError("Maximum decomposition level reached.") |
| 188 | |
| 189 | def _decompose(self): |
| 190 | raise NotImplementedError() |