Hello Léa,

As Charl mentioned in the previous email, there is a bug w.r.t statements in the update block in synapses and that is why you cannot see the statements in the update block being executed. The fix is currently under review and will be merged soon: https://github.com/nest/nestml/pull/798

Meanwhile, to get a smoother curve for the eligibility trace, you could run the simulation with large number of chunks and get the trace value directly from NEST’s get() function. A sample code is as below:

syn = nest.GetConnections(target=neurons, synapse_model="stdp_nestml_rec”)
sim_time = 10000
sim_chunks = 100

# Rum simulation in chunks
nest.Prepare()
for i in range(sim_chunks):
nest.Run(sim_time//sim_chunks)
pre_trace = syn.get(“pre_trace”)
nest.Cleanup()

Please replace the synapse_model_name and “pre_trace” with appropriate values from your model. Hope this helps and let us know if you can get smoother traces with this.

Thanks,
Pooja

On 25. Jul 2022, at 17:18, lea.driessens@ensea.fr wrote:

Dear Charl,
Thanks for your suggestions!
We were able to get the log values of the synaptic trace we were interested in by running the simulation in chunks.
However, we noticed that the instruction we wrote in the update block were never executed, not even when receiving a presynaptic spike! Thus, we were only able to have a "squared" exponential decay: the trace value was only determined by the equation ```syn_trace' = syn_trace / tau_syn ``` and was only updated in big steps when a spike travelled through the individual synapse (note that we are currently using a toy network with four neurons and very few spikes).
Here reported a figure ( https://imgur.com/a/AJfbcu1 ) to explain the concept: the four lines are the exponentially-decaying synaptic traces for each connection in the network and the markers are the spikes travelling from the presynaptic neurons; if we look at the blue trace, for instance, we see that its value is updated only when the yellow-marked spikes are present, causing an irregular shape of the exponential decay.

We might highlight the fact that we are using NESTML 5.0.0rc2 since NESTML 5.0.0 has conflicts with the existing NEST installation on our workstation (version 3.1) that we cannot change due to shared usage of the machine.

With this being said, what would be the best way to have a smooth decay of an exponential function that depends the least on (or possibly is independent of) the actual spikes being processed by the synapse model? (i.e. how could we achieve curves similar to the dopamine traces shown in the tutorial you sent us?)

Best,
Léa D.
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org