MPRAGESimulator#

class torchsim.simulators.MPRAGESimulator(*args, **kwargs)[source]#

Bases: Simulator

An 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

bind

This simulator with more fixed on it, values or settings alike.

describe

Return the description this protocol plays.

evaluate

Return the one sample the train acquires.

from_description

Return a simulator over a stream someone else assembled.

from_pulseq

Return a simulator over one repetition of a Pulseq sequence.

jacobian

Return the signal and its derivative with respect to diff.

layout

Return the prepared train, with one shot marked as acquired.

played

Return the protocol as it will be laid out.

repetition_s

Return how long one repetition lasts, given what the layout played.

simulate

Return 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.

evaluate(properties, **sequence)[source]#

Return the one sample the train acquires.