neu_morpho.measure.skeletons

Cable length and topology for many bodies, from published skeletons.

The per-body counterpart of driver.sweep_volumes:

  • Tasks are batches of bodies: one small read per body would be dominated by dispatch overhead. Within a batch, reads run on threads and share one opened store.

  • Failures are isolated: one unreadable skeleton says nothing about the others.

  • Absence is not failure: a body with no published skeleton is recorded absent and never retried; one that raised is failed and retried next run.

Without radii, max_radius_nm is NaN while cable length and topology still land.

Attributes

Functions

skeleton_columns(skeleton) → dict

The four per-body skeleton columns of the metrics DB, from a neu_lib.Skeleton.

sweep_skeletons(volume, db_path, *, bodies[, ...]) → dict

Measure each body's published skeleton into db_path.

Module Contents

neu_morpho.measure.skeletons.skeleton_columns(skeleton) → dict

The four per-body skeleton columns of the metrics DB, from a neu_lib.Skeleton.

The one definition, shared by this pass over published skeletons and by whatever writes skeletons into a run (neu-skel). max_radius_nm is NaN without radii.

neu_morpho.measure.skeletons.sweep_skeletons(volume: str, db_path: str, *, bodies: Iterable[int], skeleton_dir: str = 'skeleton', require_radii: bool = False, batch: int = DEFAULT_BATCH, threads: int = DEFAULT_THREADS, client: Any | None = None, npartitions: int | None = None, resume: bool = True, retry_failed: bool = True) → dict

Measure each body’s published skeleton into db_path.

resume skips bodies already recorded written or absent; retry_failed (default) attempts failed ones again.

neu_morpho.measure.skeletons.DEFAULT_BATCH = 200
neu_morpho.measure.skeletons.DEFAULT_THREADS = 8