mrpro.operators.models.InversionRecovery

class mrpro.operators.models.InversionRecovery[source]

Bases: SignalModel[Tensor, Tensor]

Inversion recovery signal model.

__init__(ti: float | Tensor | Sequence[float])[source]

Initialize inversion recovery signal model for T1 mapping.

Parameters:

ti (float | Tensor | Sequence[float]) – inversion times with shape (time, …)

__call__(m0: Tensor, t1: Tensor) tuple[Tensor][source]

Apply the inversion recovery signal model.

Calculates the signal based on the formula: \(S(TI) = M_0 (1 - 2 * e^{-TI / T_1})\), where TI are the inversion times.

Parameters:
  • m0 (Tensor) – Equilibrium signal / proton density. Shape (...), for example (*other, coils, z, y, x) or (samples).

  • t1 (Tensor) – Longitudinal relaxation time T1. Shape (...), for example (*other, coils, z, y, x) or (samples).

Returns:

Signal calculated for each inversion time. Shape (times ...), for example (times, *other, coils, z, y, x), or (times, samples) where times is the number of inversion times.

forward(m0: Tensor, t1: Tensor) tuple[Tensor][source]

Apply forward of InversionRecovery.

Note

Prefer calling the instance of the InversionRecovery as operator(x) over directly calling this method. See this PyTorch discussion.

__add__(other: Operator[Unpack[Tin], Tout]) Operator[Unpack[Tin], Tout][source]
__add__(other: Tensor | complex) 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: Operator[Unpack[Tin2], tuple[Unpack[Tin]]] | Operator[Unpack[Tin2], tuple[Tensor, ...]]) Operator[Unpack[Tin2], Tout][source]

Operator composition.

Returns lambda x: self(other(x))

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

Operator multiplication with tensor.

Returns lambda x: self(x*other)

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

Operator right addition.

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

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

Operator multiplication with tensor.

Returns lambda x: other*self(x)