arraymorph
Module#
Prototype for object model backend for the libNeuroML project
- class neuroml.arraymorph.ArrayMorphology(vertices=[], connectivity=[], id=None, node_types=None, name=None, physical_mask=None, fractions_along=None)#
Bases:
Morphology
Core of the array-based object model backend.
Provides the core arrays - vertices,connectivity etc. node_types.
The connectivity array is a list of indices pointing to which other element an element is attached. So for instance, connectivity[3] is an integer with the index of the section it refers to in the Backend
EXAMPLE:
Vertices[3] and connectivity[3] refer to the vertex and connectivity of the same node.
Note
The root section by convention has connectivity == -1.
- children(index)#
Returns an array with indexes of children
- property num_vertices#
- parent_id(index)#
Return the parent index for the given index
- property physical_indices#
returns indices of vertices which are physical
- pop(index)#
TODO:This is failing tests (understandably) - need to fix! Deletes a node from the morphology, its children become children of the deleted node’s parent.
- property root_index#
- property root_vertex#
- segment_from_vertex_index(index)#
- to_neuroml_morphology(id='')#
- to_root(index)#
Changes the connectivity matrix so that the node at index becomes the root
- property valid_ids#
- property valid_morphology#
- vertex(index)#
Return vertex corresponding to index in morphology
- class neuroml.arraymorph.SegmentList(arraymorph)#
Bases:
object
This class is a proxy, it returns a segment either from the arraymorph or if it has already been instantiated it returns the relevant segment.
- append(segment)#
Adds a new segment
TODO: Correct connectivity is currently being ignored - The new segment is always connected to the root node.