What is the best way to get access to a low-pass filtered version of the population firing rate?
P is my population spike trace. That means every time one of the neurons in my NeuronGroup spikes, I add a constant amount (1/tau_P) to the variable P.
I tried to add this update to the reset statement of the NeuronGroup:
reset='v_s=el ; ; P+=1/tau_P'
This, for now, means that every neuron has its own variable P, which keeps track of the spikes.
To low-pass filter this spike train, I defined a differential equation in the equation for the Neurongroup. To get a global variable P, which keeps tracks of all spikes in the entire population, I tried to declare this as 'shared'.
dP/dt = -P/tau_P : Hz (shared)
However, the problem is that differential equations cannot be shared.
What would be the best way to keep track of all the spikes and make them accessible to each synapse in the network? In the end, I would like to access the variable P in my Synapses objects to make synaptic plasticity dependent on the population firing rate.
Many Thanks!