简体   繁体   English

如何以二进制格式存储来自 NEST 模拟器的记录数据?

[英]How can I store recorded data from the NEST simulator in a binary format?

I am trying to write spikedetector data into.gdf files in binary format, but I cannot.我正在尝试将spikedetector 数据以二进制格式写入.gdf 文件,但我不能。

I am setting the binary param of the spikedetector to True (I checked it using nest.GetStatus ) but files are written in ASCII:我将spikedetector的binary参数设置为True (我使用nest.GetStatus检查了它)但是文件是用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我正在使用 NEST 2.18

The documentation for NEST 2.18 and 2.20 is misleading in this respect. NEST 2.18 和 2.20 的文档在这方面具有误导性。 The binary option has no effect and should have been removed long ago (it sets the ios::binary flag when opening the file, but that has no significant consequences). binary选项没有效果,早就应该被删除(它在打开文件时设置了ios::binary标志,但这不会产生重大影响)。

If you want to write spikes in binary format, you need to switch to NEST 3.0 (not released at time of writing but available in master ) and use the sionlib recording backend by setting the recorder's record_to property:如果您想以二进制格式编写峰值,您需要切换到 NEST 3.0(在撰写本文时未发布但在master中可用)并通过设置记录器的record_to属性来使用sionlib 记录后端

neurons = nest.Create('iaf_psc_alpha', 5)
sr = nest.Create('spike_recorder')
nest.Connect(neurons, sr)
sr.SetStatus({'record_to': 'sionlib'})

UPDATE: NEST 3.0 is released now and includes a whole guide for Recording from simulations in the docs.更新:NEST 3.0 现已发布,包括文档中模拟记录的完整指南 The mentioned binary sionlib backend is one of the sections.提到的二进制 sionlib 后端是其中的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM