Events and blocks#

The block events other than RF and gradients, and the operations on blocks and events. Every factory returns a compiled event that Sequence.add_block() accepts; the RF and gradient factories are on RF pulse design and Gradient design. Times are in s, frequency offsets in Hz and phase offsets in rad; Events and blocks describes the block and extension structure.

Acquisition and control events#

Object

Input

Returns

Purpose

make_adc

Samples, dwell or duration, delay, offsets

ADC event

Acquisition window.

make_delay

Duration (s)

Delay event

Minimum block duration.

make_digital_output_pulse

Output channel, delay, duration

Trigger event (output)

Digital output pulse.

make_label

Label name, SET or INC, value

Label event

LABELSET / LABELINC extension.

make_rf_shim

Complex weights, one per transmit channel

RF shim extension event

Static per-channel RF weights.

make_rotation

Angles (rad), axis-angle, quaternion or matrices

Rotation extension event, or one per matrix

Block gradient rotation.

make_soft_delay

Hint, ID, offset, factor, default duration

Soft delay extension event

Console-adjustable block duration.

make_trigger

Input channel, delay, duration

Trigger event (input)

Wait for an external signal.

Block and event operations#

Object

Input

Returns

Purpose

align

Events keyed by left, center, right

Events with delays set

Alignment within a block.

block_to_events

Block or events

Tuple of events

Event extraction from a block.

calc_duration

Events or block

Duration (s)

Longest event extent.

rotate

Gradient events, angle (rad), axis x/y/z

Rotated gradient events

Rotation about a channel axis.

Labels and tracing#

Object

Input

Returns

Purpose

get_supported_labels

—

Tuple of label names

Supported label identifiers.

enable_trace

Stack depth

None

Record event and block source locations.

disable_trace

—

None

Stop recording source locations.

Interoperability with PyPulseq#

Object

Input

Returns

Purpose

interoperating

Callable taking or returning PyPulseq events

Wrapped callable with event conversion

Compiled events through upstream functions.

convert

PyPulseq namespace event

Compiled event; other objects unchanged

Namespace to compiled event.

as_namespace

Compiled event

SimpleNamespace; other objects unchanged

Compiled event to namespace.