mrpro.operators.models.SpoiledGRE
- class mrpro.operators.models.SpoiledGRE[source]
Bases:
SignalModel[Tensor,Tensor,Tensor]Spoiled gradient echo signal model.
- __init__(flip_angle: float | Tensor, echo_time: float | Tensor, repetition_time: float | Tensor) None[source]
Initialize spoiled gradient echo signal model.
Assumes perfect spoiling and a longitudinal steady state. This is a simplified special case of
TransientSteadyStateWithPreparation.The model is defined as: \(S = M_0 e^{-t_r / T_2^*} \frac{\sin(\alpha)(1 - e^{-t_e / T_1})}{(1 - \cos(\alpha) e^{-t_e / T_1})}\)
where \(M_0\) is the equilibrium magnetization, \(\alpha\) is the flip angle, \(t_e\) is the echo time, and \(t_r\) is the repetition time.
- __call__(m0: Tensor, t1: Tensor, t2star: Tensor) tuple[Tensor][source]
Calculate the Spoiled Gradient Echo signal.
- Parameters:
m0 (
Tensor) – Equilibrium signal / proton density. Shape(...), for example(*other, coils, z, y, x)or(samples).t1 (
Tensor) – Longitudinal (T1) relaxation time. Shape(...), for example(*other, coils, z, y, x)or(samples).t2star (
Tensor) – Effective transverse (T2*) relaxation time. Shape(...), for example(*other, coils, z, y, x)or(samples).
- Returns:
Signal Shape
(1 ...), for example(1, *other, coils, z, y, x)or(1, samples).
- forward(m0: Tensor, t1: Tensor, t2star: Tensor) tuple[Tensor][source]
Apply forward of SpoiledGRE.
Note
Prefer calling the instance of the SpoiledGRE 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*xif 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)