Skip to content

Commit 36ccbd4

Browse files
authored
Merge pull request #3245 from zm711/is-filtered
Add `is_filtered` to annotations in `binary.json`
2 parents 469187a + b76d5a7 commit 36ccbd4

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/spikeinterface/core/baserecording.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ def _save(self, format="binary", verbose: bool = False, **save_kwargs):
567567
channel_ids=self.get_channel_ids(),
568568
time_axis=0,
569569
file_offset=0,
570+
is_filtered=self.is_filtered(),
570571
gain_to_uV=self.get_channel_gains(),
571572
offset_to_uV=self.get_channel_offsets(),
572573
)

src/spikeinterface/core/binaryrecordingextractor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ def __init__(
6868
num_chan=None,
6969
):
7070
# This assigns num_channels if num_channels is not None, otherwise num_chan is assigned
71+
# num_chan needs to be be kept for backward compatibility but should not be used by the
72+
# end user
7173
num_channels = num_channels or num_chan
7274
assert num_channels is not None, "You must provide num_channels or num_chan"
7375
if num_chan is not None:
74-
warnings.warn("`num_chan` is to be deprecated in version 0.100, please use `num_channels` instead")
76+
warnings.warn("`num_chan` is to be deprecated as of version 0.100, please use `num_channels` instead")
7577

7678
if channel_ids is None:
7779
channel_ids = list(range(num_channels))

src/spikeinterface/core/tests/test_binaryrecordingextractor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def test_sequential_reading_of_small_traces(folder_with_binary_files):
9393
dtype = "float32"
9494

9595
file_paths = [folder / "traces_cached_seg0.raw"]
96+
# `num_chan` is kept for backward compatibility so including it at least one test
97+
# run is good to ensure that it is appropriately accepted as an argument
9698
recording = BinaryRecordingExtractor(
9799
num_chan=num_channels,
98100
file_paths=file_paths,

0 commit comments

Comments
 (0)