NonCartesianGradient

NonCartesianGradient#

class pypulseqpp.sequences.NonCartesianGradient[source]#

Bases: object

One canonical non-Cartesian base interleaf, independent of its acquisition schedule.

A prewinder moves the k-space position from k = 0, at zero gradient amplitude, to the start of the readout; a rewinder returns it from the end of the readout to k = 0 at zero amplitude. Both play in blocks of their own, so duration is the longest prewinder plus read_duration plus the longest rewinder (s). The subclasses design an interleaf; this class wraps events designed elsewhere.

Parameters:
  • system (Opts) – System limits the events were designed under.

  • gradients (Sequence[GradEvent]) – The readout waveform, one event per channel it drives.

  • adc (AdcEvent) – The acquisition window under gradients.

  • trajectory (ArrayLike) – (n, 2) or (n, 3) k-space path (1/m).

  • design_interleaves (int, default=None) – Interleaf count the path’s pitch was designed for.

  • recommended_rotations (int, default=None) – Rotated copies that sample the path’s disc at Nyquist.

  • prewinders (Sequence[GradEvent], default=()) – Prewinding gradients from k = 0 to the path’s start, and rewinding gradients from its end back to k = 0, one event per channel.

  • rewinders (Sequence[GradEvent], default=()) – Prewinding gradients from k = 0 to the path’s start, and rewinding gradients from its end back to k = 0, one event per channel.

  • kind (str, default=None) – Name of the interleaf family.

Attributes:
  • trajectory (NDArray[np.float64]) – (n, 2) or (n, 3) path in 1/m: the design polyline, or for Rosette the k-space at the ADC samples.

  • bandwidth_hz_px (float) – Receiver bandwidth 1 / adc.dwell (Hz), not the bandwidth per pixel.

  • design_interleaves (int | None, default=None) – Interleaf count the spiral pitch was designed for.

  • recommended_rotations (int | None, default=None) – Full spokes for Nyquist sampling at kmax, ceil(pi * matrix / 2), for a radial spoke; None otherwise.

  • kind (str, default=None) – "arbitrary", "full" (radial), "spiral" or "rosette".

Examples

>>> import numpy as np
>>> import pypulseqpp.sequences as design
>>> import pypulseqpp as pp
>>> spiral = design.Spiral(pp.Opts(), 0.22, 64, 8)
>>> turned = spiral.rotated(np.pi / 2)
>>> turned.duration == spiral.duration, type(turned).__name__
(True, 'Spiral')

The k-space path and the gradient waveform that traces it, here for the same arm turned a quarter turn:

(svg)

../_images/pypulseqpp-sequences-NonCartesianGradient-1.svg

Methods

rotated

Return this interleaf rotated in its own plane, with unchanged timing.

Attributes

axes

The gradient channels this interleaf drives, in waveform order.

gx

Gradient on channel x, or None when this interleaf does not drive it.

gy

Gradient on channel y, or None when this interleaf does not drive it.

gz

Gradient on channel z, or None when this interleaf does not drive it.

has_prewinder

Whether a prewinder leads from k = 0 to the start of the path.

has_rewinder

Whether a rewinder leads from the end of the path back to k = 0.