NMR and MRI physics · Intermediate

Ernst angle signal optimum

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

The Ernst angle is the flip angle that maximizes steady-state signal in a spoiled gradient-echo or repeated-pulse experiment when the repetition time TR is short compared with T1. It depends only on the ratio TR/T1 and gives the best compromise between how much magnetization is tipped into the transverse plane and how much longitudinal magnetization has recovered between pulses.

Intuition

If you use a 90 degree pulse with a short TR, you wipe out the longitudinal magnetization each time, and it has little time to regrow, so later signals become small. If you use a tiny flip angle, the magnetization stays near equilibrium but you only tip a small fraction into the transverse plane, so the signal is small too. Somewhere in between is a best flip angle. The shorter TR is relative to T1, the smaller this optimal angle becomes. For TR much longer than T1, the optimum approaches 90 degrees.

Key equations

E1=e−TR/T1
(1)

Fraction of longitudinal magnetization that remains after one repetition time as it recovers toward equilibrium.

S(α)=M0(1−E1)sin⁡α1−E1cos⁡α
(2)

Steady-state spoiled gradient-echo signal (T2∗ weighting ignored) as a function of flip angle α.

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

Ernst angle condition that maximizes the steady-state signal.

Derivation

  1. Before a pulse, the steady-state longitudinal magnetization is Mz. After the pulse it is Mzcos⁡(α), and the transverse magnetization is Mzsin⁡(α).
  2. During TR, with complete spoiling of the transverse magnetization, Mz recovers: Mz−=M0(1−e−T1/TR)+e−T1/TRMz−cos⁡(α).
  3. Solve for Mz−: Mz−=M0(1−E1)/(1−E1cos⁡(α)).
  4. Signal is proportional to the transverse magnetization: S=Mz−sin⁡(α)=M0(1−E1)sin⁡(α)/(1−E1cos⁡(α)).
  5. Differentiate with respect to α and set dSdα=0. The numerator of the derivative is cos⁡(α)(1−E1cos⁡(α))−E1sin2⁡(α)=cos⁡(α)−E1.
  6. Setting this to zero gives cos(alpha_E) = E1 = exp(-TR/T1).

Worked example

Problem

Tissue has T1=1000 ms. A spoiled gradient-echo sequence uses TR=20 ms. Find the Ernst angle and the relative signal compared with M0.

  1. Compute E1 = exp(-20/1000) = exp(-0.02) = 0.9802.
  2. The Ernst angle satisfies cos⁡(α)=0.9802, so α=arccos⁡(0.9802)≈11.4 degrees.
  3. The signal is S=M0(1−0.9802)sin⁡(11.4∘)/(1−0.9802⋅0.9802).
  4. Numerator: 0.0198 × 0.1977 = 0.003915.
  5. Denominator: 1 - 0.9608 = 0.0392.
  6. S≈0.0999M0, about 10 percent of M_0.

Answer The Ernst angle is about 11 degrees, giving a steady-state signal of about 0.10 M0.

Common mistakes

  • Assuming 90 degrees always gives the most signal; this is true only when TR is much longer than T1.
  • Applying the formula without spoiling, or to balanced SSFP sequences, where the optimum depends on T2/T1 as well.
  • Using the wrong tissue T1 or mixing units for TR and T1.
  • Forgetting that maximizing signal from one tissue does not maximize contrast between tissues.
  • Ignoring T2* and TE decay, which scale the signal but do not change the Ernst angle.

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

# Constants
TR = 1.0  # Repetition time (normalized)
T1 = 1.0  # T1 relaxation time (normalized)

def signal(theta, t1=T1, tr=TR, m0=1.0):
    """
    Steady-state signal magnitude for a spoiled gradient echo sequence.
    S = M0 * sin(theta) * (1 - exp(-TR/T1)) / (1 - cos(theta)*exp(-TR/T1))
    """
    e = np.exp(-tr / t1)
    num = m0 * np.sin(theta) * (1 - e)
    den = 1 - np.cos(theta) * e
    # Avoid division by zero at theta=0
    if abs(den) < 1e-9:
        return 0.0
    return num / den

