Thank you for your answers and advices. I am still a bit confused by how I should use the scale_firing_rate
. From @xchoo answer here, I don’t understand if I should multiply or divide the result by scale_firing_rate
.
I use SpikingRectifiedLinear()
, which can spike more than once per timestep, if I understand correctly.
My solution to compute the number of spikes per neuron across the simulation is the following:
def get_spikes_per_neurons(sim, probes, dt=0.001):
spikes_per_layer = []
for l in range(len(probes)):
p = probes[l]
spikes = sim.data[p]
total_spikes_per_neurons = np.sum(spikes / (1 / dt), axis=0)
spikes_per_layer.append(total_spikes_per_neurons)
return spikes_per_layer
where probes
are a list of probes of neurons.
Is my solution correct, or should I multiply the result by scale_firing_rate
value?