MPnRAGESimulator#
- class blochsim.simulators.MPnRAGESimulator[source]#
Bases:
SimulatorMPnRAGE: an inversion and a spoiled gradient-echo train, every shot read.
One inversion, then
nshotsspoiled gradient-echo readouts, each sampled at the pulse. The signal is one complex sample per shot, along the inversion-recovery curve.- Parameters:
nshots (int) – Readouts per inversion block.
flip (float or array-like) – Excitation flip angle, in degrees; scalar, or one per shot.
TR (float or array-like) – Repetition time, in ms; scalar or one per shot.
TI (float or array-like, default=0.0) – Delay from the inversion to the first excitation, in ms.
phases (float or array-like, default=0.0) – Excitation phases, in degrees; scalar or one per shot.
states (int, default=1) – Configuration states; only the longitudinal state is carried.
- Tissue properties:
T1 (float or array-like) – Longitudinal relaxation time, in ms.
M0 (float or array-like, default=1.0) – Equilibrium magnetization.
B1 (float or array-like, default=1.0) – Transmit field, as a fraction of the nominal flip angle.
inv_efficiency (float or array-like, default=1.0) – Fraction of a perfect inversion.
Examples
from blochsim.simulators import MPnRAGESimulator sequence = MPnRAGESimulator(nshots=128, flip=5.0, TR=10.0) signal = sequence.simulate(T1=1000.0, inv_efficiency=0.95)
Methods
bindReturn a copy with further arguments fixed.
describeReturn the
SequenceDescriptionof a protocol.Return the signal at every shot.
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 the inversion and the train of excitations and 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 the inversion and the train of excitations and readouts.
- Raises:
ValueError – If
nshotsis not positive, orflipis neither scalar nor one per shot.