IRMultiGradientEchoSimulator#

class torchsim.simulators.IRMultiGradientEchoSimulator(*args, **kwargs)[source]#

Bases: Simulator

A multi-gradient-echo train read at a series of inversion times.

Water and fat each recover from the inversion along their own apparent T1, 1 - (1 + inv_efficiency) exp(-TI / T1), as a Look-Locker readout does, and each echo train then dephases and decays as in MultiGradientEchoSimulator. TI and TE give one contrast per entry, so a train of echoes after each of several inversion times is the flattened grid of the two.

fat_T1 and fat_inv_efficiency default to water’s, which is the model with one recovery for both.

Examples

import torch
from torchsim.simulators import IRMultiGradientEchoSimulator

TI, TE = torch.meshgrid(
    torch.tensor([20.0, 200.0, 800.0, 2000.0]),
    torch.tensor([1.2, 2.4, 3.6]),
    indexing="ij",
)
sequence = IRMultiGradientEchoSimulator(TI=TI.flatten(), TE=TE.flatten())
signal = sequence.simulate(T1=900.0, fat_T1=300.0, fat_fraction=0.2)
print(signal.shape)
torch.Size([12])

Methods

bind

This simulator with more fixed on it, values or settings alike.

describe

Return the description this protocol plays.

evaluate

Evaluate the closed form, no state machine and no description.

from_description

Return a simulator over a stream someone else assembled.

from_pulseq

Return a simulator over one repetition of a Pulseq sequence.

jacobian

Return the signal and its derivative with respect to diff.

layout

Return the operators of one repetition, in the order they play.

played

Return the protocol as it will be laid out.

repetition_s

Return how long one repetition lasts, given what the layout played.

simulate

Return the recorded signal.

evaluate(properties, **sequence)[source]#

Evaluate the closed form, no state machine and no description.