clophfit.fitting.pipeline#
Pipeline orchestrators for fitting multistage workflows (e.g., FGLS).
Functions#
|
Two-stage Feasible Generalized Least Squares (FGLS) plate fit. |
|
Run a single-pass fit on an entire plate of datasets. |
Module Contents#
- clophfit.fitting.pipeline.fgls_plate_fit(datasets, sigma_floor, *, first_pass_method='huber', second_pass_method='lm')#
Two-stage Feasible Generalized Least Squares (FGLS) plate fit.
First-pass fit (typically robust like ‘huber’) on each well.
Extract residuals globally and calibrate the comprehensive error model, anchoring the constant noise term to the provided
sigma_floor.Second-pass fit using the exact pooled weights derived from the model.
- Parameters:
datasets (dict[str, Dataset]) – The dataset dictionary keyed by well name.
sigma_floor (dict[str, float]) – Known read-noise floor per label (e.g. from buffer wells).
first_pass_method (str) – Method for the first-pass fit (default ‘huber’).
second_pass_method (str) – Method for the second-pass, calibrated fit (default ‘lm’).
- Returns:
Final fit results and the calibrated error model parameters (sigma_read, gain, alpha) for each label.
- Return type:
tuple[dict[str, FitResult[Any]], dict[str, tuple[float, float, float]]]
- clophfit.fitting.pipeline.fit_plate(datasets, method='lm', **kwargs)#
Run a single-pass fit on an entire plate of datasets.
- Parameters:
datasets (dict[str, Dataset]) – A mapping of well keys (e.g. ‘A01’) to Dataset objects.
method (str) – The fitting method to use: ‘lm’ (default), ‘odr’, or ‘mcmc’.
**kwargs (Any) – Additional keyword arguments passed to the specific fitting function.
- Returns:
A dictionary mapping well keys to their corresponding FitResult.
- Return type:
dict[str, FitResult[Any]]