FSESimulator#

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

Bases: Simulator

A refocused echo train, sampled at every echo.

Examples

import torch
from torchsim.simulators import FSESimulator

sequence = FSESimulator(flip=180.0 * torch.ones(128), ESP=2.0, TR=5000.0)
signal = sequence.simulate(T1=1000.0, T2=80.0)

Methods

bind

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

describe

Return the description this protocol plays.

evaluate

Simulate one train, then let it recover for what is left of the TR.

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 train, placed at the echo times it is timed from.

played

Return the protocol as it will be laid out.

repetition_s

Return the TR, which the train waits out before the next one.

simulate

Return the recorded signal.

layout(*, flip, ESP, phases=0.0, exc_flip=90.0, exc_phase=90.0, TR=1e6)[source]#

Return the train, placed at the echo times it is timed from.

Parameters:
  • flip (float or array-like) – Refocusing flip angles in degrees, one per echo.

  • ESP (float or array-like) – Echo spacing in milliseconds.

  • phases (float or array-like, optional) – Refocusing phases in degrees.

  • exc_flip (float, optional) – The excitation, in degrees.

  • exc_phase (float, optional) – The excitation, in degrees.

  • TR (float or array-like, optional) – Repetition time in milliseconds, which sets how far the longitudinal magnetization recovers before the next train.

repetition_s(played_s, **protocol)[source]#

Return the TR, which the train waits out before the next one.

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

Simulate one train, then let it recover for what is left of the TR.