SpinEchoSimulator#
- class torchsim.simulators.SpinEchoSimulator(*args, **kwargs)[source]#
Bases:
SimulatorA spin echo repeated every TR, optionally behind an inversion.
The refocusing pulse at
TE / 2inverts what has recovered since the excitation, so the longitudinal magnetization the next excitation finds is1 - 2 exp(-(TR - TE / 2) / T1) + exp(-TR / T1)of equilibrium [1], and the echo decays with T2. An inversion time multiplies this by the recovery from the inversion,1 - (1 + inv_efficiency) exp(-TI / T1).References
Examples
from torchsim.simulators import SpinEchoSimulator sequence = SpinEchoSimulator(TE=(10.0, 30.0, 60.0, 100.0), TR=2000.0) signal = sequence.simulate(T1=1000.0, T2=(50.0, 100.0)) print(signal.shape)
torch.Size([2, 4])
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.