diff --git a/src/spikeinterface/extractors/neoextractors/plexon2.py b/src/spikeinterface/extractors/neoextractors/plexon2.py index fe24ba6f46..941158def1 100644 --- a/src/spikeinterface/extractors/neoextractors/plexon2.py +++ b/src/spikeinterface/extractors/neoextractors/plexon2.py @@ -19,6 +19,13 @@ class Plexon2RecordingExtractor(NeoBaseRecordingExtractor): If there are several streams, specify the stream id you want to load. stream_name : str, default: None If there are several streams, specify the stream name you want to load. + use_names_as_ids: + If True, the names of the signals are used as channel ids. If False, the channel ids are a combination of the + source id and the channel index. + + Example for widegain signals: + names: ["WB01", "WB02", "WB03", "WB04"] + ids: ["source3.1" , "source3.2", "source3.3", "source3.4"] all_annotations : bool, default: False Load exhaustively all annotations from neo. """ @@ -27,10 +34,15 @@ class Plexon2RecordingExtractor(NeoBaseRecordingExtractor): NeoRawIOClass = "Plexon2RawIO" name = "plexon2" - def __init__(self, file_path, stream_id=None, stream_name=None, all_annotations=False): + def __init__(self, file_path, stream_id=None, stream_name=None, use_names_as_ids=True, all_annotations=False): neo_kwargs = self.map_to_neo_kwargs(file_path) NeoBaseRecordingExtractor.__init__( - self, stream_id=stream_id, stream_name=stream_name, all_annotations=all_annotations, **neo_kwargs + self, + stream_id=stream_id, + stream_name=stream_name, + all_annotations=all_annotations, + use_names_as_ids=use_names_as_ids, + **neo_kwargs, ) self._kwargs.update({"file_path": str(file_path)})