MPRAGESimulator#

class blochsim.simulators.MPRAGESimulator[source]#

Bases: Simulator

MPRAGE: an inversion followed by a spoiled gradient-echo train.

One inversion, then a train of spoiled gradient-echo readouts of which one, the k-space centre, is sampled. TI is measured from the inversion to that shot. The signal is one complex sample per voxel.

Parameters:
  • TI (float or array-like) – Inversion time, in ms, from the inversion 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 of one readout, in ms.

  • nshots (int or array-like) – Readouts in the block. A scalar is the total, sampled shot included, split evenly around it; (before, after) gives the readouts before and after the sampled shot, so the block holds before + after + 1.

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

  • record ({"all", "acquired"}, default="acquired") – Samples recorded: only the sampled shot.

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.

Examples

from blochsim.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

Return a copy with further arguments fixed.

describe

Return the SequenceDescription of a protocol.

evaluate

Return the acquired sample.

from_description

Return a simulator that plays an existing description.

from_pulseq

Return a simulator over one repetition of a Pulseq sequence.

jacobian

Return the signal and its derivative with respect to tissue properties.

layout

Return the inversion and the train, with one shot marked as acquired.

played

Return the protocol arguments of layout(), arrays as torch tensors.

repetition_s

Return the duration of one repetition in seconds.

simulate

Return the recorded signal.

layout()[source]#

Return the inversion and the train, with one shot marked as acquired.

Raises:

ValueError – If the inversion time falls before the first excitation, or flip is neither scalar nor one per shot.

evaluate()[source]#

Return the acquired sample.