SEC.Models.EdmRecommend

SEC.Models.EdmRecommend#

SEC.Models.EdmRecommend.py

Derive CEDM parameter bounds from well-fitted EGH decomposition.

suggest_cedm_bounds_from_egh(decomp_egh, e_assumed=0.5, verbose=False)#

Derive CEDM parameter bounds from fitted EGH decomposition.

This function analyzes the EGH peak positions, asymmetry (tau), and relative heights to recommend physically plausible bounds for CEDM parameters (a, b, cinj), preventing optimizer collapse to degenerate solutions.

Parameters:
  • decomp_egh (Decomposition) – EGH decomposition with well-fitted parameters. Must have .xr_ccurves with EGH component curves (each with .params returning [H, tR, sigma, tau]).

  • e_assumed (float, optional) – Assumed porosity for analytical a (K_SEC) calculation. Default 0.5 (typical SEC total porosity). Used to convert EGH retention times to K_SEC range estimates.

  • verbose (bool, optional) – If True, print diagnostic information about derived bounds. Default False.

Returns:

Dictionary with the following keys:

  • 'a_bounds': tuple (a_min, a_max)

    Lower and upper bounds for partition coefficient a (K_SEC). Derived from EGH peak positions with 2× safety margin.

  • 'b_bounds': tuple (b_min, b_max)

    Lower and upper bounds for adsorption exponent b. Derived from EGH asymmetry (tau):

    • |tau| < 0.3 (nearly symmetric) → (-2.0, 0.5) (mostly kinetic)

    • tau < -0.3 (right-tail) → (-5.0, 1.0)

    • tau > 0.3 (left-tail, unusual) → (-1.0, 3.0)

  • 'cinj_min': float

    Minimum injection concentration (prevents component collapse). Set to 15% of weakest component’s relative height, floor at 0.15.

  • 'shared_b': bool

    Recommendation for whether to share b across components. True if EGH tau values are similar (std < 0.2), indicating column-property behavior rather than molecule-specific.

  • 'a_analytical': list of float

    Analytical K_SEC values computed from EGH retention times (for reference/debugging).

Return type:

dict

Notes

Integration with upgrade():

These bounds are automatically applied when calling decomposition.upgrade(model='EDM') unless explicitly overridden via kwargs (e.g., a_bounds=(0, 3.0) in the call).

Physical Interpretation:
  • a (K_SEC): Partition coefficient between mobile and stationary phases. For SEC, K_SEC = accessible_pore_volume / mobile_phase_volume. Typical range: 0.0 (total exclusion) to 1.5 (full access).

  • b: Adsorption isotherm exponent. In SEC, tailing is normally kinetic (b ≈ 0), not adsorptive (b > 0). Positive b suggests secondary adsorption or overloading.

  • cinj: Injection concentration. Prevents optimizer from collapsing components to zero amplitude (degenerate solution).

Examples

>>> decomp_egh = corrected.quick_decomposition(proportions=[1, 1])
>>> bounds = suggest_cedm_bounds_from_egh(decomp_egh, verbose=True)
>>> # Bounds are auto-applied:
>>> decomp_edm = decomp_egh.upgrade(model='EDM')
>>> # Or explicitly override:
>>> decomp_edm = decomp_egh.upgrade(model='EDM', a_bounds=(0, 2.5))