NonCartesianGradient#
- class pypulseqpp.sequences.NonCartesianGradient[source]#
Bases:
objectBase interleaf of a non-Cartesian trajectory, independent of its acquisition schedule.
A prewinder moves k-space 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 (pypulseqpp.Opts) – System limits the events were designed under.
gradients (sequence of GradEvent) – The readout waveform, one event per channel it drives.
adc (AdcEvent) – The acquisition window under
gradients.trajectory (array_like) – K-space path
(n, 2)or(n, 3)(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 of GradEvent, default=()) – Gradients from k = 0 to the path’s start, and from its end back to k = 0, one event per channel.
rewinders (sequence of GradEvent, default=()) – Gradients from k = 0 to the path’s start, and from its end back to k = 0, one event per channel.
kind (str, default=None) – Name of the interleaf family.
- Attributes:
trajectory (numpy.ndarray) – K-space path
(n, 2)or(n, 3)(1/m): the design polyline, or forRosettethe k-space at the ADC samples.bandwidth_hz_px (float) – Sampling rate
1 / adc.dwell(Hz); not the bandwidth per pixel.design_interleaves (int or None) – Interleaf count the spiral pitch was designed for.
recommended_rotations (int or None) – For a radial spoke,
ceil(pi * matrix / 2)full spokes for Nyquist sampling atkmax;Noneotherwise.kind (str or 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. |