NonCartesianGradient#
- class pypulseqpp.sequences.NonCartesianGradient[source]#
Bases:
objectOne 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
durationis the longest prewinder plusread_durationplus 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 forRosettethe 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;Noneotherwise.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)
Methods
Return this interleaf rotated in its own plane, with unchanged timing. |
Attributes
The gradient channels this interleaf drives, in waveform order. |
|
Gradient on channel x, or None when this interleaf does not drive it. |
|
Gradient on channel y, or None when this interleaf does not drive it. |
|
Gradient on channel z, or None when this interleaf does not drive it. |
|
Whether a prewinder leads from k = 0 to the start of the path. |
|
Whether a rewinder leads from the end of the path back to k = 0. |