neurom.core.population

Neuron Population Classes and Functions.

Classes

Population

Neuron Population Class.

exception neurom.core.population.NeuroMError[source]

Bases: Exception

Base class for NeuroM errors.

class neurom.core.population.Population(files, name='Population', ignored_exceptions=(), cache=False)[source]

Bases: object

Neuron Population Class.

Offers an iterator over neurons within population, neurites of neurons, somas of neurons. It does not store the loaded neuron in memory unless the neuron has been already passed as loaded (instance of Neuron).

Construct a neuron population.

Parameters
  • files (collections.abc.Sequence[str|Path|Neuron]) – collection of neuron files or paths to them or instances of Neuron.

  • name (str) – Optional name for this Population

  • ignored_exceptions (tuple) – NeuroM and MorphIO exceptions that you want to ignore when loading neurons.

  • cache (bool) – whether to cache the loaded neurons in memory. If false then a neuron will be loaded everytime it is accessed within the population. Which is good when population is big. If true then all neurons will be loaded upon the construction and kept in memory.