44from packaging import version
55from typing import Optional
66
7-
87from spikeinterface .core .core_tools import define_function_from_class
98
109from .neobaseextractor import NeoBaseRecordingExtractor , NeoBaseSortingExtractor
@@ -76,14 +75,17 @@ class BlackrockSortingExtractor(NeoBaseSortingExtractor):
7675 ----------
7776 file_path : str
7877 The file path to load the recordings from
79- sampling_frequency : float, default: None
80- The sampling frequency for the sorting extractor. When the signal data is available (.ncs) those files will be
81- used to extract the frequency automatically. Otherwise, the sampling frequency needs to be specified for
82- this extractor to be initialized
8378 stream_id : str, default: None
8479 Used to extract information about the sampling frequency and t_start from the analog signal if provided.
8580 stream_name : str, default: None
8681 Used to extract information about the sampling frequency and t_start from the analog signal if provided.
82+ sampling_frequency : float, default: None
83+ The sampling frequency for the sorting extractor. When the signal data is available (.ncs) those files will be
84+ used to extract the frequency automatically. Otherwise, the sampling frequency needs to be specified for
85+ this extractor to be initialized.
86+ nsx_to_load : int | list | str, default: None
87+ IDs of nsX file from which to load data, e.g., if set to 5 only data from the ns5 file are loaded.
88+ If 'all', then all nsX will be loaded. If None, all nsX files will be loaded. If empty list, no nsX files will be loaded.
8789 """
8890
8991 NeoRawIOClass = "BlackrockRawIO"
@@ -92,16 +94,18 @@ class BlackrockSortingExtractor(NeoBaseSortingExtractor):
9294 def __init__ (
9395 self ,
9496 file_path ,
95- sampling_frequency : Optional [float ] = None ,
9697 stream_id : Optional [str ] = None ,
9798 stream_name : Optional [str ] = None ,
99+ sampling_frequency : Optional [float ] = None ,
100+ nsx_to_load : Optional [int | list | str ] = None ,
98101 ):
99102 neo_kwargs = self .map_to_neo_kwargs (file_path )
100103 NeoBaseSortingExtractor .__init__ (
101104 self ,
102- sampling_frequency = sampling_frequency ,
103105 stream_id = stream_id ,
104106 stream_name = stream_name ,
107+ sampling_frequency = sampling_frequency ,
108+ nsx_to_load = nsx_to_load ,
105109 ** neo_kwargs ,
106110 )
107111
0 commit comments