.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/evaluate_tsodyks2_synapse.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_evaluate_tsodyks2_synapse.py: Example of the tsodyks2_synapse in NEST --------------------------------------- .. only:: html ---- Run this example as a Jupyter notebook: .. card:: :width: 25% :margin: 2 :text-align: center :link: https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fnest%2Fnest-simulator-examples&urlpath=lab%2Ftree%2Fnest-simulator-examples%2Fnotebooks%2Fnotebooks%2Fevaluate_tsodyks2_synapse.ipynb&branch=main :link-alt: JupyterHub service .. image:: https://nest-simulator.org/TryItOnEBRAINS.png .. grid:: 1 1 1 1 :padding: 0 0 2 0 .. grid-item:: :class: sd-text-muted :margin: 0 0 3 0 :padding: 0 0 3 0 :columns: 4 See :ref:`our guide ` for more information and troubleshooting. ---- This synapse model implements synaptic short-term depression and short-term f according to [1]_ and [2]_. It solves Eq (2) from [1]_ and modulates U according This connection merely scales the synaptic weight, based on the spike history parameters of the kinetic model. Thus, it is suitable for any type of synapse that is current or conductance based. The parameter `A_se` from the publications is represented by the synaptic weight. The variable `x` in the synapse properties is the factor that scales the synaptic weight. See also [3]_. Parameters ~~~~~~~~~~ The following parameters can be set in the status dictionary: * U - probability of release increment (U1) [0,1], default=0. * u - Maximum probability of release (U_se) [0,1], default=0. * x - current scaling factor of the weight, default=U * tau_rec - time constant for depression in ms, default=800 ms * tau_fac - time constant for facilitation in ms, default=0 (off) Notes ~~~~~ Under identical conditions, the ``tsodyks2_synapse`` produces slightly lower peak amplitudes than the ``tsodyks_synapse``. However, the qualitative behavior is identical. This compares the two synapse models. References ~~~~~~~~~~ .. [1] Tsodyks MV, and Markram H. (1997). The neural code between neocortical depends on neurotransmitter release probability. PNAS, 94(2), 719-23. .. [2] Fuhrmann G, Segev I, Markram H, and Tsodyks MV. (2002). Coding of temporal information by activity-dependent synapses. Journal of Neurophysiology, 8. https://doi.org/10.1152/jn.00258.2001 .. [3] Maass W, and Markram H. (2002). Synapses as dynamic memory buffers. Neural Networks, 15(2), 155-161. http://dx.doi.org/10.1016/S0893-6080(01)00144-7 .. GENERATED FROM PYTHON SOURCE LINES 72-79 .. code-block:: Python import matplotlib.pyplot as plt import nest import nest.voltage_trace nest.ResetKernel() .. GENERATED FROM PYTHON SOURCE LINES 80-81 Parameter set for depression .. GENERATED FROM PYTHON SOURCE LINES 81-84 .. code-block:: Python dep_params = {"U": 0.67, "u": 0.67, "x": 1.0, "tau_rec": 450.0, "tau_fac": 0.0, "weight": 250.0} .. GENERATED FROM PYTHON SOURCE LINES 85-86 Parameter set for facilitation .. GENERATED FROM PYTHON SOURCE LINES 86-89 .. code-block:: Python fac_params = {"U": 0.1, "u": 0.1, "x": 1.0, "tau_fac": 1000.0, "tau_rec": 100.0, "weight": 250.0} .. GENERATED FROM PYTHON SOURCE LINES 90-91 Now we assign the parameter set to the synapse models. .. GENERATED FROM PYTHON SOURCE LINES 91-95 .. code-block:: Python tsodyks_params = dict(fac_params, synapse_model="tsodyks_synapse") # for tsodyks_synapse tsodyks2_params = dict(fac_params, synapse_model="tsodyks2_synapse") # for tsodyks2_synapse .. GENERATED FROM PYTHON SOURCE LINES 96-97 Create three neurons. .. GENERATED FROM PYTHON SOURCE LINES 97-100 .. code-block:: Python neuron = nest.Create("iaf_psc_exp", 3, params={"tau_syn_ex": 3.0}) .. GENERATED FROM PYTHON SOURCE LINES 101-103 Neuron one produces spikes. Neurons 2 and 3 receive the spikes via the two synapse models. .. GENERATED FROM PYTHON SOURCE LINES 103-107 .. code-block:: Python nest.Connect(neuron[0], neuron[1], syn_spec=tsodyks_params) nest.Connect(neuron[0], neuron[2], syn_spec=tsodyks2_params) .. GENERATED FROM PYTHON SOURCE LINES 108-109 Now create two voltmeters to record the responses. .. GENERATED FROM PYTHON SOURCE LINES 109-112 .. code-block:: Python voltmeter = nest.Create("voltmeter", 2) .. GENERATED FROM PYTHON SOURCE LINES 113-114 Connect the voltmeters to the neurons. .. GENERATED FROM PYTHON SOURCE LINES 114-118 .. code-block:: Python nest.Connect(voltmeter[0], neuron[1]) nest.Connect(voltmeter[1], neuron[2]) .. GENERATED FROM PYTHON SOURCE LINES 119-121 Now simulate the standard STP protocol: a burst of spikes, followed by a pause and a recovery response. .. GENERATED FROM PYTHON SOURCE LINES 121-130 .. code-block:: Python neuron[0].I_e = 376.0 nest.Simulate(500.0) neuron[0].I_e = 0.0 nest.Simulate(500.0) neuron[0].I_e = 376.0 nest.Simulate(500.0) .. GENERATED FROM PYTHON SOURCE LINES 131-133 Finally, generate voltage traces. Both are shown in the same plot and should be almost completely overlapping. .. GENERATED FROM PYTHON SOURCE LINES 133-137 .. code-block:: Python nest.voltage_trace.from_device(voltmeter[0]) nest.voltage_trace.from_device(voltmeter[1]) plt.show() .. _sphx_glr_download_auto_examples_evaluate_tsodyks2_synapse.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: evaluate_tsodyks2_synapse.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: evaluate_tsodyks2_synapse.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_