diff --git a/src/spikeinterface/core/baserecording.py b/src/spikeinterface/core/baserecording.py index 3e5e43b528..82f2ae1890 100644 --- a/src/spikeinterface/core/baserecording.py +++ b/src/spikeinterface/core/baserecording.py @@ -567,6 +567,7 @@ def _save(self, format="binary", verbose: bool = False, **save_kwargs): channel_ids=self.get_channel_ids(), time_axis=0, file_offset=0, + is_filtered=self.is_filtered(), gain_to_uV=self.get_channel_gains(), offset_to_uV=self.get_channel_offsets(), ) diff --git a/src/spikeinterface/core/binaryrecordingextractor.py b/src/spikeinterface/core/binaryrecordingextractor.py index a0e349728e..36de79d111 100644 --- a/src/spikeinterface/core/binaryrecordingextractor.py +++ b/src/spikeinterface/core/binaryrecordingextractor.py @@ -68,10 +68,12 @@ def __init__( num_chan=None, ): # This assigns num_channels if num_channels is not None, otherwise num_chan is assigned + # num_chan needs to be be kept for backward compatibility but should not be used by the + # end user num_channels = num_channels or num_chan assert num_channels is not None, "You must provide num_channels or num_chan" if num_chan is not None: - warnings.warn("`num_chan` is to be deprecated in version 0.100, please use `num_channels` instead") + warnings.warn("`num_chan` is to be deprecated as of version 0.100, please use `num_channels` instead") if channel_ids is None: channel_ids = list(range(num_channels)) diff --git a/src/spikeinterface/core/tests/test_binaryrecordingextractor.py b/src/spikeinterface/core/tests/test_binaryrecordingextractor.py index ea5edc6e6e..700910f9cd 100644 --- a/src/spikeinterface/core/tests/test_binaryrecordingextractor.py +++ b/src/spikeinterface/core/tests/test_binaryrecordingextractor.py @@ -93,6 +93,8 @@ def test_sequential_reading_of_small_traces(folder_with_binary_files): dtype = "float32" file_paths = [folder / "traces_cached_seg0.raw"] + # `num_chan` is kept for backward compatibility so including it at least one test + # run is good to ensure that it is appropriately accepted as an argument recording = BinaryRecordingExtractor( num_chan=num_channels, file_paths=file_paths,