summaryrefslogtreecommitdiff
path: root/ep_run/probe_cx3_rhogrid.py
diff options
context:
space:
mode:
Diffstat (limited to 'ep_run/probe_cx3_rhogrid.py')
-rw-r--r--ep_run/probe_cx3_rhogrid.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ep_run/probe_cx3_rhogrid.py b/ep_run/probe_cx3_rhogrid.py
index 7c27a2d..e154fec 100644
--- a/ep_run/probe_cx3_rhogrid.py
+++ b/ep_run/probe_cx3_rhogrid.py
@@ -123,7 +123,9 @@ for spec in a.ckpts.split(','):
if res_list[i - 1] > 1e-7]
tail = ratios[-6:] if len(ratios) >= 6 else ratios
rho_tail = float(np.median(tail)) if tail else float('nan')
- diverged = (not np.isfinite(res_list[-1])) or res_list[-1] > 1e-2 or rho_tail > 1.0
+ # resK-primary verdict: rho~1 AT THE FP FLOOR is noise/noise (documented artifact),
+ # not divergence — rho only counts when the residual is materially off-floor
+ diverged = (not np.isfinite(res_list[-1])) or res_list[-1] > 1e-2 or (rho_tail > 1.0 and res_list[-1] > 1e-4)
verdict = 'DIVERGE' if diverged else 'converge'
if diverged and bstar is None: bstar = beta
print(f'{beta:>7.3f} {res_list[0]:>10.2e} {(res_list[1] if len(res_list)>1 else float("nan")):>10.2e} '