MP2RAGESimulator#
- class blochsim.simulators.MP2RAGESimulator[source]#
Bases:
SimulatorMP2RAGE: an inversion followed by two spoiled gradient-echo blocks.
A single inversion is followed by two blocks of spoiled gradient-echo readouts, the k-space centre of each sampled at its own inversion time. The signal is two real samples per voxel, one per block. Only the longitudinal magnetization carries between shots, so the steady state of the repeated inversion block has a closed form, evaluated by
evaluate(); the receive bias field cancels in the ratio of the two samples [1].layout()plays the same sequence event by event.- Parameters:
TI (array-like) – The two inversion times, in ms, each from the inversion to the sampled shot of its block.
flip (float or array-like) – Excitation flip angle, in degrees; scalar, or one per block.
TRspgr (float or array-like) – Repetition time of one readout, in ms.
TRmp2rage (float or array-like) – Repetition time of the whole inversion block, in ms.
nshots (int or array-like) – Readouts per block. A scalar is the total and is split evenly around the sampled shot;
(before, after)gives the readouts before the sampled shot and from it onward, the sampled shot included inafter.phases (float or array-like, default=0.0) – Excitation phases, in degrees; scalar, or one per block. Read by
layout()only.states (int, default=1) – Configuration states; only the longitudinal state is carried.
record ({"all", "acquired"}, default="acquired") – Samples recorded: only the two sampled shots.
- Tissue properties:
T1 (float or array-like) – Longitudinal relaxation time, in ms.
M0 (float or array-like, default=1.0) – Equilibrium magnetization.
inv_efficiency (float or array-like, default=1.0) – Fraction of a perfect inversion.
References
Examples
from blochsim.simulators import MP2RAGESimulator sequence = MP2RAGESimulator( TI=(500.0, 1500.0), flip=5.0, TRspgr=5.0, TRmp2rage=3000.0, nshots=128, ) signal = sequence.simulate(T1=(200.0, 1000.0), inv_efficiency=0.95)
Methods
bindReturn a copy with further arguments fixed.
describeReturn the
SequenceDescriptionof a protocol.Return the closed-form signal, two samples along a trailing axis.
from_descriptionReturn a simulator that plays an existing description.
from_pulseqReturn a simulator over one repetition of a Pulseq sequence.
jacobianReturn the signal and its derivative with respect to tissue properties.
Return one inversion followed by two blocks of readouts.
playedReturn the protocol arguments of
layout(), arrays as torch tensors.repetition_sReturn the duration of one repetition in seconds.
simulateReturn the recorded signal.
- layout()[source]#
Return one inversion followed by two blocks of readouts.
- Raises:
ValueError – If an inversion time falls before its block’s first excitation, or if the second block does not fit inside
TRmp2rage.