NMR and MRI physics · Advanced

Spiral k-space trajectory

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

A spiral k-space trajectory samples the spatial-frequency plane along a curve that winds outward from the center, driven by sinusoidal, amplitude-ramped gradient waveforms. It covers k-space efficiently with smooth gradients, enabling fast imaging, but is sensitive to off-resonance blurring and requires gridding for reconstruction.

Intuition

In MRI the position in k-space is the time integral of the gradient waveform: k(t)=γ2π∫G. If both x and y gradients oscillate sinusoidally with slowly growing amplitude, with a 90 degree phase shift, the k-space point traces a spiral. Unlike echo-planar imaging, there are no sharp turnarounds, so the gradient hardware is used gently and continuously. Starting at the center, where most signal and contrast energy lies, each turn adds a ring of higher spatial frequencies. The limits are the maximum gradient amplitude and the maximum slew rate. Early in the spiral the slew rate limits how fast k can grow; later the amplitude limit takes over. The price of efficiency is that field inhomogeneity makes phase accumulate during a long readout, blurring the image instead of distorting it geometrically.

Key equations

𝐤(t)=γ2π∫0t𝐆(τ)dτ
(1)

k-space position is the integrated gradient waveform.

k(θ)=N2FOVθ2π(Archimedean)
(2)

Radius grows linearly with angle; N is the number of interleaves-adjusted turns, with spacing 1/FOV per turn for single shot.

kx+iky=k(t)eiθ(t)
(3)

Complex notation for the spiral path.

𝐆(t)=2πγd𝐤dt,|𝐆|≤Gmax,|d𝐆dt|≤Smax
(4)

Gradients follow from the trajectory and must respect hardware limits.

Δkr=1FOV
(5)

Radial spacing between turns that avoids aliasing within the field of view.

Derivation

  1. Start with k(t)=γ2π∫G(t)dt.
  2. Choose an Archimedean spiral: k(t)=Aθ(t)eiθ(t), so radius increases by 2πA per turn.
  3. Require turn spacing equal to 1/FOV for each interleave: 2piA = 1/(FOV n_int), giving A = 1/(2pi FOV n_int).
  4. Differentiate to get the gradient: G is proportional to dkdt=A(dθdt)(1+iθ)eiθ.
  5. For constant angular rate, gradient magnitude grows with θ and slew rate is limited early, so θ(t) is chosen to satisfy the slew limit.
  6. When |G| reaches Gmax, solve for θ(t) so that |dkdt| is constant, which is the amplitude-limited regime.
  7. The readout ends when k reaches kmax = 1/(2 Δx), set by the desired resolution.

Worked example

Problem

A single-shot spiral has FOV = 24 cm and resolution 2 mm (Δx = 0.2 cm). Find the number of turns needed, assuming Archimedean spacing of 1/FOV.

  1. kmax = 1/(2Δx) = 1/(0.4 cm) = 2.5 cm^-1.
  2. Turn spacing Δk = 1/FOV = 1/24 = 0.0417 cm^-1.
  3. Number of turns = kmax/Δk = 2.5 × 24 = 60.
  4. With 4 interleaves each spiral needs only 60/4 = 15 turns.

Answer About 60 turns for a single shot, or about 15 turns per interleave with 4 interleaves.

Common mistakes

  • Thinking spiral gradients are zero at the start; they ramp up from zero, but k starts at the center.
  • Sampling data uniformly in k-space and using a plain FFT; non-Cartesian data need gridding with density compensation.
  • Ignoring slew-rate limits and designing only for gradient amplitude.
  • Assuming off-resonance gives geometric distortion as in EPI; in spiral it gives blurring.
  • Using turn spacing larger than 1/FOV, which causes aliasing artifacts.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

scene.py(92 lines)
from manim import *
from blocks import *
from mri_blocks import *
import numpy as np
import sys

# ---- timing (ms) and spiral parameters ----
T_MAX = 10.0
RF0, RF1 = 0.5, 1.5            # slice-selective sinc pulse
SS0, SS1 = 0.3, 1.7            # slice-select gradient
RW0, RW1 = 1.8, 2.4            # slice rephaser
RO0, RO1 = 2.5, 9.5            # spiral readout / ADC
N_TURNS = 4
K_MAX = 0.95                   # normalised k-space radius


