NMR and MRI physics · Intermediate

Gradient echo sequence and T2* decay

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

A gradient echo sequence uses a low flip angle excitation and a reversal of a magnetic field gradient to refocus signal, without a 180 degree pulse. Because static field inhomogeneities are not refocused, signal decays with T2* rather than T2, making the sequence fast but sensitive to susceptibility effects.

Intuition

After excitation, spins in the transverse plane precess at slightly different frequencies. Some difference comes from random spin-spin interactions (true T2), and some from fixed field inhomogeneities, such as air-tissue interfaces or iron in blood products. A gradient pulse deliberately dephases spins; reversing it rewinds only that deliberate dephasing, producing an echo. Fixed inhomogeneity dephasing keeps accumulating, so the echo peak is smaller the longer TE is. A small flip angle leaves much longitudinal magnetization intact, allowing short TR and fast imaging. The simulation lets students watch a fan of spin vectors dephase, see the gradient flip bring them into alignment, and compare the echo envelope with T2* decay.

Key equations

1T2∗=1T2+γΔB0
(1)

T2* relaxation rate is the true T2 rate plus a contribution from field inhomogeneity (ΔB0 is the spread in field; the term is expressed in rate units).

S(TE)=S0e−TE/T2∗
(2)

Gradient echo signal amplitude at echo time TE decays with T2*.

αE=arccos⁡(e−TR/T1)
(3)

Ernst angle: flip angle that maximizes steady-state signal for given TR and T1.

S∝M0sin⁡α(1−e−TR/T1)1−cos⁡αe−TR/T1e−TE/T2∗
(4)

Spoiled gradient echo steady-state signal.

Derivation

  1. After excitation, each spin has phase φ(t)=ω t, where ω includes the Larmor frequency offset from inhomogeneity and any applied gradient.
  2. Without a gradient, offsets from ΔB0 produce a spread of phases, so net transverse magnetization falls faster than by T2 alone: 1/T2* = 1/T2 + 1/T2'.
  3. Apply a negative readout gradient lobe: spins dephase proportional to position, φ=-γGx t.
  4. Reverse the gradient to positive: the gradient-induced phase accumulates back, reaching zero at time TE when the areas of the two lobes are equal.
  5. At that moment the gradient dephasing is cancelled, giving an echo, but the dephasing from ΔB0 has not been reversed, since no 180 degree pulse acted.
  6. Therefore the echo peak amplitude follows S0exp⁡(−TE/T2∗).
  7. Using steady-state Bloch solutions with spoiled transverse magnetization gives the signal equation, maximized at the Ernst angle.

Worked example

Problem

A gradient echo scan has T2 = 80 ms and T2' = 40 ms (field inhomogeneity contribution). Find T2*, and the signal fraction remaining at TE = 20 ms compared with TE = 5 ms.

  1. Rate: 1/T2* = 1/80 + 1/40 = 0.0125 + 0.025 = 0.0375 per ms.
  2. T2* = 1/0.0375 = 26.7 ms.
  3. Signal at TE = 5 ms: exp(-5/26.7)=exp(-0.1875)=0.829.
  4. Signal at TE = 20 ms: exp(-20/26.7)=exp(-0.75)=0.472.
  5. Ratio = 0.472/0.829 = 0.57.

Answer T2∗≈26.7 ms; the signal at TE 20 ms is about 47% of S0, roughly 57% of that at TE 5 ms.

Common mistakes

  • Saying the gradient reversal refocuses all dephasing; it refocuses only the gradient-induced part.
  • Assuming T2* is longer than T2; it is always shorter or equal.
  • Using a 90 degree flip angle with very short TR, which saturates the signal.
  • Forgetting that susceptibility artifacts (signal voids near air or metal) grow with TE.
  • Confusing gradient echo with spin echo, where a 180 degree pulse does refocus static inhomogeneity.

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(105 lines)
from manim import *
import numpy as np
import sys
from blocks import *
from mri_blocks import *

# ---- sequence timing (ms, same units as diagram t_max) ----
T_MAX = 10.0
T_RF = 1.0                    # centre of the 90 deg excitation
PRE = (2.0, 3.5, -1.0)        # Gx prephaser (t0, t1, amp)
RO = (3.5, 9.5, 0.5)          # Gx readout (t0, t1, amp)
G_SCALE = 800.0               # Hz per unit gradient per unit position
DT = 0.25                     # ms simulation step
N_ISO = 12
XS = np.linspace(-1, 1, N_ISO)


def gx(t_mid):
    """Readout-gradient amplitude at time t_mid (ms)."""
    if PRE[0] <= t_mid < PRE[1]:
        return PRE[2]
    if RO[0] <= t_mid < RO[1]:
        return RO[2]
    return 0.0


