Recording spike data from SpiNNaker as CSV


#1

Dear All,

I do have a running combined NRP and SpiNNaker simulation.
In this simulation I am able to monitor the spikes from the population “Populationes.dvs_on”
in the Log Console with this code:

import hbp_nrp_cle.tf_framework as nrp
@nrp.MapSpikeSink(“population”, nrp.brain.Populationes.dvs_on, nrp.spike_recorder)
@nrp.Neuron2Robot(triggers=[“population”])
def left_wheel_neuron_rate_monitor(t, population):
clientLogger.info(“sensor output spiked: {}”.format(population.times))
return True

However, I am not able to save the spike events coming from SpiNNaker
with the following function. The csv file always contains no spikes.
What is the issue with this function? How can
I save spike data from SpiNNaker to a cvs file?

@nrp.MapCSVRecorder(“recorder”, filename=“all_spikes.csv”, headers=[“id”, “time”])
@nrp.MapSpikeSink(“record_neurons”, nrp.brain.Populationes.dvs_on, nrp.spike_recorder)
@nrp.Neuron2Robot(Topic(’/monitor/spike_recorder’, cle_ros_msgs.msg.SpikeEvent))
def csv_spike_monitor(t, recorder, record_neurons):
for i in range(0, len(record_neurons.times)):
recorder.record_entry(
record_neurons.times[i][0],
record_neurons.times[i][1]
)

Best regards,
Thorben Schoepe


#2

Hi Thorben,

To make sure that there is actual data written to the topic you can do a
rostopic echo /monitor/spike_recorder
in your terminal and see if there is data being published there.If indeed there are data there, then it could be an issue with the structure of the data,maybe the indices that you are trying to access with record_neurons.times[i][0],
record_neurons.times[i][1] do not exist, or something similar. To help us debug, could you upload your experiment files so that we can try to do the same on our side?

Best regards,
Manos