NeuroMorphoNeuron#

class braincell.io.NeuroMorphoNeuron(neuron_id, neuron_name, archive, species, brain_region, cell_type, original_format, png_url, payload)[source]#

A single NeuroMorpho.Org neuron record.

Common metadata fields are exposed as typed attributes; the full HAL JSON payload is also retained on payload for callers who need fields not promoted to attributes.

Parameters:
  • neuron_id (int) – NeuroMorpho.Org numeric identifier.

  • neuron_name (str) – Human-readable neuron name (also used as the file stem).

  • archive (str | None) – Archive name (lower-cased archives are used in download URLs).

  • species (str | None)

  • brain_region (tuple[str, ...]) – Brain region tags. Always a list, even when the upstream payload returns a single string.

  • cell_type (tuple[str, ...]) – Cell-type tags. Always a list.

  • original_format (str | None) – Original (Source-Version) filename, e.g. "TypeA-10.asc".

  • png_url (str | None) – Thumbnail PNG URL (http:// is preserved verbatim from the API).

  • payload (dict[str, Any]) – Full HAL JSON payload as returned by NeuroMorpho.Org.

classmethod from_payload(payload)[source]#

Build a NeuroMorphoNeuron from an upstream JSON payload.

Parameters:

payload (Mapping[str, Any]) – JSON object as returned by /api/neuron/... endpoints.

Return type:

NeuroMorphoNeuron