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

Abierto Apto para principiantes
#475 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
75/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Empieza por la especificación del formato en probeinterface.readthedocs.io/en/main/format_spec.html y compara sus definiciones con la documentación de la API de Probe.set_device_channel_indices y Probe.get_slice. Aclara si los archivos representan todos los contactos o un subconjunto, y define la longitud y los valores de device_channel_indices, así como el significado de -1; el trabajo estará terminado cuando la especificación resuelva la ambigüedad descrita en el issue. La persona que lo reportó se ofrece a ayudar con un PR.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
89
Forks
52
Merge medio
1 d 19 h
PR fusionados (30 d)
4

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SpikeInterface/probeinterface

Todos los issues de SpikeInterface/probeinterface

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.