syns

This module provides classes and functions for creating and managing synaptic units (Exp2Syn, Netcon & Netstim) in NEURON simulations, including random and path-based innervation of cell sections.

create_synunit(segment, **kwargs)[source]

Helper function to create a SynapseUnit on a given segment.

Parameters

segmentSegment

The NEURON segment to place the synapse on.

**kwargs:

Passed to SynapseUnit constructor.

Returns

SynapseUnit:

The created SynapseUnit object.

innervate_points(*segments, **kwargs)[source]

Create SynapseUnits for each provided segment.

Parameters

*segmentslist[Segment]

Segments to innervate.

**kwargs:

Passed to SynapseUnit constructor.

Returns

list[SynapseUnit]:

List of created SynapseUnit objects.

innervate_random(cell, section_list, numgroups=1, numsyns=4, synspace=7, **kwargs)[source]

Randomly innervate a cell with groups of SynapseUnits along random paths.

Parameters

cellCell

The cell to innervate.

section_listlist[Section]

List of NEURON Section objects.

numgroupsint

Number of synapse groups to create.

numsynsint

Number of synapses per group.

synspacefloat

Minimum spacing between synapses.

**kwargs:

Passed to SynapseUnit constructor.

Returns

list[list[SynapseUnit]]:

List of groups, each a list of SynapseUnit objects.

innervate_total(section_list, **kwargs)[source]

Create SynapseUnits for every segment in the provided list of sections.

Parameters

section_listlist[Section]

List of NEURON Section objects.

**kwargs:

Passed to SynapseUnit constructor.

Returns

list[SynapseUnit]:

List of created SynapseUnit objects.

syn_path_place(cell, section_list, locations, tau1=0.27, tau2=0.271, e=15)[source]
class SynapseUnit(segment, **kwargs)[source]

Bases: object

Represents a synaptic unit consisting of a Exp2Syn, NetStim, and NetCon on a given segment. Handles creation and management of synaptic parameters and firing probability.

Initialize a SynapseUnit on a given segment. A Synapse consists of an Exp2Syn synapse, a NetStim for stimulation, and a NetCon to connect them.

Parameters

segmentSegment

The NEURON segment to place the synapse on.

**kwargs:

Optional parameters for synapse and stimulation properties. firing_probability (float): Probability the synapse will fire (default 1.0). start (float): Start time for NetStim (default 0). tau1, tau2, e, number, interval, noise, gmax, delay: Passed to respective NEURON objects.

create_netcon(**kwargs)[source]

Create and configure a NetCon connecting NetStim to the synapse.

Parameters

**kwargs:

gmax (weight), delay (optional connection parameters).

Returns

NetCon:

The created NetCon object.

create_netstim(**kwargs)[source]

Create and configure a NetStim for this synapse.

Parameters

**kwargs:

number, interval, noise (optional stimulation parameters).

Returns

NetStim:

The created NetStim object.

create_syn(**kwargs)[source]

Create and configure an Exp2Syn synapse on the segment.

Parameters

**kwargs:

tau1, tau2, e (optional synaptic parameters).

Returns

Exp2Syn:

The created synapse object.

destroy()[source]

Destroy the synapse unit by deleting the synapse, netstim, and netcon objects.

reroll_firing(**kwargs)[source]

Reroll the firing probability of the synapse unit and update NetStim start time.

Parameters

**kwargs:

firing_probability (float, optional): New probability to use.