Format spec: say whether a probe lists all its contacts, and define device_channel_indices

未关闭 适合新手
#475 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
documentation

调研方向

从 probeinterface.readthedocs.io/en/main/format_spec.html 中的格式规范开始,并将其中的定义与 Probe.set_device_channel_indices 和 Probe.get_slice 的 API 文档进行比较。明确文件表示的是所有触点还是一个子集,并定义 device_channel_indices 的长度、取值以及 -1 的含义;当规范解决 issue 中描述的歧义时,即视为完成。报告者表示愿意协助提交 PR。

由索引模型根据 Issue 内容生成。

描述

The format spec (https://probeinterface.readthedocs.io/en/main/format_spec.html) lists contact_positions as necessary and device_channel_indices as optional, but doesn't say what either means for a probe whose recording uses only some of its electrodes. The API docs suggest two different answers:

  • Probe.set_device_channel_indices: "If some channels are not connected or not recorded then channel should be set to "-1"". This implies a probe file describes every contact, and the wiring says which ones were recorded.
  • Probe.get_slice: "a copy of the Probe with a sub selection of contacts". Saved, this gives a file with only the recorded contacts.

Both kinds of file are in circulation, and a reader can't tell them apart from the file. For example, an NP2014 (4 shanks × 1280 electrodes) recorded on 384 channels can be saved as 5120 contacts with device_channel_indices of -1 for the 4736 unrecorded ones, or as 384 contacts. Both carry "model_name": "NP2014". Only knowledge of the part number reveals that the second is a subset, and nothing in it says which electrodes of the full probe the 384 contacts are, other than contact_ids by convention.

This matters to software that uses a probe file to configure hardware or to show the whole probe, rather than only to sort spikes. Open Ephys's Bonsai.Onix1 loads Neuropixels probe files as full probes and rejects the cut-down form, since there the geometry is fixed and the selection changes between recordings.

Suggestions, in order of preference:

  1. State in the spec that a probe describes all of its contacts, and that device_channel_indices gives each contact's channel on the acquisition device, or -1 for a contact not recorded. get_slice stays as an in-memory operation, and writing a sliced probe is documented as producing a file that describes a subset.
  2. Failing that, mark a subset in the file, for example a probe-level annotation such as "contact_subset": true, and define contact_ids as the reference into the full probe from the catalog, so a reader can rebuild the full probe.
  3. In either case, define device_channel_indices in the spec itself: its length, its value range, and what -1 means.

Happy to help with a PR to the spec text.

主要语言
Python
星标
89
派生
52
平均合并
1 天 19 小时
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

SpikeInterface/probeinterface 的其他 Issue

查看 SpikeInterface/probeinterface 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。