def simulate(df_spread=15.0, T2=0.05):
    """Bloch-simulate the gradient echo; return times (ms), Mxy history (n,steps), |signal|."""
    events = [{"type": "rf", "flip": np.pi / 2}]
    t = T_RF
    while t + DT <= T_MAX + 1e-9:
        events.append({"type": "grad", "dt": DT * 1e-3, "g": G_SCALE * gx(t + DT / 2), "pos": XS})
        t += DT
    dfs = isochromat_offsets(N_ISO, df_spread, "lorentzian", seed=1) if df_spread > 0 else np.zeros(N_ISO)
    times, hist = bloch_simulate(events, np.array([0, 0, 1.0]), 1.0, T2, dfs)
    times_ms = T_RF + times[1:] * 1e3          # drop pre-pulse sample
    mxy = hist[:, 1:, 0] + 1j * hist[:, 1:, 1]
    sig = np.abs(mxy.mean(axis=0))
    return times_ms, mxy, sig


TE_EXPECTED = RO[0] + abs(PRE[2] * (PRE[1] - PRE[0])) / RO[2]   # gradient area cancels


class Main(Scene):
    def construct(self):
        self.camera.background_color = "#111111"
        TitleCard(self, "Gradient echo and T2* decay", "Dephase, then rephase with Gx")

        # --- timing diagram (top) ---
        seq = PulseSequenceDiagram(rows=("RF", "Gz", "Gy", "Gx", "ADC"), t_max=T_MAX,
                                   width=12.5, height=3.0).move_to([0, 1.2, 0])
        parts = VGroup(
            seq.add_rf(0.5, 1.5, kind="sinc", label="90°"),
            seq.add_gradient("Gz", 0.4, 1.6, 1.0),
            seq.add_gradient("Gz", 1.7, 2.4, -0.8),
            seq.add_gradient("Gy", 2.0, 3.5, 0.7, color=C_MAIN),
            seq.add_gradient("Gy", 2.0, 3.5, -0.7, color=C_MAIN),
            seq.add_gradient("Gx", PRE[0], PRE[1], PRE[2], shape="rect"),
            seq.add_gradient("Gx", RO[0], RO[1], RO[2] * 2, shape="rect"),
            seq.add_adc(4.0, 9.0),
            seq.add_marker(TE_EXPECTED, "echo (TE)", color=C_ACCENT),
        )
        self.play(Create(seq), run_time=1.0)
        self.play(FadeIn(parts), run_time=1.0)

        # --- simulation views (bottom) ---
        times, mxy, sig = simulate()
        fan = IsochromatFan(n=N_ISO, radius=0.95).move_to([-4.3, -2.15, 0])
        sp = SignalPlot(x_range=(0, 10, 2), y_range=(0, 1, 0.5), x_label="t (ms)",
                        y_label="|S|", width=6.0, height=1.7).move_to([2.6, -2.1, 0])
        env = DashedVMobject(sp.plot(times, sig[0] * np.exp(-(times - T_RF) / 50.0), color=C_DIM))
        self.play(FadeIn(fan), FadeIn(sp), run_time=0.8)
        cursor = seq.time_cursor()
        self.add(cursor)
        StepCaption(self, "Prephaser fans spins out; readout gradient refocuses them")

        path = sp.plot(times[:2], sig[:2])
        self.add(path)
        for k in range(0, len(times), 2):
            ph, ln = np.angle(mxy[:, k]), np.abs(mxy[:, k])
            new = sp.plot(times[:k + 1], sig[:k + 1]) if k > 0 else sp.plot(times[:2], sig[:2])
            self.play(seq.cursor_to(times[k]), *fan.set_phases(ph, ln),
                      Transform(path, new), run_time=0.4, rate_func=linear)
        self.play(Create(env), run_time=0.6)
        StepCaption(self, "Echo peaks when gradient area cancels; T2* spread lowers it")
        self.wait(0.8)
        StepCaption(self, "Gradient echo: gradients refocus, T2* does not.")
        self.wait(1.0)


if __name__ == "__main__" and "--selftest" in sys.argv:
    t, m, s = simulate()
    after = np.where(t >= PRE[1])[0]
    k = int(after[np.argmax(s[after])])
    assert abs(t[k] - TE_EXPECTED) <= 0.3, (t[k], TE_EXPECTED)
    assert abs(TE_EXPECTED - 6.5) < 1e-9
    assert s[0] > 0.95                       # right after 90 deg: full transverse signal
    i_pre_end = int(np.argmin(np.abs(t - PRE[1])))
    assert s[i_pre_end] < 0.5 * s[0]         # dephased after prephaser
    t0, m0, s0 = simulate(df_spread=0.0, T2=np.inf)
    k0 = int(np.argmin(np.abs(t0 - TE_EXPECTED)))
    assert s0[k0] > 0.99                     # pure gradient dephasing fully refocused
    assert s[k] < s0[k0]                     # T2* losses reduce echo
    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.