Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/spikeinterface/extractors/neoextractors/blackrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from packaging import version
from typing import Optional


from spikeinterface.core.core_tools import define_function_from_class

from .neobaseextractor import NeoBaseRecordingExtractor, NeoBaseSortingExtractor
Expand Down Expand Up @@ -76,14 +75,17 @@ class BlackrockSortingExtractor(NeoBaseSortingExtractor):
----------
file_path : str
The file path to load the recordings from
sampling_frequency : float, default: None
The sampling frequency for the sorting extractor. When the signal data is available (.ncs) those files will be
used to extract the frequency automatically. Otherwise, the sampling frequency needs to be specified for
this extractor to be initialized
stream_id : str, default: None
Used to extract information about the sampling frequency and t_start from the analog signal if provided.
stream_name : str, default: None
Used to extract information about the sampling frequency and t_start from the analog signal if provided.
sampling_frequency : float, default: None
The sampling frequency for the sorting extractor. When the signal data is available (.ncs) those files will be
used to extract the frequency automatically. Otherwise, the sampling frequency needs to be specified for
this extractor to be initialized.
nsx_to_load : int | list | str, default: None
IDs of nsX file from which to load data, e.g., if set to 5 only data from the ns5 file are loaded.
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.
"""

NeoRawIOClass = "BlackrockRawIO"
Expand All @@ -92,16 +94,18 @@ class BlackrockSortingExtractor(NeoBaseSortingExtractor):
def __init__(
self,
file_path,
sampling_frequency: Optional[float] = None,
stream_id: Optional[str] = None,
stream_name: Optional[str] = None,
sampling_frequency: Optional[float] = None,
nsx_to_load: Optional[int | list | str] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the typing of this seems strange, can you double check @luiztauffer?

Sam is going to vacations so if he does not have time to check it before that I will merge this next Monday but just double check this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, makes sense.

):
neo_kwargs = self.map_to_neo_kwargs(file_path)
NeoBaseSortingExtractor.__init__(
self,
sampling_frequency=sampling_frequency,
stream_id=stream_id,
stream_name=stream_name,
sampling_frequency=sampling_frequency,
nsx_to_load=nsx_to_load,
**neo_kwargs,
)

Expand Down