flowchart LR A["Strong static field B0<br/>(1.5T / 3T / 7T)"] --> B["Nuclear spins align<br/>and precess (Ch. 1)"] B --> C["Tip them with an RF pulse<br/>→ signal (FID) (Ch. 2)"] C --> D["T1 recovery, T2 decay<br/>= differ by tissue (Ch. 2)"] D --> E["Gradients encode position<br/>→ k-space → image (Ch. 3)"] E --> F["Choose contrast<br/>with TR and TE (Ch. 4)"] F --> G["Separate fat and water (Ch. 5)"] C --> H["Nuclei other than 1H<br/>23Na, 31P (Ch. 6)"]
MRI from Zero
From the principles of T1 and T2 to fat–muscle separation, 23Na and 31P
Introduction
English version — machine-assisted translation (by generative AI, Anthropic Claude) of the original Japanese hands-on. 日本語版はこちら.
This material was created by generative AI (Claude), and the bibliographic details of the cited references (authors, journal, volume, pages, DOI) were checked automatically against Crossref. It has not been reviewed by an expert. Many of the numbers are “typical values / rough guides” and vary with the scanner, imaging parameters, and source. If you find an error, please let the author know.
MRI is a machine that “sends radio waves to atomic nuclei inside the body while it sits in a strong magnet, and then listens to the radio waves that come back.” This material is designed so that even people who are not confident with physics or equations can understand the principles of MRI by trying things out hands-on.
- What exactly are T1 and T2?
- Why is fat bright on T1-weighted images and water bright on T2-weighted images?
- How are fat and muscle separated? (fat suppression, the Dixon method)
- How does 23Na (sodium) or 31P (phosphorus) MRI differ from ordinary MRI?
- What is the difference between NMR, MRS, and MRI?
- What software and Python code are used in real analyses?
We will explain these questions one by one.
Who this is for
- Researchers, graduate students, and engineers who use (or plan to use) MRI data
- People in fields such as body composition, muscle, exercise, and nutrition who want to understand the MRI terms that appear in papers
- High-school physics (magnets, waves, frequency) is all the background you need
How to use this material
Demos that run in the browser
When you move a slider, the signal or graph is recalculated on the spot (Observable JS). No installation needed.
Python code
The code in each chapter runs as-is when copied (numpy / scipy / matplotlib). The figures in the text were made by running this very code.
Links to real papers
In the 23Na chapter, we explain what the measures used in skeletal muscle papers (Gerhalter et al. 2017; Höger et al. 2023; Marton et al. 2026) (TSC, ICwS, TQF, etc.) actually measure.
Chapter overview
| Chapter | Content | Approx. time |
|---|---|---|
| 1 | Nuclei are tiny magnets: spin, precession, Larmor frequency | 15 min |
| 2 | The NMR signal: RF pulses, FID, T1 and T2 | 20 min |
| 3 | Making an image: gradients, k-space, Fourier transform | 20 min |
| 4 | Contrast: TR, TE, and T1/T2 weighting | 20 min |
| 5 | Separating fat and muscle: fat suppression, the Dixon method, fat fraction | 20 min |
| 6 | Multinuclear MRI: 23Na and 31P | 25 min |
| 7 | How NMR, MRS, and MRI differ | 10 min |
| 8 | Quantitative analysis, software, and Python | 25 min |
| 9 | Review quiz | 15 min |
Summary slides for the lecture are here (press F for full screen, Esc for overview).
The big picture
Setting up Python
The code up to Chapter 8 runs with only the following libraries.
pip install numpy scipy matplotlibIn the second half of Chapter 8, where we read real data (DICOM, NIfTI), we additionally use pydicom and nibabel.
pip install pydicom nibabel