-
Notifications
You must be signed in to change notification settings - Fork 32
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
Example in NEST not showing synaptic transmission #45
Comments
Hi @pgleeson - sorry for the delay, been really busy the past couple of weeks. But I finally got around to looking at the example. Synaptic connections are being made, but it looks like the synaptic strengths (syn_weight * nsyns) is so low there is essentially no activity. By playing around the parameters I found that by setting n_syns~12 and syn_weight~40.0 I can get the post-synaptic cells to spike. I was also able to get post-synaptic cells to spike by doubling the amplitude and letting the simulation run for > 2 seconds. Just to make sure this is a nest-parameters issue and not a bmtk issue I recreated the network using only nest. You can play around with the parameters in the script and should see very similar results when using bmtk/sonata: import pandas as pd
import matplotlib.pyplot as plt
import nest
dt = 0.01
tstop = 1000.0
amp = 190.0
delay = 100.0
duration = 800.0
nsyns = 12
syn_weight = 40.0
# create cells and connections
nest.SetKernelStatus({"resolution": dt, "overwrite_files": True, "print_time": True})
pre_cells = nest.Create('iaf_psc_alpha', 4, {u'tau_m': 44.9, u'V_th': -43.0, u'I_e': 0.0, u'C_m': 239.0, u'V_reset': -55.0, u't_ref': 3.0, u'E_L': -78.0})
post_cells = nest.Create('iaf_psc_alpha', 4, {u'tau_m': 44.9, u'V_th': -43.0, u'I_e': 0.0, u'C_m': 239.0, u'V_reset': -55.0, u't_ref': 3.0, u'E_L': -78.0})
nest.Connect([1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4],
[5, 5, 5, 5, 7, 7, 7, 7, 8, 8, 8, 8],
conn_spec='one_to_one',
syn_spec={
'delay': 2.0,
'model': 'static_synapse',
'weight': [syn_weight*nsyns]*12
})
# spike reader
spike_detector = nest.Create("spike_detector", 1, {'withgid': True, 'to_file': False})
nest.Connect(pre_cells+post_cells, spike_detector)
# voltage reader
multimeter = nest.Create('multimeter', params={'withtime': True, 'to_file': False, 'start': 0.0, 'stop': tstop,
'record_from': ['V_m'], 'interval': dt})
nest.Connect(multimeter, post_cells)
# current clamp
scg = nest.Create("step_current_generator",
params={'amplitude_times': [delay, delay+duration], 'amplitude_values': [amp, 0.0]})
nest.Connect(scg, pre_cells, syn_spec={'delay': dt})
# run sim and show results
nest.Simulate(tstop)
spikes_data = nest.GetStatus(spike_detector)[0]['events']
post_syn_spikes = [t for t in zip(spikes_data['senders'], spikes_data['times']) if t[0] > 4]
print 'total spikes: {}'.format(len(spikes_data['senders']))
print 'post-syn spikes: {}'.format(len(post_syn_spikes))
vm = nest.GetStatus(multimeter)[0]['events']
vm_df = pd.DataFrame(vm)
vm_df[vm_df['senders'] == 5].plot(x='times', y='V_m')
# plt.show() |
Thanks for checking that @kaeldai, very useful. I have managed to get a good match now for the jNeuroML version, but only after searching for a while and finding that the default value for tau in synapses in this NEST cell type is 2ms (I had to look through the source code for it)... Another reason (as also mentioned here) to discourage (and I'd suggest eventually, not to allow) simulators' own inbuilt types as cell primitives. |
For future reference, you can find default parameter values in NEST like this:
|
I've added a simple example here: https://github.com/pgleeson/sonata/tree/intfire/examples/small_iclamp for my own testing, with iclamps into one 4 cell I&F pop & connections to another 4 cell pop. The edges do seem to be generated, but there doesn't seem to be any synaptic transmission. Could you have a look at this @kaeldai?
Rerun with:
The text was updated successfully, but these errors were encountered: