Rigorous.FunctionCodeUtils#
Rigorous.FunctionCodeUtils
Shared helper for auto-detecting the legacy objective function code from a Decomposition’s model type and column parameters.
This avoids duplicating the detection logic in RigorousImplement.py (launch path) and CurrentStateUtils.py (load path). See: biosaxs-dev/molass-library#89
- detect_function_code(decomposition)#
Auto-detect the legacy objective function code.
Uses the
pore_distandrt_distattributes on the decomposition’sSdmColumnto look up the appropriate legacy objective function class.- Parameters:
decomposition (Decomposition) – A quick decomposition whose
xr_ccurves[0]carries the model type and (for SDM) the column parameters.- Returns:
A function code string, or
Noneto use the default for the model.Supported models and their codes:
'egh'→None(EGH, default G1100 path)'sdm'→'G1100'/'G1200'/'G1300'(depends onpore_dist/rt_diston theSdmColumn)'edm'→None(EDM)'cedm'→'G2020'(CEDM — continuous EDM)'lkm'→'G1400'(LKM — Lumped Kinetic Model)'grm'→'G1500'(GRM — General Rate Model)
- Return type:
str or None