From 21483cbdf9d9a9be58d92443e87ad7a7aa0f68f6 Mon Sep 17 00:00:00 2001 From: Timothy Nunn Date: Tue, 29 Sep 2026 09:53:11 +0100 Subject: [PATCH] Fall back to 1mm outboard SOL power decay in plotting --- process/core/io/plot/summary.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/process/core/io/plot/summary.py b/process/core/io/plot/summary.py index feb7581894..c3bb44e9f2 100644 --- a/process/core/io/plot/summary.py +++ b/process/core/io/plot/summary.py @@ -9104,10 +9104,13 @@ def plot_brunner_divertor_power_split_comparison_stackplot( axis: plt.Axes, mfile: MFile, scan: int ): """Plot Brunner divertor power split fractions as a stack plot over dr_sep.""" - # Use the case decay length when available; fall back to 1 mm if absent. - len_plasma_sol_outboard_pd = mfile.get("len_sol_outboard_power_decay", scan=scan) len_plasma_sol_inboard_pd = mfile.get("len_sol_inboard_power_decay", scan=scan) + + # Use the case decay length when available; fall back to 1 mm if absent. + if not np.isfinite(len_plasma_sol_outboard_pd) or len_plasma_sol_outboard_pd == 0.0: # noqa: RUF069 + len_plasma_sol_outboard_pd = 0.001 + colors = plt.cm.plasma(np.linspace(0.15, 0.85, 4)) dr_sep_values = np.linspace(