Skip to content

Question about changing device_channel_indices from str into int #3477

Closed

Description

@Lingsheng-Meng

Hi, I used OpenEphys to do recording from a single 32-channel probe. When I used probeinterface to write my probe information, the channel indices must be int. But the channel indices from OpenEphys recording is a string like 'CH1'.
So when I add probe information to my BaseRecording, I meet the error below. Is there a method to change the device_channel_indices into int to match the probe file generated from probeinterface?
image
image
Thanks!

Activity

  1. alejoe91 commented on Oct 15, 2024

    @alejoe91
    Member

    Hi! device_channel_indices should be zero-based :) so it should be from 0 to 31

  2. Lingsheng-Meng commented on Oct 15, 2024

    @Lingsheng-Meng
    Author

    Hi! device_channel_indices should be zero-based :) so it should be from 0 to 31

    That works! Are the device_channel_indices automatically matching '0' to 'CH1' and '31' to 'CH32'?
    Thanks for your help!

  3. added
    question
    on Oct 15, 2024
  4. zm711 commented on Oct 15, 2024

    @zm711
    Member

    It's not automatically matching in that sense. But because the channels are "CH1" -> "CH31" they would match in this case. As a more concrete example if I made my device channel indices [31, 30,29...] instead then it would do the channels in the opposite order ie the first channel in that case would be "CH31". Does that make sense how the process is working? These indices are just like doing indexing in a numpy array.

  5. h-mayorquin commented on Oct 15, 2024

    @h-mayorquin
    Contributor

    But the channel indices from OpenEphys recording is a string like 'CH1'.

    Those are the channel ids (as in identifiers) not the indices of the recording when you think on it as an array.

  6. zm711 commented on Oct 15, 2024

    @zm711
    Member

    This is specifically what I was referring to to get you or Chris to help make an illustration (like the one you started for Probe interface ages ago), since our docs just aren't doing this justice. I think we need to visually explain this both with Pandas DFs and an idealized cartoon probe->adaptor->headstage/device.

  7. h-mayorquin commented on Oct 15, 2024

    @h-mayorquin
    Contributor

    Sadly, I won't be able to jump back into graphics until December because of all the work I have : /

    If that is still needed it, happy to help at that point.

  8. Lingsheng-Meng commented on Oct 15, 2024

    @Lingsheng-Meng
    Author

    That makes sense. The device channel indices are just indices, not the channel names. Thanks for your help!

  9. zm711 commented on Oct 15, 2024

    @zm711
    Member

    We can close this since my PR is only tangentially related to this issue. Feel free to open more issues if things come up!

    Sadly, I won't be able to jump back into graphics until December because of all the work I have : /
    If that is still needed it, happy to help at that point.

    No worries, I know you all stay busy. I'm just terrible at art. So we can revisit later if needed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions