bartorch.linop.Hankel#
- bartorch.linop.Hankel(shape, axis, window)#
A sliding window along
axis, BART’slinop_hankelization.torch.Tensor.unfold(axis, window, 1)as an operator, and the same thing as the trajectory matrix that singular spectrum analysis is built on: an axis ofnbecomesn - window + 1positions, each carrying thewindowsamples that start there. The codomain is the domain with that axis shortened and the window added as a last axis, which is whereunfoldputs it.BART makes the windows by striding rather than by copying, so the overlap costs nothing to build; the adjoint adds each sample back into every window it appeared in, which is what makes this an operator rather than a view.
- Parameters:
shape (tuple of int) – The domain, C order.
axis (int) – Which axis to slide along.
window (int) – How many samples each position carries. At most the length of the axis; equal to it gives one position.
Examples
>>> H = Hankel((64, 8), axis=0, window=16) >>> H.oshape (49, 8, 16)