linop.ComponentDiagonal

linop.ComponentDiagonal#

class bartorch.linop.ComponentDiagonal#

Bases: LinearOperator

Separate real scalings of the real and imaginary parts, BART’s linop_rdiag.

y = Re(d) Re(x) + i Im(d) Im(x) (BART’s md_zrmul). A real d therefore zeroes the imaginary part; multiplication by a real diagonal is Diagonal.

The operator is linear over the reals only, like Conj and Real: it is self-adjoint under the real inner product and fails a complex dot test on its own.

Parameters:
  • diag (tensor) – Real part scales the real part, imaginary part scales the imaginary part. Each axis is the operator’s size or one, and size-one axes are broadcast.

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

Also has the methods and properties of LinearOperator.