MRFSimulator#

class blochsim.simulators.MRFSimulator[source]#

Bases: Simulator

MR fingerprinting with an unbalanced SSFP (FISP) train.

An inversion, then one excitation and one readout per TR. The readout gradient is unbalanced: each TR shifts every configuration state by one order. The signal is one complex sample per flip angle, from the last playing of the train.

Parameters:
  • flip (float or array-like) – Flip angles, in degrees, one per TR; their number sets the train length.

  • TR (float or array-like) – Repetition time, in ms; scalar or one per TR.

  • 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) – RF phases, in degrees; scalar or one per TR.

  • states (int, default=10) – Configuration states kept by the EPG simulation.

  • repetitions (int or "auto", default=1) – Playings of the train; the last is the signal.

Tissue properties:
  • T1, T2 (float or array-like) – Relaxation times, 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

import torch
from blochsim.simulators import MRFSimulator

sequence = MRFSimulator(
    flip=torch.linspace(5.0, 60.0, 1000), TR=10.0, states=20
)
signal = sequence.simulate(T1=1000.0, T2=80.0, inv_efficiency=0.95)

Methods

bind

Return a copy with further arguments fixed.

describe

Return the SequenceDescription of a protocol.

evaluate

Return the signal of the recorded playing of the train.

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 train: inversion, then an excitation and a readout per TR.

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 train: inversion, then an excitation and a readout per TR.

evaluate()[source]#

Return the signal of the recorded playing of the train.