linop.Diagonal#
- class bartorch.linop.Diagonal#
Bases:
LinearOperatorPointwise multiplication by
diag, BART’slinop_cdiag.The adjoint multiplies by
conj(diag).- Parameters:
diag (tensor) – The diagonal, with the operator’s rank; each axis is the operator’s size or one, and size-one axes are broadcast.
shape (tuple of int) – Domain and codomain, C order.
- set()#
Replace the values in place, without rebuilding the operator.
Compositions, normals and solvers built over this operator apply the new values from their next application. The values are copied.
- Parameters:
values (tensor) – Same shape as the values the operator was built with.
- Raises:
BartError – When BART refuses to write the values.
Also has the methods and properties of LinearOperator.