Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect summation of synaptic currents for IF_curr_exp model #410

Closed
apdavison opened this issue May 27, 2016 · 2 comments
Closed

Incorrect summation of synaptic currents for IF_curr_exp model #410

apdavison opened this issue May 27, 2016 · 2 comments
Milestone

Comments

@apdavison
Copy link
Member

Hajime Yamauchi reported:

I’m currently implementing a simulation model which uses leaky integrated and fire neurons with a type of PSCs whose profile would be fitted with a bi-exponential function. An equation of this type should have two time constants, namely “tau_syn_rise” and “tau_syn_decay.” <e.g., exp(-(t-t0)/tau_syn_decay) - exp((t-t0)/tau_syn_rise)>. Some of you may notice I’ve asked a related question to the NEST community because there is no standard model which accepts two PSC time constants in its synaptic specification. One solution I was given was to connect two identical synapses to a neuron while using different tau_syn values and reversed weights. Regarding the weights, they are the same size but one is positive, and the other is negative. Originally, I was told I should use the iaf_psc_exp_multisynapse model, but I’ve confirmed that the same result will be obtained if I I use the standard iaf_psc_exp model with tau_syn_ex for tau_syn_decay, and tau_syn_in for tau_syn_rise.

However, if I reconstruct this in PyNN (with NEST as its base), no activity is observed. The membrane potential is completely flat. If I change the spike time of one of the synapses, NEST and PyNN give the identical result. Am I coding wrongly?

Here I give two sample codes (related part only) :
NEST 2.6.0
PyNN 0.8dev2
Python 3.4

—————NEST—————

neuron = nest.Create('iaf_psc_exp',1,{'tau_syn_ex':12., 'tau_syn_in':4., 'E_L':-65.,'V_reset':-65.,'V_m':-65.,'V_th':-50.,'t_ref':0.,'C_m':1000.,'tau_m':20.})

nest.SetStatus(spike_sourceD,'spike_times',[[40.]])
nest.SetStatus(spike_sourceR, 'spike_times',[[40.]])

nest.CopyModel('static_synapse', 'decay_syn',{'weight':200.})
nest.CopyModel('static_synapse','rise_syn',{'weight':-200.})

nest.Connect(spike_sourceD, neuron,'all_to_all', syn_spec = 'decay_syn')
nest.Connect(spike_sourceR, neuron,'all_to_all', syn_spec = 'rise_syn')

—————PyNN—————

neuron = sim.Population(1, sim.IF_curr_exp(tau_syn_E=12., tau_syn_I=4.))

spike_sourceD = sim.Population(1, sim.SpikeSourceArray(spike_times=[40.]))
spike_sourceR = sim.Population(1, sim.SpikeSourceArray(spike_times=[40.]))

sim.Projection(spike_sourceD, neuron, connector=sim.AllToAllConnector(), synapse_type = sim.StaticSynapse(weight=0.2), receptor_type='excitatory')
sim.Projection(spike_sourceR, neuron, connector=sim.AllToAllConnector(), synapse_type = sim.StaticSynapse(weight=-0.2), receptor_type='inhibitory')

@apdavison apdavison added this to the future milestone May 27, 2016
@apdavison
Copy link
Member Author

First, my apologies for the very long delay in investigating this. It turns out to be a bug in the iaf_psc_exp_ps model in NEST, which is the model PyNN uses by default for IF_curr_exp. I have created a ticket for this in the NEST issue tracker: nest/nest-simulator#368

As a workaround, in PyNN you can use the spike_precision argument to setup(), i.e.:

setup(spike_precision="on_grid")

This will cause PyNN to select iaf_psc_exp (which works correctly) instead of iaf_psc_exp_ps.

@apdavison
Copy link
Member Author

Now fixed in the NEST master branch (nest/nest-simulator#810)

@apdavison apdavison modified the milestones: 0.9.2, future Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant