NeuroMorphoMeasurement#
- class braincell.io.NeuroMorphoMeasurement(neuron_id, surface=None, volume=None, soma_surface=None, n_stems=None, n_bifs=None, n_branch=None, width=None, height=None, depth=None, diameter=None, length=None, euclidean_distance=None, path_distance=None, branch_order=None, contraction=None, fragmentation=None, partition_asymmetry=None, pk_classic=None, bif_ampl_local=None, bif_ampl_remote=None, extras=<factory>, raw=<factory>)[source]#
Typed view over a NeuroMorpho.Org morphometry record.
All quantitative fields are bare floats using the units documented by NeuroMorpho.Org: lengths in micrometres (μm), surfaces in square micrometres (μm²), volumes in cubic micrometres (μm³), angles in degrees. Missing fields are
Nonerather thanNaN.The dataclass only promotes the fields that NeuroMorpho.Org returns most consistently. Less common fields remain available through
extrasand theget()accessor.- Parameters:
neuron_id (
int) – NeuroMorpho.Org numeric id this measurement belongs to.n_branch (
int|None) – Number of branches (excluding soma).euclidean_distance (
float|None) – Maximum Euclidean distance from soma (μm).path_distance (
float|None) – Maximum path distance from soma (μm).fragmentation (
int|None) – Average compartment count per branch.extras (
Mapping[str,Any]) – Long-tail measurement keys not promoted to dataclass fields.raw (
Mapping[str,Any]) – Read-only view of the upstream JSON payload (with the original upstream key spellings preserved). Useful when callers want to forward the unmodified upstream record or compare against documentation.
Examples
>>> meas = NeuroMorphoMeasurement.from_payload( ... {"neuron_id": 10047, "n_stems": 1.0, "length": 123.4} ... ) >>> meas.n_stems, meas.length (1, 123.4) >>> meas.get("custom_field", "missing") 'missing'