首页 > 解决方案 > 如何以二进制格式存储来自 NEST 模拟器的记录数据?

问题描述

我正在尝试将尖峰检测器数据以二进制格式写入 .gdf 文件,但我不能。

binary将spikedetector的参数设置为True(我使用检查过nest.GetStatus),但文件是用ASCII编写的:

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

我正在使用 NEST 2.18

标签: pythonnest-simulator

解决方案


NEST 2.18 和 2.20 的文档在这方面具有误导性。该binary选项无效(它ios::binary在打开文件时设置标志,但这不会产生重大影响)。

如果要以二进制格式编写尖峰信号,则需要切换到 NEST 3.0 并通过设置记录器的属性来使用sionlib 记录后端:record_to

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

文档中提供了用于记录模拟的指南。


推荐阅读