MultiGradientEchoSimulator#
- class torchsim.simulators.MultiGradientEchoSimulator(*args, **kwargs)[source]#
Bases:
SimulatorWater and fat, dephasing and decaying across a gradient-echo train.
Fat is a multi-peak spectrum [1] at a fixed set of chemical shifts, so its signal at each echo is a known complex modulation and what is left to fit per voxel is how much fat there is, the transverse decay and the off-resonance. Each model BART’s multi-echo fits use is a subset of the properties: water and fat with a shared or separate T2*, water alone with T2*, and off-resonance alone.
fat_fractionandfat_phasespan the water and fat signals: with a complex scale in front, water is(1 - fat_fraction)of it and fatfat_fractionof it rotated byfat_phase. LeavingT2starout means no decay, and leavingfat_T2starout gives fat water’s T2*.References
Examples
from torchsim.simulators import MultiGradientEchoSimulator sequence = MultiGradientEchoSimulator(TE=(1.2, 2.4, 3.6, 4.8, 6.0, 7.2)) signal = sequence.simulate(fat_fraction=(0.0, 0.2), T2star=30.0, B0=15.0) print(signal.shape)
torch.Size([2, 6])
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.