fmSSFPSimulator#
- class blochsim.simulators.fmSSFPSimulator[source]#
Bases:
SimulatorFrequency-modulated balanced SSFP (fmSSFP) train.
The RF phase is swept through one passband per sweep: pulse
nof a sweep is playedpi + 2 pi n / nshotsrad ahead in phase of the previous pulse, so each voxel is carried once through the1 / TRperiod of the bSSFP off-resonance profile [1]. Each sample is demodulated by its pulse’s phase, andsweepssweeps are played before the recorded one, as in the radial acquisition of [2]. The signal is one complex sample per shot of the recorded sweep. Pulses are instantaneous rotations unlesspulse_durationis given, and are then windowed sincs.- Parameters:
flip (float or array-like) – Flip angle, in degrees; scalar or one per shot of a sweep.
TR (float) – Repetition time, in ms, pulse centre to pulse centre.
nshots (int) – Excitations in one sweep.
sweeps (int, default=1) – Sweeps played before the recorded one.
TE (float, default=None) – Echo time, in ms, from the pulse centre;
TR / 2when not given.pulse_duration (float, default=0.0) – Pulse duration, in ms; zero is an instantaneous rotation. A whole number of
dwell.bandwidth_time (float, default=4.0) – Zero crossings of the Hamming-windowed sinc across a pulse.
dwell (float, default=0.01) – Hold time of each pulse sample, in ms.
states (int, default=1) – Configuration states kept; a balanced train winds nothing on, so order zero is the whole state.
repetitions (int or "auto", default=1) – Playings of the whole train; the last is the signal.
- 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
Corresponds to the sequence BART’s
epgplays as fmSSFP.References
Examples
from blochsim.simulators import fmSSFPSimulator sequence = fmSSFPSimulator(flip=30.0, TR=5.0, nshots=100) signal = sequence.simulate(T1=1000.0, T2=100.0, B0=20.0) print(signal.shape)
torch.Size([100])
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 sweeps, one sample per shot of the last.
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 sweeps, one sample per shot of the last.
- Raises:
ValueError – If the sample falls inside the pulse or after the next one, if
sweepsis negative, ifflipis neither scalar nor one per shot, or if a pulse is not a whole number of samples.