def compute_optimum():
    """Compute the Ernst angle and max signal."""
    # Analytical solution: cos(Ernest) = exp(-TR/T1)
    cos_e = np.exp(-TR / T1)
    theta_rad = np.arccos(cos_e)
    theta_deg = np.degrees(theta_rad)
    s_max = signal(theta_rad)
    return theta_deg, s_max

class Main(Scene):
    def construct(self):
        self.camera.background_color = "#101418"
        
        # Title
        TitleCard(self, "Ernst Angle", "Optimal Flip Angle for Signal")

        # Compute values
        theta_opt_deg, s_opt = compute_optimum()
        theta_opt_rad = np.radians(theta_opt_deg)

        # Define the signal function for plotting
        # We normalize signal by M0 for the plot
        def norm_signal(theta_deg):
            return signal(np.radians(theta_deg)) / 1.0

        # Plot setup
        # X range: 0 to 90 degrees
        # Y range: 0 to slightly above max signal
        y_max_plot = 1.5
        plot = CurvePlot(
            func=lambda x: norm_signal(x),
            x_range=(0, 90, 10),
            y_range=(0, y_max_plot, 0.5),
            x_label="Flip Angle (deg)",
            y_label="Signal (norm)",
            color=C_MAIN,
            x_length=7.0,
            y_length=4.0
        )
        # Center the plot more to avoid edge clipping
        plot.shift(LEFT * 1.5 + DOWN * 0.2)
        
        self.play(Create(plot.axes), FadeIn(plot.labels))
        self.play(Create(plot.curve), run_time=2.5)

        # Mark the optimum point
        dot = plot.dot_at(theta_opt_deg)
        
        # Draw dashed lines to axes
        x_proj = DashedLine(
            plot.axes.c2p(theta_opt_deg, 0), 
            plot.axes.c2p(theta_opt_deg, norm_signal(theta_opt_deg)),
            color=C_ACCENT, stroke_width=2
        )
        y_proj = DashedLine(
            plot.axes.c2p(0, 0), 
            plot.axes.c2p(0, norm_signal(theta_opt_deg)),
            color=C_ACCENT, stroke_width=2
        )
        
        # Label for the optimum
        label_opt = Text(f"Ernst Angle: {theta_opt_deg:.1f}°", font_size=28, color=C_ACCENT)
        label_opt.next_to(dot, UP + RIGHT, buff=0.2)
        
        self.play(Create(x_proj), Create(y_proj), FadeIn(dot), FadeIn(label_opt), run_time=1.5)

        # Equation
        eq = MathTex(r"\cos(\alpha_E) = e^{-TR/T_1}", font_size=32)
        eq.to_edge(RIGHT, buff=0.5).shift(UP * 1.5)
        self.play(Write(eq))
        
        eq2 = MathTex(r"\alpha_E = \arccos(e^{-TR/T_1})", font_size=32)
        eq2.next_to(eq, DOWN, buff=0.3)
        self.play(Write(eq2))

        StepCaption(self, f"For TR=T1, the optimal flip angle is {theta_opt_deg:.1f} degrees.")
        self.wait(2)


if __name__ == "__main__" and "--selftest" in sys.argv:
    # Test 1: Signal at 0 is 0
    assert abs(signal(0.0)) < 1e-12
    # Test 2: Signal at 180 is 0 (sin(180)=0)
    assert abs(signal(np.pi)) < 1e-12
    # Test 3: Compute optimum and verify it matches the formula
    cos_e = np.exp(-TR / T1)
    theta_rad = np.arccos(cos_e)
    theta_deg = np.degrees(theta_rad)
    s_opt = signal(theta_rad)
    
    # Verify signal at optimum is higher than at 90 degrees
    s_90 = signal(np.pi / 2)
    assert s_opt > s_90, f"Optimum signal {s_opt} should be > 90 deg signal {s_90}"
    
    # Verify the cosine relationship
    assert abs(np.cos(theta_rad) - cos_e) < 1e-10
    
    # Verify specific value for TR=T1
    # cos(alpha) = e^-1 = 0.3678...
    # alpha = arccos(0.3678) = 68.5 degrees approx
    assert abs(theta_deg - 68.5) < 0.1, f"Expected ~68.5, got {theta_deg}"
    
    print("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.