MRI PLAYGROUND / AN INTERACTIVE EXPERIMENT
Physics of Diffusion MRI
Water moves. Gradients label its position. When spins move between the two gradient pulses, their phases no longer fully cancel—and the signal falls.
The PGSE sequence
Preparing the visual experiment…
How the sequence works
Each row shows a physical gradient component in mT/m: Gᵢ = G nᵢ, where n is the unit direction. The two lobes on each axis have the same sign. The 180° RF pulse reverses phase evolution, so the effective second lobe has the opposite sign.
From phase to signal.
Gradients off: phase stays fixed while water keeps moving. The second pulse probes changed positions, so moving spins generally do not fully refocus. These plots omit relaxation and off-resonance; the 180° pulse is absorbed into the effective-gradient convention.
Try different directions
Rotate the gradient to compare diffusion along and across the fast axis.
Watch the water and its phase.
x → right · y ↑ up · ⊙ z out of screen · same spatial scale
● Anisotropic Gaussian diffusion
Free motion, faster along x than y or z at the default settings.
● Restricted diffusion in a cylinder
Circular x–y cross-section: reflecting walls, with free diffusion along z.
About the particle views
The cylinder restricts x and y equally; z runs along its axis.
80 representative spins are shown in x–y projection; phase includes motion along all three axes. Both views share the same zoom. The scale bar keeps a fixed length on screen and represents 5, 10, or 15 µm. Zoom and the spin-count toggle change only the view; spins outside the window still contribute to the signal. The dashed circle in the Gaussian view marks starting positions, not a boundary.
The equations behind the experiment
The two ideas behind the experiment
b = γ²G²δ²(Δ − δ/3)
Longer or stronger pulses increase sensitivity to motion.
S/S₀ = |〈eiφ〉| · φ = γ ∫ Geff(t) · r(t) dt
Signal is the length of the average phase vector. For Gaussian diffusion at the echo: S/S₀ = exp(−b Dg).
About this teaching prototype & further exploration
This is a fast visual explanation, not a research sequence simulator. Ideal rectangular PGSE gradients and instantaneous RF pulses are assumed. The displayed echo time is 10 + Δ + δ ms: a schematic with 5 ms margins, not a scanner prescription. Relaxation, imaging gradients, ramps, exchange and measurement noise are omitted.
The Gaussian echo uses the analytic expression with Dg = Dₓ nₓ² + Dᵧ nᵧ² + D𝓏 n𝓏², with D𝓏 = Dᵧ and a unit direction n. Illustrative trajectories use 1,200 seeded walkers per environment, 0.1 ms integration steps, and midpoint phase accumulation. The restricted environment is an infinite cylinder along z: reflecting steps at its circular x–y wall and free Gaussian diffusion along z. The restricted echo is a Monte Carlo magnitude estimate, with sampling variability of order 1/√1,200 ≈ 0.03; tiny signals should not be interpreted quantitatively. It is intentionally a small ensemble for responsive interaction. The same seed keeps comparisons stable.
Both populations start uniformly inside a disk at z = 0. Gaussian spins then move freely, without wrapping; spins leaving the displayed window still contribute to the signal. Phases are shown in the toggling frame (RF sign absorbed into the effective gradient). The 180° pulse therefore does not create a visual phase jump. Playback replays the calculated paths at a teaching-friendly speed.
Useful related teaching and simulation examples: ISMRM Interactive Diffusion Course, SimDRIFT theory, dmipy simulation examples, and the DW-MRI Random Walk Simulator. This page is an independent implementation.