def spiral_k(t):
    """Archimedean spiral k(t) = K_MAX*s*exp(i 2 pi N s), s=(t-RO0)/(RO1-RO0)."""
    s = np.clip((np.asarray(t, float) - RO0) / (RO1 - RO0), 0, 1)
    return K_MAX * s * np.exp(1j * 2 * np.pi * N_TURNS * s)


def spiral_gradients(n=600):
    """Return t, k, and gradients g = dk/dt (gamma absorbed) on a fixed grid."""
    t = np.linspace(RO0, RO1, n)
    k = spiral_k(t)
    g = np.gradient(k, t)
    return t, k, g


def lobe_curve(diag, row, ts, amps, color):
    """Polyline of a gradient waveform on a diagram row."""
    pts = [diag._pt(ti, row, a) for ti, a in zip(ts, amps)]
    return VMobject(color=color, stroke_width=3).set_points_as_corners(pts)


class Main(Scene):
    def construct(self):
        TitleCard(self, "Spiral k-space trajectory", "Oscillating Gx, Gy trace a spiral from the centre")

        # ---- timing diagram (upper-left) ----
        diag = PulseSequenceDiagram(rows=("RF", "Gz", "Gy", "Gx", "ADC"), t_max=T_MAX,
                                    width=8.0, height=4.2)
        diag.move_to([-2.7, 0.3, 0])
        t, k, g = spiral_gradients()
        gn = 0.9 / np.max(np.abs(g))
        ts_full = np.concatenate([[RO0], t, [RO1]])
        gx = np.concatenate([[0], g.real * gn, [0]])
        gy = np.concatenate([[0], g.imag * gn, [0]])
        rf = diag.add_rf(RF0, RF1, kind="sinc", amp=0.9)
        gz = VGroup(diag.add_gradient("Gz", SS0, SS1, amp=0.8),
                    diag.add_gradient("Gz", RW0, RW1, amp=-0.8))
        gyc = lobe_curve(diag, "Gy", ts_full, gy, C_GOOD)
        gxc = lobe_curve(diag, "Gx", ts_full, gx, C_GOOD)
        adc = diag.add_adc(RO0, RO1)
        te = diag.add_marker(RO0, "TE")
        cursor = diag.time_cursor()

        # ---- k-space (right) ----
        ksp = KSpacePlot(nx=12, ny=12, size=3.2).move_to([4.4, 0.1, 0])

        self.play(FadeIn(diag), FadeIn(ksp))
        self.play(Create(rf), FadeIn(gz), Create(gyc), Create(gxc), FadeIn(adc), FadeIn(te), run_time=1.5)
        self.add(cursor)
        StepCaption(self, "Excite a slice: k-space starts at the centre")
        self.play(diag.cursor_to(RO0), run_time=1.0, rate_func=linear)

        # ---- readout: cursor and computed trajectory advance together ----
        StepCaption(self, "k(t) is the time integral of (Gx, Gy): growing sinusoids give a spiral")
        n_seg = 6
        edges = np.linspace(0, len(t) - 1, n_seg + 1).astype(int)
        for a, b in zip(edges[:-1], edges[1:]):
            pts = [(k[i].real, k[i].imag) for i in range(a, b + 1)]
            self.play(diag.cursor_to(t[b]), ksp.trajectory(pts, run_time=1.2),
                      run_time=1.2, rate_func=linear)

        StepCaption(self, "Takeaway: one shot of oscillating gradients covers k-space centre-out")
        self.wait(1.5)


if __name__ == "__main__" and "--selftest" in sys.argv:
    t, k, g = spiral_gradients()
    assert abs(k[0]) < 1e-12                      # starts at k-space centre
    assert abs(abs(k[-1]) - K_MAX) < 1e-9         # ends at the edge
    assert np.all(np.diff(np.abs(k)) >= -1e-12)   # radius grows monotonically
    ang = np.unwrap(np.angle(k[1:]))
    assert abs((ang[-1] - ang[0]) / (2 * np.pi) - N_TURNS) < 0.05
    # integrating the gradients reproduces the trajectory
    kint = np.concatenate([[0], np.cumsum(0.5 * (g[1:] + g[:-1]) * np.diff(t))])
    assert np.max(np.abs(kint - k)) < 0.02
    assert RF1 < RO0 < RO1 <= T_MAX
    print("selftest ok")

The Manim scene code that draws this lesson's animation in the Signals AI app (Python, Manim Community).

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.