Arbitrary#
- class pypulseqpp.sequences.Arbitrary[source]#
Bases:
NonCartesianGradientBase interleaf from a caller-supplied 2D or 3D k-space path.
A path not starting at k = 0 gets prewinders, and one not ending there gets rewinders. The readout is stretched to last at least its sample count over
bandwidth_hz_px, and the dwell is the longest on the ADC raster that fits the samples in it.- Parameters:
system (Opts) – System limits.
trajectory (ArrayLike) –
(n, 2)or(n, 3)k-space path (1/m), withn >= 4. Its samples set the geometry; the solver sets the timing.matrix (int) – Matrix size. The ADC takes
round(matrix * oversamp)samples, rounded down tosystem.adc_samples_divisor.bandwidth_hz_px (float, default=250000.0) – Requested
1 / dwell(Hz).oversamp (float, default=1.0) – ADC oversampling, at least one.
axes (Sequence[str], default=None) – Channel per path component; the first two or three of x, y, z by default.
solver_oversampling (int, default=8) – Path-resampling factor of the time-optimal solver.
derate (bool, default=True) – Apply
pypulseqpp.apply_system_derates()first.
- Raises:
ValueError – If
trajectoryhas the wrong shape,axesdoes not name one distinct channel per component, or a size is out of range.
Examples
A spoke written as a path starts and ends away from k = 0, so it requires a prewinder and a rewinder:
>>> import numpy as np >>> import pypulseqpp.sequences as design >>> import pypulseqpp as pp >>> kmax = 64 / (2 * 0.22) >>> spoke = np.column_stack([np.linspace(-kmax, kmax, 64), np.zeros(64)]) >>> path = design.Arbitrary(pp.Opts(), spoke, matrix=64) >>> path.has_prewinder, path.has_rewinder, path.n_samples (True, True, 64)
One spoke given as a k-space path, and the waveform the solver traces it with. The prewinder and rewinder are solved separately and are not part of the readout waveform drawn here:
(
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. |