mrpro.operators.models.MonoExponentialDecay

class mrpro.operators.models.MonoExponentialDecay[source]

Bases: SignalModel[Tensor, Tensor]

Signal model for mono-exponential decay.

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

Initialize mono-exponential signal model.

Can, for example, be used to model T2.

Parameters:

decay_time (float | Tensor | Sequence[float]) – time points when model is evaluated with shape (time, …)

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

Apply the mono-exponential decay signal model.

Calculates the signal based on the formula: \(S(t) = M_0 e^{-t / T}\), where t are the decay times and T is the decay constant.

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

  • decay_constant (Tensor) – Exponential decay constant (e.g., T2, T2*, T1rho). Shape (...), for example (*other, coils, z, y, x) or (samples).

Returns:

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

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

Apply forward of MonoExponentialDecay.

Note

Prefer calling the instance of the MonoExponentialDecay 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)