DiffusionSimulator#
- class torchsim.simulators.DiffusionSimulator(*args, **kwargs)[source]#
Bases:
SimulatorAttenuation by Gaussian diffusion, at a series of b-values.
The signal is
M0 exp(-b D)for an isotropicD[1], orM0 exp(-b g^T D g)for a diffusion tensor along unit gradient directionsg, which is what givingdirectionsasks for: the six entries ofTENSORare then the properties, andDis not.References
Examples
from torchsim.simulators import DiffusionSimulator sequence = DiffusionSimulator(b=(0.0, 500.0, 1000.0, 2000.0)) signal = sequence.simulate(D=(0.8, 3.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.