DoubleAngleSimulator#

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

Bases: Simulator

Excitation at a series of flip angles, scaled by the transmit field.

What a voxel actually turns through is the nominal angle times the local transmit efficiency, so a series of angles reads that efficiency out. Two angles are enough, and where the second is twice the first their ratio gives B1 in closed form – but nothing here requires that, so any set of angles can be fitted.

Examples

from torchsim.simulators import DoubleAngleSimulator

sequence = DoubleAngleSimulator(flip=(60.0, 120.0))
signal = sequence.simulate(B1=(0.8, 1.0, 1.2))
print(signal.shape)
torch.Size([3, 2])

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.