clophfit.fitting.pipeline ========================= .. py:module:: clophfit.fitting.pipeline .. autoapi-nested-parse:: Pipeline orchestrators for fitting multistage workflows (e.g., FGLS). Functions --------- .. autoapisummary:: clophfit.fitting.pipeline.fgls_plate_fit clophfit.fitting.pipeline.fit_plate Module Contents --------------- .. py:function:: fgls_plate_fit(datasets, sigma_floor, *, first_pass_method = 'huber', second_pass_method = 'lm', max_iter = 3, tol = 0.001) Run iterative Feasible Generalized Least Squares (FGLS) on a plate. 1. First-pass fit (robust) on each well with existing ``y_errc``. 2. Calibrate noise model from residuals, anchoring floor to *sigma_floor*. 3. Re-apply calibrated weights, re-fit, re-calibrate — iterating until gain and alpha converge or *max_iter* is reached. 4. Return final fits and the noise model from the last calibration. :param datasets: Plate datasets keyed by well name. :type datasets: dict[str, Dataset] :param sigma_floor: Known read-noise floor per label (e.g. from buffer wells). :type sigma_floor: dict[str, float] :param first_pass_method: Method for the first-pass fit (default ``"huber"``). :type first_pass_method: str :param second_pass_method: Method for subsequent passes (default ``"lm"``). :type second_pass_method: str :param max_iter: Maximum FGLS iterations (default 3). :type max_iter: int :param tol: Relative tolerance for gain/alpha convergence (default 1e-3). :type tol: float :returns: Final fit results keyed by well, and the converged (or last) calibrated noise model. :rtype: tuple[dict[str, FitResult[typing.Any]], PlateNoiseModel] .. py:function:: fit_plate(datasets, method = '', **kwargs) Run a single-pass fit on an entire plate of datasets. :param datasets: A mapping of well keys (e.g. 'A01') to `Dataset` objects. :type datasets: dict[str, Dataset] :param method: The fitting method to use: 'lm' (default), 'huber', 'odr', or 'mcmc'. Other methods supported by :func:`clophfit.fitting.core.fit_binding_glob` may also be used. :type method: str :param \*\*kwargs: Additional keyword arguments passed to the specific fitting function. :type \*\*kwargs: typing.Any :returns: A dictionary mapping well keys to their corresponding `FitResult`. :rtype: dict[str, FitResult[typing.Any]]