InversionRecoverySimulator#

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

Bases: Simulator

Longitudinal recovery from an inversion, read at a series of delays.

A spin echo long enough after the inversion samples the longitudinal magnetization alone, so the contrast is the recovery curve itself. The repetition time bounds how much the magnetization has recovered by the time the next inversion arrives; leave it out for a fully relaxed one.

offset is a constant added to the recovery, which is what a magnitude reconstruction’s noise floor looks like to a fit and what stops the fitted T1 absorbing it.

Examples

from torchsim.simulators import InversionRecoverySimulator

sequence = InversionRecoverySimulator(TI=(50.0, 400.0, 1100.0, 2500.0))
signal = sequence.simulate(T1=(800.0, 1400.0))
print(signal.shape)
torch.Size([2, 4])

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.