---
title: "MRI k-Space: Skip Lines, Fold the Head, Fill the Gaps Interactive Lab | Sandbox Physics"
description: "Each line of k-space costs one repetition. Which lines can you skip, and what does the image lose?"
canonical_url: "https://sandboxphysics.com/labs/mri-k-space-reconstruction/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/mri-k-space-reconstruction/"
last_modified: "2026-10-30"
---

FR35 · MRI

# MRI k-Space: Skip Lines, Fold the Head, Fill the Gaps

**Each line of k-space costs one repetition. Which lines can you skip, and what does the image lose?** Skipping k-space rows saves scan time, and which rows you skip decides what the image loses. Skipping every other row halves the field of view, so two copies of the head overlap. Keeping only central rows blurs fine detail. Random skipping leaves faint ripples; a fit that favours few wavelet details removes part of them, roughly halving the error at double speed in a 64-row model.

A head phantom is scanned one k-space line at a time. Skip lines regularly and the head folds; skip them at random and a sparse fit recovers part of the detail.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

Two-dimensional Cartesian model on a 64 by 64 grid in the rotating frame. The phantom is a sum of uniform ellipses defined for this course, so every k-space sample is its exact analytic transform; seeded complex Gaussian noise is added. Each phase-encode line costs one repetition time of 2 s, the value used in the MIT 6.3000 handout. There is no relaxation contrast, no coil sensitivity, no motion and no off-resonance. The sparse fit is an iterative soft threshold of Haar wavelet details that keeps every recorded sample; its weight is checked on lines held out from the fit. Numbers are a teaching model, not scanner performance.

k-space record (log scale; pink ticks: held-out rows)

Reconstruction: missing lines set to zero

Ideal reference: phantom averaged per pixel

Sparsity weight chosen from held-out rows

More numbers and how they are checked

- **Rows recorded**: $0$
- **Rows held out to check the fit weight**: $0$
- **Row spacing in spatial frequency**: $0$
- **Largest spatial frequency on the grid**: $0$
- **Pixel width**: $0$
- **Receiver noise relative to mean image brightness**: $0$
- **Held-out row error at the chosen weight**: $0$
- **Weight with the smallest held-out error**: $0$
- **Weight with the smallest error against the full scan**: $0$
- **Full noise-free scan against the ideal phantom**: $0$

Errors are root-mean-square differences of complex images divided by the norm of the full noise-free scan on the same grid. Dot contrast is the image value at the three small dots minus the value between them, as a share of the same quantity in the full scan. Leaving rows at zero can never predict a held-out row, so its held-out error is 100 %.

Physics tutorial

## An image assembled one k-space line at a time

**Background** In a two-dimensional scan, a short gradient pulse along y winds a phase pattern across the head before each readout. The readout gradient along x then sweeps one row of spatial frequencies. One row costs one repetition, so the number of rows sets the scan time.

**Why it matters** The MIT 6.3000 handout works out that 256 rows at 2 s each take about 8.5 minutes. Recording fewer rows saves time, but the image is a Fourier sum over the grid, so the missing rows have to be paid for somewhere.

Start with the essentials

- **Focus question**: Each line of k-space costs one repetition. Which lines can you skip, and what does the image lose?
- **One-sentence intuition**: The row spacing $\Delta k_y$ fixes the field of view $1/\Delta k_y$. Keep every second row and the spacing doubles, so the field of view halves and two copies of the head overlap. Skip rows at random instead and the missing energy spreads into faint noise-like ripples, which a fit that prefers sparse wavelet coefficients can partly remove.

### Core mathematical model

#### Every sample sees the whole head

$$
d(k_x,k_y)=\iint\rho(x,y)\,e^{-i2\pi(k_xx+k_yy)}\,\mathrm{d}x\,\mathrm{d}y,\qquad k_y=\bar\gamma\int G_y\,\mathrm{d}t
$$

One sample is the overlap of the whole head with one stripe pattern, which is the colour pattern drawn on the stage. The sign follows the MIT 6.3000 handout.

#### Regular skipping folds the image

