TrueFISPSimulator#
- class blochsim.simulators.TrueFISPSimulator[source]#
Bases:
SimulatorBalanced SSFP (TrueFISP, FIESTA) train from equilibrium, optionally inverted first.
Excitations alternate in phase between 0 and 180 degrees and each sample is demodulated by its pulse’s phase; the signal is one complex sample per shot. An alpha/2 pulse of opposite phase before the train damps the approach to the steady state [1]; after an inversion the train is the inversion-recovery TrueFISP [2]. Each pulse is a Hamming-windowed sinc played sample by sample, or an instantaneous rotation when
pulse_durationis zero. Gradients are balanced over each TR, so order zero is the whole state.- Parameters:
flip (float or array-like) – Flip angle, in degrees; scalar, or one per shot.
TR (float) – Repetition time, in ms, pulse centre to pulse centre.
nshots (int) – Excitations in the train.
TE (float, default=None) – Echo time, in ms, from the pulse centre.
TR / 2when not given.pulse_duration (float, default=1.0) – Pulse duration, in ms; zero is an instantaneous rotation.
bandwidth_time (float, default=4.0) – Time-bandwidth product of the pulse: zero crossings of the sinc across its duration.
half_alpha (bool, default=True) – Prepare the train with an alpha/2 pulse.
preparation (float, default=None) – Time, in ms, from the start of the alpha/2 pulse to the start of the first pulse.
TR / 2when not given. Zero is an instantaneous alpha/2 rotation at the start of the train.inversion ({None, "ideal", "adiabatic"}, default=None) – Preparation before the alpha/2 pulse: none, an instantaneous inversion scaled by
inv_efficiency, or a sampled hyperbolic secant.inversion_duration (float, default=10.0) – Duration of the adiabatic inversion, in ms.
inversion_phase (float, default=0.0) – Phase of the adiabatic inversion, in degrees, relative to the first pulse.
spoiler (float, default=0.0) – Time between inversion and preparation, in ms, ending in a spoiler.
dwell (float, default=0.01) – Hold time of each pulse sample, in ms.
states (int, default=1) – Configuration states.
- 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.
inv_efficiency (float or array-like, default=1.0) – Fraction of a perfect inversion; read when
inversion="ideal".
Notes
Corresponds to the sequences BART’s
simplays asBSSFPandIR-BSSFP, and with instantaneous pulses to the one itsepgplays as bSSFP.References
Examples
from blochsim.simulators import TrueFISPSimulator sequence = TrueFISPSimulator( flip=45.0, TR=4.5, nshots=200, inversion="adiabatic" ) signal = sequence.simulate(T1=1000.0, T2=100.0) print(signal.shape)
torch.Size([200])
Methods
bindReturn a copy with further arguments fixed.
describeReturn the
SequenceDescriptionof a protocol.evaluateReturn the signal of one simulation of the protocol.
from_descriptionReturn a simulator that plays an existing description.
from_pulseqReturn a simulator over one repetition of a Pulseq sequence.
jacobianReturn the signal and its derivative with respect to tissue properties.
Return the train, one sample per shot.
playedReturn the protocol arguments of
layout(), arrays as torch tensors.repetition_sReturn the duration of one repetition in seconds.
simulateReturn the recorded signal.
- layout()[source]#
Return the train, one sample per shot.
- Raises:
ValueError – If the sample falls inside the pulse or after the next one, if the preparation is shorter than its pulse, if
flipis neither scalar nor one per shot, or if a pulse is not a whole number of samples.