NonCartesianReadout

NonCartesianReadout#

class pypulseqpp.sequences.NonCartesianReadout[source]#

Bases: SequenceModule

A solved interleaf with its prewinder, rewinder and repetition-time budget.

Nonzero k-space endpoints of the interleaf require prewinder or rewinder blocks. trajectory is any two-channel NonCartesianGradient; the spiral and rosette readouts design theirs. The caller sets the orientation of each shot.

A compact layout holds one base arm, which the caller rotates per shot; an explicit layout holds each rotated arm.

Parameters:
  • system (pypulseqpp.Opts) – System limits.

  • rf (RfEvent) – Pulse that opens the repetition.

  • gz (GradEvent, default=None) – Selection gradient played with rf.

  • gz_reph (GradEvent, default=None) – Rephaser of gz, left-aligned in the first block after the pulse. Only on an axis the shot rotation leaves unchanged.

  • trajectory (NonCartesianGradient) – Interleaf with its ADC, prewinders and rewinders.

  • fov_z (float, default=None) – Partition field of view (m). Stacks only.

  • matrix_z (int, default=None) – Partition count. Stacks only.

  • te (float, default=None) – Echo time (s), from the RF centre to the point of the path nearest k = 0. None is as short as possible.

  • tr (float, default=None) – Repetition time (s). None is as short as possible.

  • spoiling_cycles (float, default=0.0) – Cycles of dephasing across voxel_size_m left at the end of the TR. Zero leaves the path rewound.

  • voxel_size_m (float, default=None) – Length the spoiling is counted over (m); None is the resolution of the trajectory.

  • spoiling_axis ({'z', 'x', 'y'}, default='z') – Gradient channel of the spoiler.

  • n_echoes (int, default=1) – Traversals of the path per repetition, joined by rewinders and prewinders, each with its own ECO label.

  • explicit (bool, default=False) – Write out one interleaf per entry of angles.

  • angles (array_like, default=None) – In-plane interleaf rotations (rad). Required with explicit and rejected without it.

  • labels (sequence of str, default=None) – Labels set to 0 on the acquisition block, to be changed per shot by the caller.

  • trigger (TriggerEvent or DigitalOutputEvent, default=None) – Event armed on the block that opens the readout.

Attributes:
  • rf (RfEvent) – The pulse the module was given.

  • gz (GradEvent) – Its selection gradient, if one was given.

  • gz_reph (GradEvent) – Its rephaser, if one was given.

  • gx, gy (GradEvent) – The interleaf. Lists with one entry per angle when explicit.

  • gx_pre, gy_pre (GradEvent) – Prewinding gradients to the start of the path; present when it does not start at k = 0.

  • gx_rew, gy_rew (GradEvent) – Rewinding gradients to k = 0; present when the path does not end there.

  • gz_pre, gz_rew (TrapEvent) – Partition encode and its rewinder. Stacks only.

  • gz_spoil (GradEvent) – End-of-TR spoiler; present when spoiling_cycles is nonzero.

  • adc (AdcEvent) – The acquisition window.

  • adc_labels (LabelSetEvent or list of LabelSetEvent) – One per name in labels.

  • wait_te, wait_tr (DelayEvent) – Present only when te or tr exceeds the minimum.

  • wait_pre, wait_rew (DelayEvent) – Delays that set the duration of the prewinder and rewinder blocks, which can outlast their gradients; absent when the block is not played.

  • trajectory (NonCartesianGradient) – The interleaf, for its k-space path and timings.

  • echo_time (float) – Echo time from the RF centre to the point of the path nearest k = 0 (s).

  • echo_spacing (float) – Time between consecutive echoes (s); zero for a single echo.

  • bandwidth_hz (float) – ADC sampling rate 1 / dwell (Hz).

  • n_samples (int) – ADC samples per traversal.

  • center_sample (int) – Index of the ADC sample nearest k = 0, clipped to the window.

  • n_arms (int) – Number of arm layouts: the angles when explicit, else 1.

Raises:

ValueError – If a count is out of range, angles and explicit disagree, or te or tr is shorter than the module can achieve.

Examples

>>> import numpy as np
>>> import pypulseqpp.sequences as design
>>> import pypulseqpp as pp
>>> system = pp.Opts()
>>> excitation = design.SpatialSelectiveExcitation(system, 15.0, 5e-3)
>>> kmax = 64 / (2 * 0.22)
>>> spoke = np.column_stack([np.linspace(-kmax, kmax, 64), np.zeros(64)])
>>> readout = design.NonCartesianReadout(
...     system, excitation.rf, excitation.gz, excitation.gz_reph,
...     trajectory=design.Arbitrary(system, spoke, matrix=64),
... )
>>> int(readout.adc.num_samples)
64

A single spoke supplied as an Arbitrary trajectory, played in the block layout the readout lays out around it:

../_images/pypulseqpp-sequences-NonCartesianReadout-1_00.svg

(svg)#

../_images/pypulseqpp-sequences-NonCartesianReadout-1_01.svg

(svg)#

Methods

arm

Return the blocks of one arm, as built.

init_module

Build the module's block layout; implemented by the subclass.

publish

Publish events from the caller's locals and register keyword aliases.

register

Publish named events, whether or not they were added to a block.

Attributes

blocks

Block tuples in play order, holding the original event objects.

duration

Duration of the module (s).

seq

Sequence holding the module's construction-time block layout.