models.scage

models.scage(cells, reference, *, grid=None, min_sites=20, binarise=0.5)

An age per cell, by profile likelihood over a grid of candidate ages.

Parameters

Name Type Description Default
cells A :class:~falconage.core.FalconData of single cells: mostly NaN, with covered sites near 0 or 1. required
grid np.ndarray | None Candidate ages. Defaults to a 0.5-year grid over the reference’s own fitted range – outside it the linear models are extrapolation. None
min_sites int A cell covering fewer informative sites than this gets NaN rather than a number. Twenty binary observations against a straight line is not an age estimate, and returning one anyway is how a per-cell table fills with confident noise. 20

Returns

Name Type Description
One row per cell: the maximising age, how many informative sites it had, the
log-likelihood at the maximum, and the curvature-free width of the peak –
the range of ages within 2 log-likelihood units, which is what says whether
the cell had enough sites to distinguish anything.