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') Two-stage Feasible Generalized Least Squares (FGLS) plate fit. 1. First-pass fit (typically robust like 'huber') on each well. 2. Extract residuals globally and calibrate the comprehensive error model, anchoring the constant noise term to the provided ``sigma_floor``. 3. Second-pass fit using the exact pooled weights derived from the model. :param datasets: The dataset dictionary 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 the second-pass, calibrated fit (default 'lm'). :type second_pass_method: str :returns: Final fit results and the calibrated error model parameters (sigma_read, gain, alpha) for each label. :rtype: tuple[dict[str, FitResult[typing.Any]], dict[str, tuple[float, float, float]]] .. py:function:: fit_plate(datasets, method = 'lm', **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), 'odr', or 'mcmc'. :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]]