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) <noreply@anthropic.com>
This commit is contained in:
2026-07-02 08:47:33 +02:00
committed by holler
co-authored by holler Claude Opus 4.8
parent b16ab20ddf
commit 64694331e3
@@ -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."""