linop.ScaledSum

Contents

linop.ScaledSum#

class bartorch.linop.ScaledSum#

Bases: LinearOperator

Sum over axes, divided by the square root of how many were summed.

BART’s linop_scaled_sum. The scaling makes it well behaved: its normal operator is an orthogonal projection rather than a multiple of one, so its spectral norm is one and pinv() has a closed form – BART solves (A^H A + damp I) x = A^H y here directly, with no iteration.

Sum is the plain sum; this is the one to use inside a solver, where the conditioning and the exact inverse are worth the factor.

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.