pythonnest-simulator

How to set a Connection's synapse type in the NEST simulator?


Following the tutorial for the Python interface to the NEST simulator I have created 2 neuron populations and connected them:

import nest
ndict = {"I_e": 200.0, "tau_m": 20.0}
nest.SetDefaults("iaf_psc_alpha", ndict)
neuronpop1 = nest.Create("iaf_psc_alpha", 100)
neuronpop2 = nest.Create("iaf_psc_alpha", 100)

nest.Connect(neuronpop1, neuronpop2, syn_spec={"weight":20.0})

But how could I connect them with a specific synapse model like the ones listed in the model directory?


Solution

  • If I understand the question correctly, you want to connect neurons with specific connectivity patterns.

    The default connection pattern of nest.Connect is "all_to_all".

    More details about the available patterns are detailed in the Connect documentation.

    You can also see the available rules by calling nest.ConnectionRules().

    If you're using ipython or jupyter, you can get the docstring locally by typing nest.Connect?.

    EDIT: to change synapse type (how it transmits incoming signals), please see the "synapse types" documentation.

    You can find examples for tsodyks or quantal_stdp synapses.

    An example with your populations would be:

    # connect populations with depressing synapses
    dep_params = {"U": 0.67, "u": 0.67, 'x': 1.0, "tau_rec": 450.0,
                  "tau_fac": 0.0, "weight": 250.}
    
    nest.CopyModel("tsodyks_synapse", "dep_syn", syn_param)
    
    nest.Connect(neuronpop1, neuronpop2, syn_spec="dep_syn")
    

    for synapses where close subsequent spikes would have less and less effect on the post-synaptic neuron.