neuroarch.na.NeuroArch.add_InferredSynapse
- NeuroArch.add_InferredSynapse(pre_neuron, post_neuron, N=None, NHP=None, morphology=None, arborization=None, data_source=None)[source]
Add an InferredSynapse from pre_neuron and post_neuron.
The Synapse is typicall a group of synaptic contact points.
- Parameters:
pre_neuron (str or models.Neuron) – The neuron that is presynaptic in the synapse. If str, must be the uname of the presynaptic neuron.
post_neuron (str or models.Neuron) – The neuron that is postsynaptic in the synapse. If str, must be the uname of the postsynaptic neuron.
N (int (optional)) – The number of synapses from pre_neuron to the post_neuron.
morphology (list of dict (optional)) – Each dict in the list defines a type of morphology of the neuron. Must be loaded from a file. The dict must include the following key to indicate the type of morphology: {‘type’: ‘swc’} For swc, required fields are [‘sample’, ‘identifier’, ‘x’, ‘y, ‘z’, ‘r’, ‘parent’]. For synapses, if both postsynaptic and presynaptic sites are available, x, y, z, r must each be a list where the first half indicate the locations/radii of postsynaptic sites (on the presynaptic neuron), and the second half indicate the locations/radii of the presynaptic sites (on the postsynaptic neuron). There should be a one-to-one relation between the first half and second half. parent must be a list of -1.
arborization (list of dict (optional)) – A list of dictionaries define the arborization pattern of the neuron in neuropils, subregions, and tracts, if applicable, with {‘type’: ‘neuropil’ or ‘subregion’ or ‘tract’, ‘synapses’: {‘EB’: 20, ‘FB’: 2}} Name of the regions must already be present in the database.
data_source (models.DataSource (optional)) – The datasource. If not specified, default DataSource will be used.
- Returns:
synapse – The created synapse object.
- Return type: