I am trying to write spikedetector data into .gdf files in binary format, but I cannot.
I am setting the binary
param of the spikedetector to True
(I checked it using nest.GetStatus
) but files are written in ASCII:
neurons = nest.Create('iaf_psc_alpha', 5)
sr = nest.Create('spike_recorder')
nest.Connect(neurons, sr)
sr.SetStatus({'binary': True})
I am using NEST 2.18
The documentation for NEST 2.18 and 2.20 is misleading in this respect. The binary
option has no effect (it sets the ios::binary
flag when opening the file, but that has no significant consequences).
If you want to write spikes in binary format, you need to switch to NEST 3.0 and use the sionlib recording backend by setting the recorder's record_to
property:
neurons = nest.Create('iaf_psc_alpha', 5)
sr = nest.Create('spike_recorder')
nest.Connect(neurons, sr)
sr.SetStatus({'record_to': 'sionlib'})
A guide for recording from simulations is available in the docs.