1# -*- coding: utf-8 -*- 2# 3# gif_cond_exp_multisynapse.py 4# 5# This file is part of NEST. 6# 7# Copyright (C) 2004 The NEST Initiative 8# 9# NEST is free software: you can redistribute it and/or modify 10# it under the terms of the GNU General Public License as published by 11# the Free Software Foundation, either version 2 of the License, or 12# (at your option) any later version. 13# 14# NEST is distributed in the hope that it will be useful, 15# but WITHOUT ANY WARRANTY; without even the implied warranty of 16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17# GNU General Public License for more details. 18# 19# You should have received a copy of the GNU General Public License 20# along with NEST. If not, see <http://www.gnu.org/licenses/>. 21 22""" 23gif_cond_exp_multisynapse 24------------------------- 25 26""" 27 28import nest 29import numpy as np 30 31neuron = nest.Create('gif_cond_exp_multisynapse', 32 params={'E_rev': [0.0, -85.0], 33 'tau_syn': [4.0, 8.0]}) 34 35spike = nest.Create('spike_generator', params={'spike_times': 36 np.array([10.0])}) 37 38delays = [1., 30.] 39w = [1., 5.] 40for syn in range(2): 41 nest.Connect(spike, neuron, syn_spec={'synapse_model': 'static_synapse', 42 'receptor_type': 1 + syn, 43 'weight': w[syn], 44 'delay': delays[syn]}) 45nest.Simulate(100.) 46