HyperechoSimulator#
- class torchsim.simulators.HyperechoSimulator(*args, **kwargs)[source]#
Bases:
FSESimulatorA refocused train mirrored about a central refocusing pulse.
The pulses after the central one replay those before it in reverse order, each with the opposite flip angle about the opposite phase –
-alphaabout-phi, which isalphaat180 - phidegrees – so every coherence pathway the first half split is brought back by the last echo, the hyperecho [1]. But for relaxation, that echo is the full spin echo of the excitation, whatever the flip angles before it. Every echo is demodulated at zero phase, the axis of the central pulse. With one flip angle at zero phase throughout, this is the sequence BART’sepgplays as Hyperecho.References
Examples
import torch from torchsim.simulators import HyperechoSimulator sequence = HyperechoSimulator(flip=60.0 * torch.ones(5), ESP=10.0) signal = sequence.simulate(T1=1000.0, T2=80.0) print(signal.shape)
torch.Size([11])
Methods
bindThis simulator with more fixed on it, values or settings alike.
describeReturn the description this protocol plays.
evaluateSimulate one train, then let it recover for what is left of the TR.
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 train, placed at the echo times it is timed from.
playedReturn the protocol as it will be laid out.
repetition_sReturn the TR, which the train waits out before the next one.
simulateReturn the recorded signal.
- states = None#
- layout(*, flip, ESP, phases=0.0, refocusing=180.0, exc_flip=90.0, exc_phase=90.0, TR=1e6)[source]#
Return the train, placed at the echo times it is timed from.
- Parameters:
flip (float or array-like) – Flip angles in degrees of the refocusing pulses before the central one, one per echo; the train holds twice as many and one more.
ESP (float or array-like) – Echo spacing in milliseconds.
phases (float or array-like, optional) – Phases in degrees of the refocusing pulses before the central one.
refocusing (float, optional) – Flip angle in degrees of the central pulse, played at zero phase.
exc_flip (float, optional) – The excitation, in degrees.
exc_phase (float, optional) – The excitation, in degrees.
TR (float or array-like, optional) – Repetition time in milliseconds, which sets how far the longitudinal magnetization recovers before the next train.