calc_spiral_trajectory#
- pypulseqpp.calc_spiral_trajectory()[source]#
Return one spiral-out interleaf, from the centre to
kmax.The pitch between neighbouring turns is set so that
design_interleavesrotated copies of this path sample the disc at the Nyquist rate forfov. The caller may acquire a different number.- Parameters:
fov (float) – Field of view, in m. Isotropic.
matrix (int) – Matrix size, which with
fovsets the reachmatrix / (2 fov).design_interleaves (int) – Interleaf count the pitch is designed for. One is a single-shot spiral of
matrix / 2turns.density ({"constant", "variable", "dual"}, default='constant') – How the local pitch changes with radius: not at all, as
radius ** variable_density_power, or between two plateaus joined by a logistic transition.inner_design_interleaves (float, default=None) – Local interleaf count at the centre and at the edge. The inner one defaults to
design_interleaves; the outer one to twice the inner for a variable-density spiral, and is required for a dual-density one. A larger count is a coarser pitch, so a variable-density spiral undersamples the edge.outer_design_interleaves (float, default=None) – Local interleaf count at the centre and at the edge. The inner one defaults to
design_interleaves; the outer one to twice the inner for a variable-density spiral, and is required for a dual-density one. A larger count is a coarser pitch, so a variable-density spiral undersamples the edge.variable_density_power (float, default=2.0) – Exponent of the variable-density ramp.
transition_radius (float, default=0.5) – Where between the centre (0) and the edge (1) a dual-density spiral changes pitch, and how abruptly.
transition_speed (float, default=12.0) – Where between the centre (0) and the edge (1) a dual-density spiral changes pitch, and how abruptly.
num_points (int, default=1024) – Samples along the polyline. Sets how finely the curve is described, not how many ADC samples the readout takes.
- Returns:
(num_points, 2), in 1/m, starting at the origin.- Return type:
- Raises:
ValueError – If
densityis not one of the three, a dual-density spiral has no outer interleaf count, or any count or shape parameter is out of range.
Examples
>>> import numpy as np >>> import pypulseqpp as pp >>> arm = pp.calc_spiral_trajectory(0.256, 128, 8) >>> bool(np.allclose(arm[0], 0.0)), round(float(np.hypot(*arm[-1])), 6) (True, 250.0)