FSESimulator#

class blochsim.simulators.FSESimulator[source]#

Bases: Simulator

Fast (turbo) spin echo (FSE, RARE) train, sampled at every echo.

An excitation followed by one refocusing pulse per echo, spaced ESP, with an echo midway between consecutive pulses. The extended phase graph carries the stimulated and indirect echoes of refocusing angles below 180 degrees. The signal is one complex sample per echo, demodulated by the refocusing phase, from the second playing of the train. Trains with several values of TR are simulated separately and stacked along the leading axis.

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

  • ESP (float or array-like) – Echo spacing, in ms.

  • phases (float or array-like, default=0.0) – Refocusing phases, in degrees; scalar or one per echo.

  • exc_flip (float, default=90.0) – Excitation flip angle, in degrees.

  • exc_phase (float, default=90.0) – Excitation phase, in degrees.

  • TR (float or array-like, default=1e6) – Repetition time, in ms; sets the longitudinal recovery between trains.

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

  • repetitions (int or "auto", default=2) – Playings of the train. The first leaves the longitudinal magnetization the TR recovers to, and the second, which is recorded, starts from it; that is the steady state after a 90 degree excitation. Another excitation needs "auto".

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.

Examples

import torch
from blochsim.simulators import FSESimulator

sequence = FSESimulator(flip=180.0 * torch.ones(128), ESP=2.0, TR=5000.0)
signal = sequence.simulate(T1=1000.0, T2=80.0)

Methods

bind

Return a copy with further arguments fixed.

describe

Return the SequenceDescription of a protocol.

evaluate

Return the signal at every echo.

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, placed at the echo times it is timed from.

played

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

repetition_s

Return TR in seconds, 1e6 ms when not given.

simulate

Return the recorded signal.

layout()[source]#

Return the train, placed at the echo times it is timed from.

repetition_s()[source]#

Return TR in seconds, 1e6 ms when not given.

evaluate()[source]#

Return the signal at every echo.

Trains with different TR are simulated separately and stacked along the leading axis of TR and of the per-echo arguments batched with it.