fmSSFPSimulator#
- class torchsim.simulators.fmSSFPSimulator(*args, **kwargs)[source]#
Bases:
SimulatorA balanced SSFP train whose RF frequency is swept through one passband per sweep.
The n-th pulse of a sweep, counted from zero, is played
pi + 2 pi n / nshotsradians ahead of the pulse before it. A phase increment acts on the magnetization as an off-resonance ofincrement / (2 pi TR), so across one sweep ofnshotsrepetitions every voxel is carried once through the period1 / TRof the balanced SSFP off-resonance profile [1]. Each sample is demodulated by the phase of its own pulse, andsweepssweeps are played before the one recorded, which is how the radial acquisition of [2] is prepared. The pulses are instantaneous rotations unlesspulse_durationis given, and are then the windowed sincsTrueFISPSimulatorplays. This is the sequence BART’sepgplays as fmSSFP.References
Examples
from torchsim.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
bindThis simulator with more fixed on it, values or settings alike.
describeReturn the description this protocol plays.
evaluateRun one simulation of the described protocol.
from_descriptionReturn a simulator over a stream someone else assembled.
from_pulseqReturn a simulator over one repetition of a Pulseq sequence.
jacobianReturn the signal and its derivative with respect to
diff.Return the sweeps, one sample per shot of the last.
playedReturn the protocol as it will be laid out.
repetition_sReturn how long one repetition lasts, given what the layout played.
simulateReturn the recorded signal.
- layout(*, flip, TR, nshots, sweeps=1, TE=None, pulse_duration=0.0, bandwidth_time=4.0, dwell=0.01)[source]#
Return the sweeps, one sample per shot of the last.
- Parameters:
flip (float or array-like) – Flip angle in degrees, scalar or one per shot of a sweep.
TR (float) – Repetition time in milliseconds, pulse centre to pulse centre.
nshots (int) – Excitations in one sweep.
sweeps (int, optional) – Sweeps played before the one recorded.
TE (float, optional) – Echo time in milliseconds, from the centre of the pulse; half the repetition time when not given, where a balanced train refocuses.
pulse_duration (float, optional) – Duration of each pulse in milliseconds. Zero plays each as an instantaneous rotation.
bandwidth_time (float, optional) – Zero crossings of the Hamming-windowed sinc across a pulse.
dwell (float, optional) – How long each sample of a pulse is held, in milliseconds.
- 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.