arborize package¶
arborize.core module¶
-
class
arborize.core.
Builder
(builder)[source]¶ Bases:
object
A builder is a method interface that exposes an
instantiate
method that can be passed the model that is being instantiated. You can create your own builder by initializing a builder with a builder function, which is a function that takes the model and all it’s contructor arguments as its own arguments. It’s a builder’s responsibility to add or label sections.Constructing your own Builders is of limited use, because every model’s
morphologies
field takes morphology files and/or builder functions and automatically constructs and applies theBuilder
from there:class MyNeuron(NeuronModel): @staticmethod def build(model, *args, **kwargs): model.soma.append(p.Section()) model.dendrites.append(p.Section()) model.axon.append(p.Section()) # Creates 2 different morphologies for this cell model. morphologies = [ build, # Create 1 soma, dendrite & axonal compartment ('morfo2.swc', self.extend_axon) # First loads morfo2.swc ]
-
class
arborize.core.
ComboBuilder
(*pipeline)[source]¶ Bases:
arborize.core.Builder
Chains together multiple morphology files and/or builder functions.
-
class
arborize.core.
NeuronModel
(position=None, morphology_id=0)[source]¶ Bases:
object
The base class that helps you describe your model. Generate all the required sections, insert all mechanisms and define all synapses using the appropriate class variables. See the NeuronModel Reference
-
connect
(from_cell, from_section, to_section, synapse_type=None)[source]¶ Connect this cell as the postsynaptic cell in a connection with from_cell between the from_section and to_section. Additionally a synapse_type can be specified if there’s multiple synapse types present on the postsynaptic section.
- Parameters
from_cell (
NeuronModel
) – The presynaptic cell.from_section (
Section
) – The presynaptic section.to_section (
Section
) – The postsynaptic section.synapse_type (string) – The name of the synapse type.
-
create_synapse
(section, synapse_type=None)[source]¶ Create a synapse in the specified
section
based on the synapse definitions present on this model. Additionally a synapse_type can be specified if there’s multiple synapse types present on the section.- Parameters
section (
Section
) – The postsynaptic section.synapse_type (string) – The name of the synapse type.
-