linop.Sum

Contents

linop.Sum#

class bartorch.linop.Sum#

Bases: LinearOperator

Sum over axes, BART’s linop_sum.

The summed axes are kept with size one rather than dropped, as BART does, so the result broadcasts back against the input. Its adjoint is Repeat.

BART attaches a closed-form pseudo-inverse to this operator, but it answers for ScaledSum’s scaling, so pinv() takes the solver here.

Parameters:
  • shape (tuple of int) – The shape it sums over, C order.

  • axes (int or tuple of int) – Which axes to sum, as indices into shape.

Also has the methods and properties of LinearOperator.