itasc.contact_analysis.records

Qt-free bridge from catalogue records to a quantifier’s per-position files.

The studio carries positions as normalized catalogue record dicts (see itasc.contact_analysis.catalog). Turning one into the PositionInputs a quantifier builds from — and resolving where that quantifier’s artifact lives — is pure path logic with no Qt. It lives here (rather than in the napari studio layer) so the headless aggregation backend (shape_tables) and the standalone itasc-aggregate wheel can resolve the same paths the pipeline does.

Functions

available_fields(inputs)

The populated (non-None) PositionInputs field names — the satisfied prerequisites a quantifier's requires is checked against.

output_for_record(quantifier, record)

Where quantifier's artifact lives for a catalogue record.

position_inputs_from_record(record)

Build PositionInputs from a normalized catalogue record.

record_build_params(quantifier, record, params)

Shared params overlaid with the record's own required-build-param values.

supported_quantities(records, *[, params])

quantity_ids of the pooled quantifiers records can actually produce.

itasc.contact_analysis.records.position_inputs_from_record(record)[source]

Build PositionInputs from a normalized catalogue record.

pixel_size_um / time_interval_s are global build params: they are taken only from the value stamped on the record (the Parameters panel’s px/Δt), never auto-resolved from a position’s config or label TIFF tags. Absent ⇒ None.

Return type:

PositionInputs

Parameters:

record (dict)

itasc.contact_analysis.records.output_for_record(quantifier, record)[source]

Where quantifier’s artifact lives for a catalogue record.

Contacts keeps using the catalogue’s explicit contact_analysis_path column — it predates the quantifier seam and may hold a custom nested path that the per-position read/visualize paths also rely on, so building must target the same file. Every other quantifier derives its destination from Quantifier.default_output().

Return type:

Path

Parameters:
itasc.contact_analysis.records.available_fields(inputs)[source]

The populated (non-None) PositionInputs field names — the satisfied prerequisites a quantifier’s requires is checked against.

Return type:

set[str]

Parameters:

inputs (PositionInputs)

itasc.contact_analysis.records.record_build_params(quantifier, record, params)[source]

Shared params overlaid with the record’s own required-build-param values.

A param like pixel size can be set per-position on the record (the value the build actually reads via PositionInputs) instead of in the shared bar, so the build-param gate must see both. The record’s own value wins where present, mirroring run()’s per-record stamping.

Return type:

dict

Parameters:
itasc.contact_analysis.records.supported_quantities(records, *, params=None)[source]

quantity_ids of the pooled quantifiers records can actually produce.

A pooled quantifier (one declaring table_keys) is supported when at least one record satisfies both gates shape_tables.build_table() applies per position: its requires inputs are present (Quantifier.can_build()) and its required_build_params are satisfied (pixel size, FOV area, …). That makes “supported” ⟺ “this table would pool at least one non-empty row” — the exact predicate the Aggregate UI greys its checkboxes against, so an enabled box never promises a table the run would silently skip. Producers (no table_keys, e.g. contacts) are never pooled and so never reported.

Return type:

set[str]

Parameters: