From 64694331e3af7dfe89eea336911f4b5b255c4f99 Mon Sep 17 00:00:00 2001 From: menzel Date: Wed, 1 Jul 2026 17:57:37 +0200 Subject: [PATCH] Update predict_gap constants to corrected 3-parameter fit Replace the 4-parameter (quadratic) constants with the 3-parameter pure-exponential fit from plot_intensity_map.py (operating-locus calibration, gap-residual RMS ~14 um). c2 was insignificant (0.2 sigma) and left E_inf degenerate (+/-11 keV). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../plugins/cSAXS/intensity_map_predict_gap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/cSAXS/intensity_map_predict_gap.py b/csaxs_bec/bec_ipython_client/plugins/cSAXS/intensity_map_predict_gap.py index e991ba7..dbdc992 100755 --- a/csaxs_bec/bec_ipython_client/plugins/cSAXS/intensity_map_predict_gap.py +++ b/csaxs_bec/bec_ipython_client/plugins/cSAXS/intensity_map_predict_gap.py @@ -5,7 +5,7 @@ import numpy as np def predict_gap(energy, n=3, gap_min=5.0, - E_inf=3.83167, c0=3.1133, c1=-0.644678, c2=0.0210398): + E_inf=3.2878, c0=2.46086, c1=-0.468091, c2=0.0): """Undulator gap [mm] to place `energy` [keV] on harmonic `n`. Fitted constants are the defaults below; edit them to retune. Returns NaN where the energy is unreachable on that harmonic."""