$$
\hat m(y)=\frac{1}{R}\sum_{j=0}^{R-1}m\!\left(y+j\,\frac{\mathrm{FOV}}{R}\right)
$$

Zero-filling every $R$-th row gives the average of $R$ copies shifted by a fraction of the field of view (wrapped around the grid).

#### A sparse fit for random skipping

$$
\hat m=\arg\min_m\ \tfrac12\left\|M\mathcal{F}m-d\right\|_2^2+\lambda\left\|\Psi m\right\|_1
$$

This is the Lagrangian form in Lustig, Donoho and Pauly (2007). Here $\Psi$ is a three-level Haar transform and the weight $\lambda$ is checked on rows held out from the fit.

### Common difficulties

#### A k-space sample is not a pixel

**Typical misconception** Each point of k-space belongs to one point of the image, so a missing row leaves a missing strip in the head.

**Better mental model** Each sample is a stripe pattern across the whole head. Dropping rows near the centre removes the broad brightness; dropping outer rows removes edges and small dots. No single strip of the image goes missing.

### Run the experiment

1. 01

   #### Watch the grid fill

   Start with Every line: the full scan and watch the stage and the k-space record together.

   **What to observe:** The first rows are near the centre and their stripes are wide; later rows sit further out and their stripes are fine. The brightest samples sit at the centre of the grid.

2. 02

   #### Skip every other row

   Choose Skip every other line: the head folds.

   **What to observe:** The scan time halves, and a second copy of the head appears shifted by half the field of view, as in the MIT handout.

3. 03

   #### Skip at random, then fit

   Compare Random lines, gaps left empty with Random lines, sparse fit fills gaps, then click rows of the k-space record to drop or add them.

   **What to observe:** No copy appears. The sparse fit roughly halves the error and brings the small dots back, but not fully: at this matrix size line skipping buys about a factor of two.

Physical conclusion

Row spacing sets the field of view, the outermost row sets the resolution, and the rows you skip decide whether the error looks like a folded copy or like noise. Only noise-like error can be fitted away.

## Related experiments and articles

MRI spatial encoding · Reading path

### From precessing water to k-space, undersampling and diffusion

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **k-space: measuring the Fourier transform of an image line by line**](https://sandboxphysics.com/stories/mri-spatial-encoding/k-space-and-fourier-imaging/)
2. [Article **Sampling, wraparound and resolution: what one missing line does**](https://sandboxphysics.com/stories/mri-spatial-encoding/sampling-aliasing-and-resolution/)
3. [Article **Undersampled reconstruction: why random skipping can be repaired and regular skipping cannot**](https://sandboxphysics.com/stories/mri-spatial-encoding/undersampling-and-regularized-reconstruction/)
4. [Article **Reading the 2007 Sparse MRI paper by Lustig, Donoho and Pauly**](https://sandboxphysics.com/stories/mri-spatial-encoding/reading-lustig-2007/)

Quantum & fields · Starter path

## Start from a single measurement

Predict an outcome, then count what the measurements actually give. The path starts with one qubit and moves on to wave packets, bound states and two-photon interference.

[Start here → **Quantum State & Born Measurement** Predict a probability, turn the analyzer, then compare your prediction with the measured frequency over many shots. Observe · 15 min](https://sandboxphysics.com/labs/qubit-state/)

1. [1 Quantum State & Born Measurement](https://sandboxphysics.com/labs/qubit-state/)
2. [2 Stern–Gerlach Sequence](https://sandboxphysics.com/labs/stern-gerlach-sequence/)
3. [3 Wave Packet & Uncertainty](https://sandboxphysics.com/labs/wave-packet-uncertainty/)
4. [4 Quantum Harmonic Oscillator](https://sandboxphysics.com/labs/quantum-harmonic-oscillator/)
5. [5 Which Path & Quantum Eraser](https://sandboxphysics.com/labs/quantum-eraser/)
6. [6 Hong–Ou–Mandel Two-Photon Interference](https://sandboxphysics.com/labs/hong-ou-mandel/)

[View the full path →](https://sandboxphysics.com/topics/quantum/#starter-path)
