From 53b3ec9bdf49c1f93aa6e03a1ecdc55a1ba00a8f Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Sat, 22 Jun 2024 18:27:13 -0600 Subject: [PATCH] add docstring and propagate arugment to signature --- .../extractors/neoextractors/plexon2.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/spikeinterface/extractors/neoextractors/plexon2.py b/src/spikeinterface/extractors/neoextractors/plexon2.py index 256c112e6f..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,14 +34,14 @@ 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, - use_names_as_ids=True, + use_names_as_ids=use_names_as_ids, **neo_kwargs, ) self._kwargs.update({"file_path": str(file_path)})