Getting the proper channel mapping from a Spikegadgets .rec file (tetrodes)

Abierto
#472 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Documentación
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python
Área
data

Línea de trabajo

The question is how the channel_name property from read_spikegadgets maps onto the device indices passed to set_device_channel_indices on each probe in a ProbeGroup. Start by printing the recording's channel_name values and the trode to channel mapping, then check the probe's device channel indices against them. Done would be a worked SpikeGadgets tetrode example, or a clear explanation of the missing mapping step.

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

Descripción

Hi, I'm trying to (re)write a spike-sorting pipeline for spikegadgets tetrode data via spike interface & probe interface (both are very convenient!! thank you!) It's going pretty well but I am wondering about the channel mapping.

My setup is 128 channels organised in 32 tetrodes.
On the one hand, spike interface can read my example recording (directly from the .rec file with read_spikegadgets !) and the recording has a channel_name property that in my case contains the following:
 array(['trode19chan0', 'trode5chan32', 'trode9chan64', 'trode15chan96',
       'trode20chan1', 'trode30chan33', 'trode10chan65', 'trode24chan97',
       'trode19chan2', 'trode5chan34', 'trode9chan66', 'trode15chan98', ...] 
I can use this to create a dictionnary between tetrode numbers (1-> 32) and channel numbers (0 -> 127), I can then feed this to spike / probe interface to give it the relevant 4 channel numbers for each tetrode, with something like:

tetrode_group = ProbeGroup()
for trode_name in tetrode_list:
    tetrode = generate_tetrode()
    these_chan = TT_dict[trode_name]
    tetrode.set_device_channel_indices(these_chan)
    tetrode_group.add_probe(tetrode) 

this_rec.set_probegroup(tetrode_group, group_mode = 'by_probe')

However, I think something is missing in that approach as the resulting 4 channels of each tetrode do not look like they belong to the same tetrode in Phy or in any data previews. I'm pretty sure there should be an additional mapping step but I'm not sure what exactly is missing, looking at the spike interface or probeinterface doc does not help me much as I couldn't see any SpikeGadgets examples there.
I'm thinking that probably the channel names in the 'channel_name' property of the recording do not actually match the naming scheme used by set_device_channel_indices? But how to get them to match?

Would anyone has any insights, link to relevant documentation that I might have missed or, even better, an example code that handles this mapping? Happy to share my code once it works or if it helps debug!

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.