diff --git a/doc/api.rst b/doc/api.rst index a7476cd62f..c5c9ebe4dd 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -117,7 +117,7 @@ Non-NEO-based .. autofunction:: read_bids .. autofunction:: read_cbin_ibl .. autofunction:: read_combinato - .. autofunction:: read_ibl_streaming_recording + .. autofunction:: read_ibl_recording .. autofunction:: read_hdsort .. autofunction:: read_herdingspikes .. autofunction:: read_kilosort diff --git a/doc/modules/extractors.rst b/doc/modules/extractors.rst index 2d0e047672..ba08e45aca 100644 --- a/doc/modules/extractors.rst +++ b/doc/modules/extractors.rst @@ -125,7 +125,7 @@ For raw recording formats, we currently support: * **Biocam HDF5** :py:func:`~spikeinterface.extractors.read_biocam()` * **CED** :py:func:`~spikeinterface.extractors.read_ced()` * **EDF** :py:func:`~spikeinterface.extractors.read_edf()` -* **IBL streaming** :py:func:`~spikeinterface.extractors.read_ibl_streaming_recording()` +* **IBL streaming** :py:func:`~spikeinterface.extractors.read_ibl_recording()` * **Intan** :py:func:`~spikeinterface.extractors.read_intan()` * **MaxWell** :py:func:`~spikeinterface.extractors.read_maxwell()` * **MCS H5** :py:func:`~spikeinterface.extractors.read_mcsh5()` diff --git a/src/spikeinterface/extractors/cbin_ibl.py b/src/spikeinterface/extractors/cbin_ibl.py index a6da19408f..1687acb073 100644 --- a/src/spikeinterface/extractors/cbin_ibl.py +++ b/src/spikeinterface/extractors/cbin_ibl.py @@ -27,9 +27,11 @@ class CompressedBinaryIblExtractor(BaseRecording): load_sync_channel : bool, default: False Load or not the last channel (sync). If not then the probe is loaded. - stream_name : str, default: "ap". + stream_name : {"ap", "lp"}, default: "ap". Whether to load AP or LFP band, one of "ap" or "lp". + cbin_file : str or None, default None + The cbin file of the recording. If None, searches in `folder_path` for file. Returns ------- diff --git a/src/spikeinterface/extractors/herdingspikesextractors.py b/src/spikeinterface/extractors/herdingspikesextractors.py index 139d51d62e..87f7dd74c4 100644 --- a/src/spikeinterface/extractors/herdingspikesextractors.py +++ b/src/spikeinterface/extractors/herdingspikesextractors.py @@ -20,7 +20,7 @@ class HerdingspikesSortingExtractor(BaseSorting): Parameters ---------- - folder_path : str or Path + file_path : str or Path Path to the ALF folder. load_unit_info : bool, default: True Whether to load the unit info from the file. diff --git a/src/spikeinterface/extractors/iblextractors.py b/src/spikeinterface/extractors/iblextractors.py index 2444314aec..27bb95854f 100644 --- a/src/spikeinterface/extractors/iblextractors.py +++ b/src/spikeinterface/extractors/iblextractors.py @@ -41,7 +41,7 @@ class IblRecordingExtractor(BaseRecording): stream_name : str The name of the stream to load for the session. These can be retrieved from calling `StreamingIblExtractor.get_stream_names(session="")`. - load_sync_channels : bool, default: false + load_sync_channel : bool, default: false Load or not the last channel (sync). If not then the probe is loaded. cache_folder : str or None, default: None diff --git a/src/spikeinterface/extractors/neoextractors/alphaomega.py b/src/spikeinterface/extractors/neoextractors/alphaomega.py index 5c8e58d3a5..239928f66d 100644 --- a/src/spikeinterface/extractors/neoextractors/alphaomega.py +++ b/src/spikeinterface/extractors/neoextractors/alphaomega.py @@ -50,6 +50,11 @@ def map_to_neo_kwargs(cls, folder_path, lsx_files=None): class AlphaOmegaEventExtractor(NeoBaseEventExtractor): """ Class for reading events from AlphaOmega MPX file format + + Parameters + ---------- + folder_path : str or Path-like + The folder path to the AlphaOmega events. """ mode = "folder" diff --git a/src/spikeinterface/extractors/neoextractors/biocam.py b/src/spikeinterface/extractors/neoextractors/biocam.py index 96d4dd25a6..9f23575dba 100644 --- a/src/spikeinterface/extractors/neoextractors/biocam.py +++ b/src/spikeinterface/extractors/neoextractors/biocam.py @@ -42,7 +42,6 @@ def __init__( electrode_width=None, stream_id=None, stream_name=None, - block_index=None, all_annotations=False, ): neo_kwargs = self.map_to_neo_kwargs(file_path) diff --git a/src/spikeinterface/extractors/neoextractors/blackrock.py b/src/spikeinterface/extractors/neoextractors/blackrock.py index 5e28c4a20d..ab3710e05e 100644 --- a/src/spikeinterface/extractors/neoextractors/blackrock.py +++ b/src/spikeinterface/extractors/neoextractors/blackrock.py @@ -26,6 +26,9 @@ class BlackrockRecordingExtractor(NeoBaseRecordingExtractor): If there are several streams, specify the stream name you want to load. all_annotations : bool, default: False Load exhaustively all annotations from neo. + use_names_as_ids : bool, default: False + If False, use default IDs inherited from Neo. If True, use channel names as IDs. + """ mode = "file" @@ -37,7 +40,6 @@ def __init__( file_path, stream_id=None, stream_name=None, - block_index=None, all_annotations=False, use_names_as_ids=False, ): diff --git a/src/spikeinterface/extractors/neoextractors/ced.py b/src/spikeinterface/extractors/neoextractors/ced.py index 401c927fc7..e2c79478fa 100644 --- a/src/spikeinterface/extractors/neoextractors/ced.py +++ b/src/spikeinterface/extractors/neoextractors/ced.py @@ -23,8 +23,6 @@ class CedRecordingExtractor(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. - block_index : int, default: None - If there are several blocks, specify the block index you want to load. all_annotations : bool, default: False Load exhaustively all annotations from neo. """ diff --git a/src/spikeinterface/extractors/neoextractors/intan.py b/src/spikeinterface/extractors/neoextractors/intan.py index c37ff47807..43439b80c9 100644 --- a/src/spikeinterface/extractors/neoextractors/intan.py +++ b/src/spikeinterface/extractors/neoextractors/intan.py @@ -27,6 +27,10 @@ class IntanRecordingExtractor(NeoBaseRecordingExtractor): If True, data that violates integrity assumptions will be loaded. At the moment the only integrity check we perform is that timestamps are continuous. Setting this to True will ignore this check and set the attribute `discontinuous_timestamps` to True in the underlying neo object. + use_names_as_ids : bool, default: False + If False, use default IDs inherited from Neo. If True, use channel names as IDs. + + """ mode = "file" diff --git a/src/spikeinterface/extractors/neoextractors/maxwell.py b/src/spikeinterface/extractors/neoextractors/maxwell.py index 3888b6d5a0..a66075b451 100644 --- a/src/spikeinterface/extractors/neoextractors/maxwell.py +++ b/src/spikeinterface/extractors/neoextractors/maxwell.py @@ -35,6 +35,8 @@ class MaxwellRecordingExtractor(NeoBaseRecordingExtractor): you want to extract. (rec_name='rec0000'). install_maxwell_plugin : bool, default: False If True, install the maxwell plugin for neo. + block_index : int, default: None + If there are several blocks (experiments), specify the block index you want to load """ mode = "file" diff --git a/src/spikeinterface/extractors/neoextractors/neuralynx.py b/src/spikeinterface/extractors/neoextractors/neuralynx.py index 25b6bb5b61..0670371ba9 100644 --- a/src/spikeinterface/extractors/neoextractors/neuralynx.py +++ b/src/spikeinterface/extractors/neoextractors/neuralynx.py @@ -26,16 +26,17 @@ class NeuralynxRecordingExtractor(NeoBaseRecordingExtractor): If there are several streams, specify the stream name you want to load. all_annotations : bool, default: False Load exhaustively all annotations from neo. - exlude_filename : list[str], default: None + exclude_filename : list[str], default: None List of filename to exclude from the loading. For example, use `exclude_filename=["events.nev"]` to skip loading the event file. strict_gap_mode : bool, default: False See neo documentation. Detect gaps using strict mode or not. - * strict_gap_mode = True then a gap is consider when timstamp difference between two - consecutive data packets is more than one sample interval. - * strict_gap_mode = False then a gap has an increased tolerance. Some new systems with different clocks need this option - otherwise, too many gaps are detected + * strict_gap_mode = True then a gap is consider when timstamp difference between + two consecutive data packets is more than one sample interval. + * strict_gap_mode = False then a gap has an increased tolerance. Some new systems + with different clocks need this option otherwise, too many gaps are detected + Note that here the default is False contrary to neo. """ diff --git a/src/spikeinterface/extractors/neoextractors/plexon2.py b/src/spikeinterface/extractors/neoextractors/plexon2.py index 941158def1..c7351a308b 100644 --- a/src/spikeinterface/extractors/neoextractors/plexon2.py +++ b/src/spikeinterface/extractors/neoextractors/plexon2.py @@ -19,7 +19,7 @@ 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: + use_names_as_ids : bool, default: True 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. diff --git a/src/spikeinterface/extractors/neoextractors/spikegadgets.py b/src/spikeinterface/extractors/neoextractors/spikegadgets.py index f326c49cd1..3d57817f88 100644 --- a/src/spikeinterface/extractors/neoextractors/spikegadgets.py +++ b/src/spikeinterface/extractors/neoextractors/spikegadgets.py @@ -32,7 +32,7 @@ class SpikeGadgetsRecordingExtractor(NeoBaseRecordingExtractor): NeoRawIOClass = "SpikeGadgetsRawIO" name = "spikegadgets" - def __init__(self, file_path, stream_id=None, stream_name=None, block_index=None, all_annotations=False): + def __init__(self, file_path, stream_id=None, stream_name=None, 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 diff --git a/src/spikeinterface/extractors/neoextractors/tdt.py b/src/spikeinterface/extractors/neoextractors/tdt.py index 146f6a4b4c..27b456102f 100644 --- a/src/spikeinterface/extractors/neoextractors/tdt.py +++ b/src/spikeinterface/extractors/neoextractors/tdt.py @@ -23,6 +23,8 @@ class TdtRecordingExtractor(NeoBaseRecordingExtractor): If there are several streams, specify the stream name you want to load. all_annotations : bool, default: False Load exhaustively all annotations from neo. + block_index : int, default: None + If there are several blocks (experiments), specify the block index you want to load """ mode = "folder" diff --git a/src/spikeinterface/extractors/toy_example.py b/src/spikeinterface/extractors/toy_example.py index 450044d07b..55b787f3ed 100644 --- a/src/spikeinterface/extractors/toy_example.py +++ b/src/spikeinterface/extractors/toy_example.py @@ -57,12 +57,18 @@ def toy_example( Spike time in the recording spike_labels : np.array or list[nparray] or None, default: None Cluster label for each spike time (needs to specified both together). - # score_detection : int (between 0 and 1) - # Generate the sorting based on a subset of spikes compare with the trace generation firing_rate : float, default: 3.0 The firing rate for the units (in Hz) seed : int or None, default: None Seed for random initialization. + upsample_factor : None or int, default: None + An upsampling factor, used only when templates are not provided. + num_columns : int, default: 1 + Number of columns in probe. + average_peak_amplitude : float, default: -100 + Average peak amplitude of generated templates. + contact_spacing_um : float, default: 40.0 + Spacing between probe contacts in micrometers. Returns ------- diff --git a/src/spikeinterface/preprocessing/filter.py b/src/spikeinterface/preprocessing/filter.py index 6a1733c57c..93462ac5d8 100644 --- a/src/spikeinterface/preprocessing/filter.py +++ b/src/spikeinterface/preprocessing/filter.py @@ -10,15 +10,16 @@ _common_filter_docs = """**filter_kwargs : dict Certain keyword arguments for `scipy.signal` filters: - filter_order : order - The order of the filter - filter_mode : "sos" | "ba", default: "sos" - Filter form of the filter coefficients: - - second-order sections ("sos") - - numerator/denominator : ("ba") - ftype : str, default: "butter" - Filter type for `scipy.signal.iirfilter` e.g. "butter", "cheby1". - """ + filter_order : order + The order of the filter. Note as filtering is applied with scipy's + `filtfilt` functions (i.e. acausal, zero-phase) the effective + order will be double the `filter_order`. + filter_mode : "sos" | "ba", default: "sos" + Filter form of the filter coefficients: + - second-order sections ("sos") + - numerator/denominator : ("ba") + ftype : str, default: "butter" + Filter type for `scipy.signal.iirfilter` e.g. "butter", "cheby1".""" class FilterRecording(BasePreprocessor):