Skip to content

Commit 38ac9a0

Browse files
authored
Binary recording bacward-compatibility (#4357)
1 parent 2e3cbcc commit 38ac9a0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/spikeinterface/core/binaryrecordingextractor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,27 @@ def __init__(
5555
file_paths,
5656
sampling_frequency,
5757
dtype,
58-
num_channels: int,
58+
num_channels: int | None = None,
5959
t_starts=None,
6060
channel_ids=None,
6161
time_axis=0,
6262
file_offset=0,
6363
gain_to_uV=None,
6464
offset_to_uV=None,
6565
is_filtered=None,
66+
num_chan=None,
6667
):
6768

6869
if channel_ids is None:
6970
channel_ids = list(range(num_channels))
7071
else:
7172
assert len(channel_ids) == num_channels, "Provided recording channels have the wrong length"
7273

74+
# DO NOT DELETE! This is for backward compatibility
75+
if num_chan is not None:
76+
assert num_channels is None, "When both num_channels and num_chan are provided, num_channels is used"
77+
num_channels = num_chan
78+
7379
BaseRecording.__init__(self, sampling_frequency, channel_ids, dtype)
7480

7581
if isinstance(file_paths, list):

0 commit comments

Comments
 (0)