Scientific results¶
Classification and match loaders return these containers. Their arrays align by row and are documented with shapes, dtypes, units, and side semantics below.
ClassificationResult
dataclass
¶
Store aligned classification arrays for one slice.
Attributes:
| Name | Type | Description |
|---|---|---|
metadata |
ClassificationResultInfo
|
Slice, staining, classifier, lineage, and timestamp metadata. |
cell_ids |
Array
|
|
centroids |
Array
|
|
probabilities |
Array
|
|
is_positive |
Array
|
|
threshold |
float
|
Probability threshold used for this slice. |
Notes
Every row index refers to the same detected cell across all arrays. Coordinates are image pixels, not micrometres or atlas coordinates.
positive_centroids
property
¶
Return centroids rows classified as positive.
ClassificationResults
dataclass
¶
Store aligned classification arrays concatenated across slices.
Attributes:
| Name | Type | Description |
|---|---|---|
cell_ids |
Array
|
|
slice_ids |
Array
|
|
centroids |
Array
|
|
probabilities |
Array
|
|
is_positive |
Array
|
|
by_slice |
MappingProxyType[str, ClassificationResult]
|
Read-only mapping from slice ID to its :class: |
Notes
Use (slice_id, cell_id) as a cell key. Thresholds can differ by slice
and remain available through :attr:by_slice.
positive_centroids
property
¶
Return centroids rows classified as positive.
MatchResult
dataclass
¶
Store aligned one-to-one cell matches for one slice.
Attributes:
| Name | Type | Description |
|---|---|---|
metadata |
MatchResultInfo
|
Slice metadata and the actual staining and detection run assigned to each side. |
cell_ids_a, cell_ids_b |
|
|
centroids_a, centroids_b |
|
|
intersection_area |
Array
|
|
area_a, area_b |
|
|
overlap_fraction_a, overlap_fraction_b |
Intersection area divided by the corresponding side's area. |
|
overlap_fraction_min |
Array
|
Smaller of the two side-specific overlap fractions. |
iou |
Array
|
Intersection over union: |
algorithm_version |
str
|
Matching algorithm version. |
overlap_threshold |
float
|
Minimum |
Notes
Every row index describes one matched pair. Read side identities from
metadata.side_a and metadata.side_b; do not infer them from the
pair key.
MatchResults
dataclass
¶
Store aligned cell-match arrays concatenated across slices.
Attributes:
| Name | Type | Description |
|---|---|---|
slice_ids |
Array
|
|
cell_ids_a, cell_ids_b |
|
|
centroids_a, centroids_b |
|
|
intersection_area, area_a, area_b |
|
|
overlap_fraction_a, overlap_fraction_b |
|
|
overlap_fraction_min |
Array
|
|
iou |
Array
|
|
by_slice |
MappingProxyType[str, MatchResult]
|
Read-only mapping from slice ID to its :class: |
Notes
Use (slice_id, cell_id) to identify cells. Side identities and
thresholds remain available through :attr:by_slice.