neurom.io¶
IO operations module for NeuroM.
Functions
Unpack data into a raw data wrapper. |
|
Build section trees from an h5 or swc file. |
|
Create a population object. |
Classes
Caching morphology loader. |
-
class
neurom.io.
NeuronLoader
(directory, file_ext=None, cache_size=None)[source]¶ Bases:
object
Caching morphology loader.
- Parameters
directory – path to directory with morphology files
file_ext – file extension to look for (if not set, will pick any of .swc|.h5|.asc)
cache_size – size of LRU cache (if not set, no caching done)
-
neurom.io.
load_neurons
(neurons, neuron_loader=<function load_neuron>, name=None, population_class=<class 'neurom.core.population.Population'>, ignored_exceptions=())[source]¶ Create a population object.
From all morphologies in a directory of from morphologies in a list of file names.
- Parameters
neurons – directory path or list of neuron file paths
neuron_loader – function taking a filename and returning a neuron
population_class – class representing populations
name (str) – optional name of population. By default ‘Population’ or filepath basename depending on whether neurons is list or directory path respectively.
- Returns
neuron population object