SEC.Models.SdmOptimizer#
SEC.Models.SdmOptimizer.py
- optimize_sdm_xr_decomposition(decomposition, env_params, model_params=None, **kwargs)#
Optimize the SDM decomposition.
- Parameters:
decomposition (Decomposition) – The decomposition to optimize.
env_params (tuple) – The environmental parameters (N, T, me, mp, N0, t0, poresize).
model_params (dict, optional) – The parameters for the SDM model.
kwargs (dict) – Additional parameters for the optimization process.
- Returns:
new_xr_ccurves – The optimized SDM component curves.
- Return type:
- refine_sdm_per_component(sdm_ccurves, x, y, **kwargs)#
Pass 2 (lighter): fix shared column params, refine per-component (rg, scale) only.
This is the SDM analog of
refine_edm_per_component. After Pass 1 has established a good shared-column characterisation (N, T, me, mp, x0, tI, N0, poresize, timescale, k), this pass holds those fixed and adjusts only the per-component radius-of-gyration and amplitude — a lower-dimensional problem that is less prone to degeneracy under high component overlap.- Parameters:
sdm_ccurves (list of SdmComponentCurve) – Pass-1 optimised SDM component curves (mono or lognormal pore_dist).
x (array) – Frame positions (same grid as used by the component curves).
y (array) – Total XR elution curve values to fit.
- Returns:
Refined curves with fixed shared column and optimised per-component (rg, scale). The column object is shared across all returned curves.
- Return type:
- optimize_sdm_uv_decomposition(decomposition, xr_ccurves, **kwargs)#
Optimize the SDM UV decomposition.
- Parameters:
decomposition (Decomposition) – The decomposition to optimize.
xr_ccurves (list of SdmComponentCurve) – The SDM component curves from the XR decomposition.
kwargs (dict) – Additional parameters for the optimization process.
- Returns:
new_uv_ccurves – The optimized UV component curves.
- Return type:
- optimize_sdm_lognormal_xr_decomposition(decomposition, env_params, model_params=None, **kwargs)#
Optimize XR decomposition with SDM lognormal pore distribution.
- Parameters:
decomposition (Decomposition) – The decomposition to optimize.
env_params (tuple) – The environmental parameters
(N, T, me, mp, N0, t0, mu, sigma).model_params (dict, optional) –
The parameters for the SDM model. Recognized keys:
ln_pore_sigmafloat or None (default 0.3)Standard deviation of
ln(r/r0), held constant during optimization (removed from the free-parameter vector). Invariant to the choice of length unit (a unit change only shifts allln(r/r0)values by a constant, which drops out of the standard deviation). The default 0.3 implies pores span a factor ofexp(0.3) ≈ 1.35around the median — a reasonable prior for most SEC columns. PassNoneto make sigma a free parameter; note that sigma is underdetermined whennum_components=1and will drift tosigma_maxif left free.sigma_maxfloat (default 0.8)Upper bound on sigma when it is free.
k: float (default 2.0)rt_dist: str (default'gamma')kwargs (dict) – Additional parameters for the optimization process.
- Returns:
new_xr_ccurves – The optimized SDM component curves with lognormal pore distribution.
- Return type:
- adjust_rg_and_poresize(sdm_decomposition)#
Adjust rg and poresize in the decomposition based on the optimized component curves.