跳转到主要内容

用于在probeinterface格式中定义神经探针的扩展

项目描述

ndx-probeinterface NWB扩展

ndx-probeinterface是NWB格式的扩展,用于正式在NWB文件中将有关神经探针的信息定义为数据类型。它包含辅助函数,可以轻松地将ndx-probeinterface.Probeprobeinterface.Probe构造,反之亦然。

安装

pip install ndx_probeinterface

使用方法

probeinterface.ProbeProbeGroup对象到ndx_probeinterface.Probe对象的转换

import ndx_probeinterface

pi_probe = probeinterface.Probe(...)
pi_probegroup = probeinterface.ProbeGroup()

# from_probeinterface always returns a list of ndx_probeinterface.Probe devices
ndx_probes1 = ndx_probeinterface.from_probeinterface(pi_probe)
ndx_probes2 = ndx_probeinterface.from_probeinterface(pi_probegroup)

ndx_probes = ndx_probes1.extend(ndx_probes2)

nwbfile = pynwb.NWBFile(...)

# add Probe as NWB Devices
for ndx_probe in ndx_probes:
    nwbfile.add_device(ndx_probe)

ndx_probeinterface.Probe对象到probeinterface.Probe对象的转换

import ndx_probeinterface

# load ndx_probeinterface.Probe objects from NWB file
io = pynwb.NWBH5IO(file_path, 'r', load_namespaces=True)
nwbfile = io.read()

ndx_probes = []
for device in nwbfile:
    if isinstance(device, ndx_probeinterface.Probe):
        ndx_probes.append(device)

# convert to probeinterface.Probe objects
pi_probes = []
for ndx_probe in ndx_probes:
    pi_probe = ndx_probeinterface.to_probeinterface(ndx_probe)
    pi_probes.append(pi_probe)

未来计划

  • 添加关于用于数据采集的头端信息
  • ElectrodeTable中删除冗余信息
  • 将此NDX纳入核心NWB架构

此扩展使用ndx-template创建。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

ndx-probeinterface-0.1.0.tar.gz (15.2 kB 查看散列)

上传时间:

构建分发

ndx_probeinterface-0.1.0-py2.py3-none-any.whl (6.8 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持