Skip to content

How to select only wideband channels in Plexon #3196

Closed

Description

@h-mayorquin

This question arose in neo but it has a clear solution in spikeinterface.

The problem is that neo has both wide band and filtered signals in the same stream but users usually want the stream band. I am writing the solution here for @AbhiSwamiUConn as this is a proper spikeinterface issue:

from pathlib import Path
from spikeinterface.extractors import read_plexon

file_path = f"your_plexon_file_path"
stream_id = "0" # This corresponds to wideband and filtered signals
recording = read_plexon(file_path=file_path, stream_name="WB-Wideband")
channel_ids = recording.get_channel_ids()
wide_band_channel_ids = [id for id in channel_ids if "WB"  in id]
wide_band_recording = recording.select_channels(channel_ids=wide_band_channel_ids)
wide_band_recording

This will give you the solution.

Activity

  1. added
    question
    extractors
    on Jul 12, 2024
  2. self-assigned this
    on Jul 12, 2024
  3. AbhiSwamiUConn commented on Jul 12, 2024

    @AbhiSwamiUConn

    Thank you.

  4. h-mayorquin commented on Jul 12, 2024

    @h-mayorquin
    ContributorAuthor

    Note that you will need to update spikeinterface for a version where this is merge:
    #3193

    That right now is main but should be included in our next 0.101 that will be coming in a week or two.

  5. h-mayorquin commented on Aug 15, 2024

    @h-mayorquin
    ContributorAuthor

    Closing this as #3193 was merged.

  6. h-mayorquin commented on Aug 15, 2024

    @h-mayorquin
    ContributorAuthor

    Re-opening this as I have realized that stream-ids are not stable on neo:

    NeuralEnsemble/python-neo#1523

  7. h-mayorquin commented on Sep 18, 2024

    @h-mayorquin
    ContributorAuthor

    OK, I updated the initial instructions and it should work now in the latest versions of Spikeinterface and neo.

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

Metadata

Metadata

Assignees

Labels

extractorsquestion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions