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.
- __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 andT
is the decay constant.- Parameters:
- Returns:
Signal calculated for each decay time. Shape
(times ...)
, for example(times, *other, coils, z, y, x)
, or(times, samples)
wheretimes
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)