Summary
commit_interactive_fit() derives the Sigima fit type from the menu id:
dst.metadata["fit_params"] = _fit.create_fit_params(
fit_id.removesuffix("_fit"), ...
)
For "piecewiseexponential_fit" this yields "piecewiseexponential", which is not a key of Sigima's FIT_TYPE_MAPPING. The 14 valid keys are:
cdf, doubleexponential, exponential, gaussian, linear, lorentzian,
multigaussian, multilorentzian, planckian, polynomial, sigmoid,
sinusoidal, twohalfgaussian, voigt
The menu id was chosen to match DataLab desktop's piecewiseexponential_fit, but the underlying computer is DoubleExponentialFitComputer, whose Sigima type is doubleexponential. Committing the fit therefore fails with ValueError: Unsupported fit type.
Location
src/runtime/dlw_interactive_fit.py — _INTERACTIVE_FITS entry and commit_interactive_fit().
Proposed fix
Store the Sigima fit type explicitly on _FitKind instead of deriving it from the menu id by string surgery, and default it to fit_id.removesuffix("_fit") for the other twelve entries.
Root cause
tests/python/test_interactive_fit.py only exercises commit_interactive_fit() for gaussian_fit. A test parametrised over _INTERACTIVE_FITS would have caught this. The fix must add that loop.
Summary
commit_interactive_fit()derives the Sigima fit type from the menu id:For
"piecewiseexponential_fit"this yields"piecewiseexponential", which is not a key of Sigima'sFIT_TYPE_MAPPING. The 14 valid keys are:The menu id was chosen to match DataLab desktop's
piecewiseexponential_fit, but the underlying computer isDoubleExponentialFitComputer, whose Sigima type isdoubleexponential. Committing the fit therefore fails withValueError: Unsupported fit type.Location
src/runtime/dlw_interactive_fit.py—_INTERACTIVE_FITSentry andcommit_interactive_fit().Proposed fix
Store the Sigima fit type explicitly on
_FitKindinstead of deriving it from the menu id by string surgery, and default it tofit_id.removesuffix("_fit")for the other twelve entries.Root cause
tests/python/test_interactive_fit.pyonly exercisescommit_interactive_fit()forgaussian_fit. A test parametrised over_INTERACTIVE_FITSwould have caught this. The fix must add that loop.