bartorch.iwt

Contents

bartorch.iwt#

bartorch.iwt()#

Wavelet synthesis along axes: coefficients from fwt() back to samples.

The synthesis filter bank of bart wavelet -a inverts fwt() (iwt(fwt(x)) == x) for every wavelet. It is a left inverse, not the adjoint, although BART’s wavelet operator uses it as its adjoint: synthesis ignores the reflected samples the analysis read. The two coincide only for "haar" when every level’s length is even, where the transform is orthogonal. "cdf97" runs bart cdf97 -i, the exact inverse of a biorthogonal transform that is not orthogonal.

Parameters:
  • input (torch.Tensor) – Coefficients, laid out as fwt() returns them.

  • oshape (tuple of int) – Shape of the result, C order, one entry per axis of input; the axes not in axes must match input.

  • axes (int or tuple of int) – Transformed axes, as indices into oshape.

  • wavelet ({"haar", "dau2", "cdf44", "cdf97"}, default='dau2') – As for fwt().

Returns:

Samples of shape oshape.

Return type:

torch.Tensor

Raises:

ValueError – If input does not have the coefficient layout fwt() gives for oshape and axes.