linop.Hankel

Contents

linop.Hankel#

bartorch.linop.Hankel()#

Sliding window along axis (Hankel matrix), BART’s linop_hankelization.

torch.Tensor.unfold(axis, window, 1) as an operator: an axis of length n becomes n - window + 1 positions and the window is appended as the last axis. The adjoint sums each sample over every window containing it.

Parameters:
  • shape (tuple of int) – Domain, C order.

  • axis (int) – Axis to slide along.

  • window (int) – Window length, from 1 to the length of the axis.

Returns:

Codomain shape with axis shortened to n - window + 1 and a trailing axis of length window.

Return type:

LinearOperator

Raises:

ValueError – When the window is empty or longer than the axis.

Examples

>>> H = Hankel((64, 8), axis=0, window=16)
>>> H.oshape
(49, 8, 16)