itasc.contact_analysis.dynamics.store

Persist / read the track-dynamics artifact and orchestrate the build.

One HDF5 per substrate (cell_dynamics.h5 / nucleus_dynamics.h5) — the quantity is several heterogeneous tables, so a single flat CSV (as the shape family uses) does not fit; this mirrors how contacts stores cells/ / edges/ / t1_events/. Groups:

instantaneous/table  per (frame, cell_id) positions + velocities (the
                     object_table for the generic plotting layer)
tracks/table         per-track motility summary
msd/table            ensemble MSD curve (+ D_um2_per_s / alpha / r2 attrs)
dac/table            ensemble directional autocorrelation (+ persistence_time_s attr)
collective/table     per-frame order parameter / correlation length / NN distance
corr_curve/table     pooled velocity-correlation curve
provenance           run metadata as group attrs

build_track_dynamics() runs the headless core and writes the file; read_track_dynamics() loads it back; read_instantaneous_table() serves the tidy-table contract. Backend-only (no Qt / napari).

Module attributes

DEFAULT_PARAMS

Build params and their defaults (a position with no override uses these).

Functions

build_track_dynamics(label_path, ...[, ...])

Compute every dynamics table from a tracked label TIFF and write the .h5.

read_instantaneous_table(path)

The (frame, cell_id, …) instantaneous table — the tidy-table contract.

read_track_dynamics(path)

Load a dynamics .h5 into a TrackDynamics.

Classes

TrackDynamics(instantaneous, tracks, msd, ...)

In-memory view of a dynamics .h5 — every table plus the fit scalars.

itasc.contact_analysis.dynamics.store.DEFAULT_PARAMS = {'corr_bin_um': None, 'min_corr_cells': 5, 'min_msd_samples': 10, 'min_track_frames': 3, 'msd_track_window_frames': 8}

Build params and their defaults (a position with no override uses these).

class itasc.contact_analysis.dynamics.store.TrackDynamics(instantaneous, tracks, msd, dac, collective, corr_curve, msd_D_um2_per_s, msd_alpha, msd_r2, dac_persistence_time_s, corr_length_um)[source]

Bases: object

In-memory view of a dynamics .h5 — every table plus the fit scalars.

Parameters:
instantaneous: dict[str, ndarray]
tracks: dict[str, ndarray]
msd: dict[str, ndarray]
dac: dict[str, ndarray]
collective: dict[str, ndarray]
corr_curve: dict[str, ndarray]
msd_D_um2_per_s: float
msd_alpha: float
msd_r2: float
dac_persistence_time_s: float
corr_length_um: float
itasc.contact_analysis.dynamics.store.build_track_dynamics(label_path, output_path, *, pixel_size_um, time_interval_s, source_path=None, params=None, quantity_id='', progress_cb=None)[source]

Compute every dynamics table from a tracked label TIFF and write the .h5.

Return type:

Path

Parameters:
itasc.contact_analysis.dynamics.store.read_track_dynamics(path)[source]

Load a dynamics .h5 into a TrackDynamics.

Return type:

TrackDynamics

Parameters:

path (str | Path)

itasc.contact_analysis.dynamics.store.read_instantaneous_table(path)[source]

The (frame, cell_id, …) instantaneous table — the tidy-table contract.

Return type:

dict[str, ndarray]

Parameters:

path (str | Path)