Sequences#

Device-agnostic description of an acquisition: a list of events with the timing and tissue interaction each carries, shared by the interpreter, the estimators and the sequence optimizer.

Simulators are written on Signal models, which also holds the temporal basis a run spans. Concepts are in Sequence description.

Operators#

Modules a sequence is assembled from. An operator is a function returning the events it plays and the time it holds the timeline; @ composes two operators into one. SampledPulse() plays a waveform as one hard pulse per sample, with relaxation, precession and exchange between samples.

Object

Description

Operator

One module of a sequence: the events it plays and the time it spans.

Excitation

Excitation pulse.

Refocusing

Refocusing pulse, between crusher gradients by default.

Inversion

Ideal inversion pulse.

Saturation

Off-resonance saturation pulse that deposits power in a semisolid pool.

SampledPulse

Shaped pulse played as one hard pulse per sample, with free evolution between.

Readout

One ADC sample of the transverse magnetization.

Delay

Delay, optionally carrying a gradient action.

Dephase

Unbalanced gradient of zero duration.

Spoil

Ideal transverse spoiling of zero duration.

bSSFPReadout

Balanced SSFP readout: a sample, then the rest of the repetition time.

SSFPFidReadout

Unbalanced SSFP readout (FISP): a sample, then one unbalanced gradient.

SSFPEchoReadout

Reversed SSFP readout (PSIF): one unbalanced gradient, then a sample.

SPGRReadout

Spoiled gradient-echo readout: a sample, then ideal transverse spoiling.

FSEReadout

Fast spin-echo readout: the sample at a spin echo, marked as the echo centre.

Pulses and shims#

rf_definition() builds an RF definition from a complex envelope, one row per transmit channel. ShimDefinition holds the amplitude and phase of each channel. A simulator takes them as pulse= and shims=. compose_spinor() composes the rotation a shaped pulse leaves on each spin, differentiably with respect to the samples.

Object

Description

rf_definition

Return the RF definition of a pulse envelope.

ShimDefinition

Transmit shim: a complex weight per channel for static parallel transmit.

compose_spinor

Return the Cayley-Klein pair of a shaped pulse, composed over its samples.

Description#

The event stream a layout composes to, or a scanner sequence is read into. SequenceDescription.from_operators() builds one from operators, SequenceDescription.from_pulseq() reads a Pulseq .seq file or an in-memory sequence, read_mrd_description() reads those an MRD stream carries ahead of its first acquisition, and from_description() simulates any of them.

Object

Description

SequenceDescription

Event stream and RF resources of one repetition of a sequence.

read_mrd_description

Read an MRD stream up to its sequence description.