Magnetic Resonance Imaging: RF Pulse Excitation, K-Space Sampling, and Superconducting Magnets
Quantum spin precession, Larmor frequency, gradient spatial encoding, and 2D discrete Fourier transform reconstruction in diagnostic MRI.
Magnetic Resonance Imaging (MRI) non-invasively images human soft tissue with sub-millimeter anatomical detail without ionizing radiation. Signal acquisition leverages the nuclear magnetic resonance of hydrogen nuclei ($^1H$ protons) possessing non-zero quantum magnetic dipole moments.
1. Nuclear Magnetization & The Larmor Precession
When placed inside a static external magnetic field $\mathbf{B}_0$ (typically $1.5\text{ T}$ or $3.0\text{ T}$ produced by liquid-helium-cooled niobium-titanium superconducting coils), proton magnetic moments precess around $\mathbf{B}_0$ at the Larmor frequency:
$$\omega_0 = \gamma B_0$$
Where $\gamma$ is the gyromagnetic ratio ($42.58\text{ MHz/Tesla}$ for $^1H$). In a $3\text{ T}$ scanner, $\omega_0 \approx 127.74\text{ MHz}$ (VHF radio band).
A transient $90^\circ$ Radiofrequency (RF) pulse tuned to $\omega_0$ tips net magnetization into the transverse $xy$-plane. As protons relax back to thermal equilibrium, they induce a microvolt Free Induction Decay (FID) signal inside receiver coil loops.
Nuclear Magnetization Precession and RF Excitation
Z (B0 Field) Z
| |
| Net Magnetization |
| / M_z |
| / RF 90 deg Pulse |
|/ -------------> |
+------------> Y +------------> Y (M_xy Transverse)
/ /
/ /
X X
2. Spatial Encoding & K-Space Matrix
To determine where signals originate anatomically in 3D space, magnetic gradient coils ($G_x, G_y, G_z$) superimpose linear magnetic field variations:
- Slice Selection ($G_z$): Applied concurrently with the RF pulse so only a 2 mm axial slice resonates at frequency $\omega$.
- Phase Encoding ($G_y$): Momentarily energized to induce spatial phase shifts along the vertical axis.
- Frequency Encoding ($G_x$): Active during ADC readout, frequency-tagging horizontal pixel coordinates.
Data fills K-space ($k_x, k_y$), representing spatial frequency domains:
$$k_x(t) = \gamma \int G_x(\tau) d\tau, \quad k_y(t) = \gamma \int G_y(\tau) d\tau$$
Image reconstruction is completed by computing the 2D Inverse Fast Fourier Transform (2D-IFFT):
$$I(x, y) = \iint S(k_x, k_y) e^{j 2\pi (k_x x + k_y y)} dk_x dk_y$$
import numpy as np
def reconstruct_mri_kspace(kspace_matrix):
'''
Performs 2D Inverse FFT reconstructing anatomical cross-section image from raw k-space.
'''
# Shift low spatial frequencies from matrix corners to center
shifted_kspace = np.fft.ifftshift(kspace_matrix)
# Execute 2D inverse Fourier transform
reconstructed_complex = np.fft.ifft2(shifted_kspace)
# Shift back
image = np.fft.fftshift(np.abs(reconstructed_complex))
return image
3. Relaxation Contrast: T1 vs T2 Weighting
Different human tissues exhibit divergent intrinsic molecular relaxation time constants:
- T1 Relaxation (Spin-Lattice): Energy transfer back to surrounding molecular framework. Fat aligns rapidly (short T1, bright on T1-weighted images); cerebrospinal fluid aligns slowly (long T1, dark).
- T2 Relaxation (Spin-Spin): Loss of transverse phase coherence due to local magnetic field inhomogeneities. Pathological edema and tumors retain free water, showing bright signals on T2-weighted scans.
Combining accelerated compressed sensing with parallel RF receiver channels enables modern diagnostic MRI to capture crisp volumetric scans of beating hearts and vascular brain aneurysms within seconds.