linop.Convolve

Contents

linop.Convolve#

class bartorch.linop.Convolve#

Bases: LinearOperator

Convolution with a fixed kernel, BART’s linop_conv.

Parameters:
  • kernel (tensor) – Same rank as shape.

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

  • axes (int or tuple of int) – Axes to convolve along.

  • mode ({"wrap", "same", "valid", "full"}, default='same') – Boundary handling, under numpy’s names: circular, truncated to the input size, only where the kernel fits, or extended.

  • direction ({"symmetric", "causal", "anticausal"}, default=None) – Kernel alignment. None is "causal" for "valid" and "full", the only direction BART accepts for those modes, and "symmetric" otherwise.

Raises:

ValueError – For an unknown mode or direction, a non-causal "valid" or "full" convolution, or a kernel whose rank differs from the domain’s.

Also has the methods and properties of LinearOperator.