HSFPSimulator#
- class torchsim.simulators.HSFPSimulator(*args, **kwargs)[source]#
Bases:
SimulatorA balanced train whose flip angle varies slowly, in the hybrid state.
With the flip angle varied slowly enough, the magnetization stays on the spin-locked axis the train defines and only its length evolves, relaxing at
sin^2(a) / T2 + cos^2(a) / T1and driven bycos(a) / T1[1]. The train is played repeatedly and the recorded pass starts from where the previous one ended, timesbeta:-1for an inversion between passes, which is what makes the answer sensitive to T1 and T2 at once, and1for none.The signal is the magnetization along the spin-locked axis at each pulse, which for a balanced train is the transverse magnetization at the echo.
References
Examples
import torch from torchsim.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
bindThis simulator with more fixed on it, values or settings alike.
describeReturn the description this protocol plays.
Evaluate the closed form, no state machine and no description.
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.layoutReturn the operators of one repetition, in the order they play.
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.