SpinEchoSimulator

SpinEchoSimulator#

class blochsim.simulators.SpinEchoSimulator[source]#

Bases: Simulator

Spin echo with partial longitudinal recovery, in closed form.

A 90-180 spin echo repeated every TR, optionally behind an inversion. The refocusing pulse at TE / 2 inverts the magnetization recovered since the excitation, so the next excitation finds 1 - 2 exp(-(TR - TE / 2) / T1) + exp(-TR / T1) of equilibrium [1], and the echo decays with T2. An inversion time multiplies this by 1 - (1 + inv_efficiency) exp(-TI / T1). The signal is one real sample per echo time.

Parameters:
  • TE (float or array-like) – Echo times, in ms.

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

  • TI (float or array-like, default=None) – Inversion times, in ms. No inversion when not given.

Tissue properties:
  • T1, T2 (float or array-like) – Longitudinal and transverse relaxation times, 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. Read only when TI is given.

References

Examples

from blochsim.simulators import SpinEchoSimulator

sequence = SpinEchoSimulator(TE=(10.0, 30.0, 60.0, 100.0), TR=2000.0)
signal = sequence.simulate(T1=1000.0, T2=(50.0, 100.0))
print(signal.shape)
torch.Size([2, 4])

Methods

bind

Return a copy with further arguments fixed.

describe

Return the SequenceDescription of a protocol.

evaluate

Return the closed-form signal.

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 operators of one repetition in playing order.

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.

evaluate()[source]#

Return the closed-form signal.