HSFPSimulator

HSFPSimulator#

class blochsim.simulators.HSFPSimulator[source]#

Bases: Simulator

Hybrid-state free precession (HSFP) of a balanced train, in closed form.

For a balanced train with a slowly varying flip angle, the magnetization stays on the spin-locked axis and only its length evolves, relaxing at sin^2(a) / T2 + cos^2(a) / T1 and driven by cos(a) / T1 [1]. The train is repeated, each pass starting from the end of the previous one times beta. The signal is the magnetization along the spin-locked axis at each pulse, the transverse magnetization at the echo for a balanced train.

Parameters:
  • flip (array-like) – Flip-angle train, in degrees, one entry per pulse.

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

  • beta (float, default=-1.0) – Factor applied to the magnetization between passes: -1 for an inversion, 1 for none.

Tissue properties:
  • T1, T2 (float or array-like) – Relaxation times, in ms.

  • M0 (float or array-like, default=1.0) – Equilibrium magnetization.

References

Examples

import torch
from blochsim.simulators import HSFPSimulator

train = 60.0 * torch.sin(torch.linspace(0.0, torch.pi, 400)) ** 2
sequence = HSFPSimulator(flip=train, TR=4.5)
signal = sequence.simulate(T1=1000.0, T2=(50.0, 100.0))
print(signal.shape)
torch.Size([2, 400])

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.