pub fn region_live(
counts: ArrayView3<'_, f64>,
live: ArrayView3<'_, f64>,
cells: &[[usize; 2]],
) -> Result<Vec<f64>, PipelineError>Expand description
A region’s live fraction in each bin, its counts over their arrivals: Σ C / Σ (C / L).
A bin with no counts in the region takes the mean L of its pixels.
§Arguments
counts— Raw counts in (time bin, row, column), finite and 0 or more.live— Live fractions ofcountsin (0, 1], the same shape.cells— The region’s pixels as[row, column], at least one, each once.
§Errors
PipelineError::ShapeMismatch if the shapes differ or a cell is outside
them; PipelineError::InvalidParameter if cells or the bins are empty,
a cell repeats, a region count is not finite and 0 or more or its live
fraction not in (0, 1], or the counts overflow the sums.