bartorch.fwt#
- bartorch.fwt(input, axes, *, wavelet='dau2')#
Forward multi-level discrete wavelet transform along
axes.- Parameters:
input (torch.Tensor) – Every transformed axis needs at least 16 samples, the coarsest scale.
axes (int or tuple of int) – Axes to transform, as indices into
input.shape.wavelet ({"haar", "dau2", "cdf44", "cdf97"}) –
"haar","dau2"and"cdf44"runbart waveletwith-H,-Dand-C: along one axis, PyWavelets’wavedecwith"haar","db2"and"bior4.4"inmode="symmetric", concatenated coarse first. Each level keeps(n + taps - 1) // 2coefficients per band, so there are more coefficients than samples unless the filter has two taps and every level’s length is even; levels continue while that half-length is at least 16."cdf97"runsbart cdf97: CDF 9/7 by lifting, in place, coarse band first, levels continuing while every transformed axis is longer than 32; one level of an even length is PyWavelets’"bior4.4"inmode="periodization"with the detail band negated.
- Returns:
For
"cdf97", the shape ofinput. Otherwise the coefficients of all transformed axes are flattened into the last ofaxes, and the other transformed axes have size one.- Return type:
torch.Tensor