About this Forum: If you need to paste code, be sure to surround it with the proper markup (that's what the
< / > formatting button is for). Otherwise things like leftsquarebracket i rightsquarebracket will be treated as formatting instructions (interpreted as "italic").
Here's how to fix your own code:
1. When you're developing code and something doesn't work, try again with the simplest model possible: a single compartment model cell, a single synaptic mechanism attached to it, and one vector of synaptic activation times. When you get that working, add a second synaptic mechanism with a different vector of synaptic activation times. Then try a larger number of synaptic mechanisms and activation time vectors.
2. Development and debugging will be easiest if you begin with short run times. 5 or 10 ms is long enough to reveal the most common problems. Code that dies immediately isn't going to work better with a long run time. Code that produces incorrect results from the start doesn't have to run for 8000 ms to reveal what's wrong.
Here are three questions about this loop:
Code: Select all
for i, (ampa_vecstim, nmda_vecstim) in enumerate(zip(ampa_vecstim_list, nmda_vecstim_list)):
t_ampa_vec = h.Vector(ampa_activation[i])
ampa_vecstim.play(t_ampa_vec)
t_nmda_vec = h.Vector(nmda_activation[i])
nmda_vecstim.play(t_nmda_vec)
Why are the iterated variables never used in the loop?
What are
and
?
Let's pretend that the loop actually works. After the first pass through the loop, what do you think will happen to the t_ampa_vec and t_nmda_vec that were created in the previous pass?