neurom.ezyΒΆ

Quick and easy neuron morphology analysis tools

Examples

Load a neuron

>>> from neurom import ezy
>>> nrn = ezy.load_neuron('some/data/path/morph_file.swc')

Obtain some morphometrics

>>> apical_seg_lengths = nrn.get_segment_lengths(ezy.TreeType.apical_dendrite)
>>> axon_sec_lengths = nrn.get_section_lengths(ezy.TreeType.axon)

View it in 2D and 3D

>>> fig2d, ax2d = ezy.view(nrn)
>>> fig2d.show()
>>> fig3d, ax3d = ezy.view3d(nrn)
>>> fig3d.show()

Load neurons from a directory. This loads all SWC or HDF5 files it finds and returns a list of neurons

>>> import numpy as np  # For mean value calculation
>>> nrns = ezy.load_neurons('some/data/directory')
>>> for nrn in nrns:
...     print 'mean section length', np.mean([n for n in nrn.get_section_lengths()])

Functions

load_neuron Load a Neuron from a file
load_neurons Create a list of Neuron objects from each morphology file in directory or from a list or tuple of file names
load_population Create a population object from all morphologies in a directory of from morphologies in a list of file names

Classes

Neuron Class with basic analysis and plotting functionality
Population Population Class