MPRAGESimulator#
- class torchsim.simulators.MPRAGESimulator(*args, **kwargs)[source]#
Bases:
SimulatorAn inversion followed by a spoiled train, sampled at the k-space centre.
Examples
from torchsim.simulators import MPRAGESimulator sequence = MPRAGESimulator(TI=500.0, flip=5.0, TRspgr=5.0, nshots=128) signal = sequence.simulate(T1=(200.0, 1000.0), inv_efficiency=0.95)
Methods
bindThis simulator with more fixed on it, values or settings alike.
describeReturn the description this protocol plays.
Return the one sample the train acquires.
from_descriptionReturn a simulator over a stream someone else assembled.
from_pulseqReturn a simulator over one repetition of a Pulseq sequence.
jacobianReturn the signal and its derivative with respect to
diff.Return the prepared train, with one shot marked as acquired.
playedReturn the protocol as it will be laid out.
repetition_sReturn how long one repetition lasts, given what the layout played.
simulateReturn the recorded signal.
- layout(*, TI, flip, TRspgr, nshots, phases=0.0)[source]#
Return the prepared train, with one shot marked as acquired.
- Parameters:
TI (float or array-like) – Inversion time in milliseconds, measured to the sampled shot.
flip (float or array-like) – Excitation flip angle in degrees, scalar or one per shot.
TRspgr (float or array-like) – Repetition time in milliseconds of one readout.
nshots (int or array-like) – Readouts in the inversion block, either the total – split as evenly as an odd centre allows – or
(before, after)the shot that samples the k-space centre.phases (float or array-like, optional) – Excitation phases in degrees.
- Raises:
ValueError – If the inversion time falls before the train’s first excitation.