neurom.ezy.Neuron¶
-
class
neurom.ezy.
Neuron
(neuron, iterable_type=<built-in function array>)¶ Bases:
neurom.core.neuron.Neuron
Class with basic analysis and plotting functionality
By default returns iterables as numpy.arrays and applies no filtering.
Parameters: - neuron – neuron-like object
- iterable_type – type of iterable to return from methods returning collections (e.g list, tuple, numpy.array).
Raises: - neurom.exceptions.SomaError if no soma can be built from the data
- neurom.exceptions.IDSequenceError if ID sequence invalid
Example
get the segment lengths of all apical dendrites in a neuron morphology.
>>> from neurom import ezy >>> nrn = ezy.load_neuron('test_data/swc/Neuron.swc') >>> nrn.get_segment_lengths(ezy.NeuriteType.apical_dendrite)
Example
use lists instead of numpy arrays and get section lengths for the axon. Read an HDF5 v1 file:
>>> from neurom import ezy >>> nrn = ezy.load_neuron('test_data/h5/v1/Neuron.h5', iterable_type=list) >>> nrn.get_section_lengths(ezy.NeuriteType.axon)
Example
plot the neuron and save to a file
>>> fig, ax = nrn.plot() >>> fig.show() >>> fig.savefig('nrn.png')
Methods
__init__
bounding_box
Return 3D bounding box of a neuron copy
Return a copy of the Neuron object. get_local_bifurcation_angles
Get local bifircation angles of all segments of a given type get_n_neurites
Get the number of neurites of a given type in a neuron get_n_sections
Get the number of sections of a given type get_n_sections_per_neurite
Get an iterable with the number of sections for a given neurite type get_remote_bifurcation_angles
Get remote bifircation angles of all segments of a given type get_section_lengths
Get an iterable containing the lengths of all sections of a given type get_section_path_distances
Get section path distances of all neurites of a given type The section path distance is measured to the neurite’s root. get_section_radial_distances
Get an iterable containing section radial distances to origin of all neurites of a given type get_segment_lengths
Get an iterable containing the lengths of all segments of a given type get_soma_radius
Get the radius of the soma get_soma_surface_area
Get the surface area of the soma. get_trunk_origin_radii
Get the trunk origin radii of a given type in a neuron get_trunk_section_lengths
Get the trunk section lengths of a given type in a neuron i_neurites
Returns a mapped iterator to all the neuron’s neurites