Dear Léa,
Thanks for writing in. You've indeed pointed out a bit of an inconsistency in the NESTML synapse update block. We've already started work to rectify this (https://github.com/nest/nestml/pull/798), but it might also need some clarification that synaptic traces are not updated on a regular time grid, but only when a presynaptic spike is "received" by the synapse. The statements in the synapse update block are executed whenever a new spike is processed; also when a postsynaptic spike is processed, except that this update is deferred (queued) and only actually takes place when triggered by a presynaptic spike.
For a workaround that you might be able to use, you can run the simulation not in one go, but in several consecutive "chunks". Between each chunk, you would grab the trace value using a GetStatus() call. We are using this strategy for our dopamine-modulated STDP tutorial that we just gave yesterday at OCNS 2022; this is also under review to be merged and you can find it at https://github.com/nest/nestml/pull/787. Please have a look and let us know if this solution works for you.
With kind regards, Charl
On Fri, Jul 15, 2022, at 13:49, lea.driessens@ensea.fr wrote:
Hello,
We are trying to plot an exponential synaptic trace in a custom made synapse model made with NESTML, and to do that we are trying to use the print function within the model. But when we try to print something or to change the value of a variable (initialized in the state block) inside the update block, nothing happens. We started with a simple string "Hello", and nothing was printed. We then tried to add 1 to a variable initialized to 0 and its value didn't change. If the print command is written in the onReceive block, it works without problems; as for the variable, its value can be changed in the onReceive block, but if we print its value in the onReceive block and change the value in the update block, we see that the value is not updated from 0. Since we would like to get the value of the synaptic trace to plot its change during simulation, we would need to get the value of the trace not just when a spike is received (there would be no point) but more often. Do you know what we could do? (And why the update block is not working properly?)
Best regards, Léa D. _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org