mrpro.operators.MagnitudeOp

class mrpro.operators.MagnitudeOp[source]

Bases: EndomorphOperator

Magnitude of input tensors.

__call__(*x: Tensor) tuple[Tensor, ...][source]

Apply the EndomorphOperator.

forward(*x: Tensor) tuple[Tensor, ...][source]

Magnitude of tensors.

Parameters:

x (Tensor) – input tensors

Returns:

tensors with magnitude (absolute values) of input tensors

__add__(other: Operator[Unpack[Tin], Tout]) Operator[Unpack[Tin], Tout][source]
__add__(other: Tensor) Operator[Unpack[Tin], tuple[Unpack[Tin]]]

Operator addition.

Returns lambda x: self(x) + other(x) if other is a operator, lambda x: self(x) + other*x if other is a tensor

__matmul__(other: EndomorphOperator) EndomorphOperator[source]
__matmul__(other: Operator[Unpack[Tin], Tout]) Operator[Unpack[Tin], Tout]

Operator composition.

__mul__(other: Tensor | complex) Operator[Unpack[Tin], Tout][source]

Operator multiplication with tensor.

Returns lambda x: self(x*other)

__radd__(other: Tensor) Operator[Unpack[Tin], tuple[Unpack[Tin]]][source]

Operator right addition.

Returns lambda x: other*x + self(x)

__rmatmul__(other: Operator[Unpack[Tin], Tout]) Operator[Unpack[Tin], Tout][source]

Operator composition.

__rmul__(other: Tensor | complex) Operator[Unpack[Tin], Tout][source]

Operator multiplication with tensor.

Returns lambda x: other*self(x)