clearex.detect.pipeline

Chunk-parallel particle-detection workflow on canonical 6D Zarr stores.

Functions

run_particle_detection_analysis(*, ...[, ...])

Run chunk-parallel particle detection and persist latest result output.

save_particle_detections_to_store(*, ...[, ...])

Store particle detections under results/particle_detection/latest.

Classes

ParticleDetectionSummary(component, ...)

Summary metadata for one particle-detection run.

class clearex.detect.pipeline.ParticleDetectionSummary(component, detections, chunks_processed, channel_index)

Bases: object

Summary metadata for one particle-detection run.

Variables:
  • component (str) – Output component path inside the Zarr store.

  • detections (int) – Total number of detections written.

  • chunks_processed (int) – Number of chunk tasks that were processed.

  • channel_index (int) – Selected source channel index.

Parameters:
  • component (str) –

  • detections (int) –

  • chunks_processed (int) –

  • channel_index (int) –

component: str
detections: int
chunks_processed: int
channel_index: int
clearex.detect.pipeline.save_particle_detections_to_store(*, zarr_path, detections, parameters, run_id=None)

Store particle detections under results/particle_detection/latest.

Parameters:
  • zarr_path (str or pathlib.Path) – Zarr analysis store path.

  • detections (numpy.ndarray) – Detection table with columns (t, p, c, z, y, x, sigma, intensity).

  • parameters (mapping[str, Any]) – Effective particle-detection parameter mapping.

  • run_id (str, optional) – Provenance run identifier associated with this result.

Returns:

Latest component path for particle-detection results.

Return type:

str

clearex.detect.pipeline.run_particle_detection_analysis(*, zarr_path, parameters, client=None, progress_callback=None)

Run chunk-parallel particle detection and persist latest result output.

Parameters:
  • zarr_path (str or pathlib.Path) – Path to canonical analysis-store Zarr object.

  • parameters (mapping[str, Any]) – Particle-detection parameters.

  • client (dask.distributed.Client, optional) – Active Dask client for distributed execution.

  • progress_callback (callable, optional) – Progress callback invoked as callback(percent, message).

Returns:

Summary including output component and detection count.

Return type:

ParticleDetectionSummary

Raises:

ValueError – If required source data are missing or channel index is out of bounds.