SEC.Models.EdmEstimatorImpl

SEC.Models.EdmEstimatorImpl#

SEC.Models.EdmEstimatorImpl.py

guess(x, y, init_params=None, debug=False, debug_info=None)#

Guess initial parameters for the EDM model based on the given curve (x, y). N, T, N0, t0, poresize

Parameters:
  • x (array-like) – The x values of the curve.

  • y (array-like) – The y values of the curve.

  • init_params (tuple, optional) – Initial guess for the parameters. If None, a guess will be made.

  • debug (bool, optional) – If True, debug information will be printed and plots will be shown.

  • debug_info (dict, optional) – Additional debug information.

Returns:

params – Estimated parameters (N, T, me, mp, x0, tI, N0, poresize, timescale).

Return type:

tuple

guess_multiple_impl(x, y, xr_ccurves, respect_egh=False, debug=False)#

Guess initial parameters for multiple EDM component curves based on the given curve (x, y). N, T, N0, t0, poresize

Parameters:
  • x (array-like) – The x values of the curve.

  • y (array-like) – The y values of the curve.

  • xr_ccurves (list of EdmComponentCurve) – The list of EDM component curves.

  • respect_egh (bool, optional) – If True, respect the EGH parameters of the component curves.

  • debug (bool, optional) – If True, debug information will be printed and plots will be shown.

Returns:

params_array – Estimated parameters for each component curve.

Return type:

ndarray

estimate_cedm_shared_params(x, y, xr_ccurves, debug=False, **kwargs)#

Canonical estimator for CEDM (G2020) initial parameters.

Combines rough per-component EDM fitting (guess_multiple_impl()) with a joint shared-column L-BFGS-B optimisation to produce physically meaningful CEDM params with varied b values and shared column parameters.

Parameters:
  • x (array-like) – Elution frame positions.

  • y (array-like) – XR integrated intensity values.

  • xr_ccurves (list) –

    Component curves. Each must expose:

    • .x — array of frame positions (for peak-frame detection)

    • .y — array of intensity values (for peak-frame detection)

    • get_y() — method returning the component intensity (for rough fit)

  • debug (bool, optional) – If True, print optimisation diagnostics.

  • **kwargs – Forwarded to molass.SEC.Models.EdmOptimizer.optimize_edm_xr_decomposition() (e.g. e_bounds, cinj_min, suppress_positive_b_warning).

Returns:

  • cedm_colparams (np.ndarray, shape (4,)) – Shared column parameters [t0_sh, u_sh, e_sh, Dz_sh].

  • abc_params (np.ndarray, shape (nc, 3)) – Per-component parameters [[a_0, b_0, cinj_0], ...].