itasc.contact_analysis.quantifiers.neighbor_count¶
Neighbor-count quantifier — per-cell adjacency degree from the contact graph.
A contacts-derived pooled quantity: compute_object_table() reads the
position’s contact_analysis.h5 and returns the per (frame, cell_id)
neighbor count in memory (no per-position artifact). The NLS subpopulation label
is not stored here — it is left-joined by cell_id at pool time, exactly as
the shape family does.
Classes
Per |
- class itasc.contact_analysis.quantifiers.neighbor_count.NeighborCountQuantifier[source]¶
Bases:
QuantifierPer
(frame, cell_id)number of distinct cell-cell neighbors.- quantity_id: ClassVar[str] = 'neighbor_count'¶
Stable key; an empty value marks an intermediate (non-registered) base.
- display_name: ClassVar[str] = 'Neighbor count'¶
Human-readable label shown wherever a quantity is selected.
- requires: ClassVar[tuple[str, ...]] = ('contact_analysis_path',)¶
PositionInputsfield names this quantifier needs to build.
- table_keys: ClassVar[tuple[str, ...]] = ('frame', 'cell_id')¶
The index columns of this quantifier’s
object_table— its natural grain (e.g.("frame", "cell_id")). A non-empty value marks the quantity as aggregated:itasc.contact_analysis.shape_tablespools it across positions into a table named byquantity_id, keyed on these columns. Empty ⇒ not aggregated into an index-keyed table (e.g. contacts). Value columns are namespaced byquantity_idso a later joined view across tables never has colliding names.
- compute_object_table(inputs, *, params=None)[source]¶
The pooled tidy table for one position, computed directly from inputs.
A pooled quantifier (one that declares
table_keys) implements this: it returns the same column-major table thatobject_tableused to return after a disk round-trip, but never touches disk.Nonewhen this position yields no rows. Producers (contacts) are not pooled and do not implement it. params carries the shared build knobs (e.g.fov_area_mm2) for the quantifiers that opt in; per-position values (pixel size, frame interval) arrive via inputs.