StimulatedEchoSimulator#

class blochsim.simulators.StimulatedEchoSimulator[source]#

Bases: Simulator

Stimulated-echo sequence: three pulses, sampled at the spin echo and the stimulated echo.

The second pulse, TE / 2 after the first, forms a spin echo at TE and stores part of the magnetization along z, where it relaxes with T1 alone. The third pulse, TM after the second, returns that part to the transverse plane, where it forms the stimulated echo TE / 2 later [1]. The transverse magnetization is spoiled after the spin echo, so the second sample is the stimulated echo alone. The signal is two complex samples, spin echo then stimulated echo, along a trailing axis.

Parameters:
  • flip (float or array-like) – Flip angle, in degrees; scalar, or one per pulse.

  • TE (float) – Echo time, in ms; twice the spacing of the first two pulses, and of the third pulse and the stimulated echo.

  • TM (float) – Mixing time, in ms, from the second pulse to the third. At least TE / 2.

  • states (int, default=4) – Configuration states: one order either side of the second pulse and one after the third.

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.

  • B0 (float or array-like, default=0.0) – Off-resonance, in Hz.

Notes

For instantaneous pulses about x the samples are i M0 sin(a1) sin^2(a2 / 2) exp(-TE / T2) and i M0 sin(a1) sin(a2) sin(a3) exp(-TE / T2) exp(-TM / T1) / 2, independent of off-resonance. With one flip angle, TE twice and TM three times BART’s echo time, this is the sequence BART’s epg plays as Spinecho.

References

Examples

from blochsim.simulators import StimulatedEchoSimulator

sequence = StimulatedEchoSimulator(flip=90.0, TE=20.0, TM=100.0)
spin_echo, stimulated_echo = 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 of one simulation of the protocol.

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 three pulses and the two samples.

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 three pulses and the two samples.

Raises:

ValueError – If TM is less than TE / 2, so the third pulse would play before the spin echo, or flip is neither scalar nor one per pulse.