Loop through segments in test
import numpy as np
-def check_recordings_equal(RX1, RX2, segment_idx=0, return_scaled=True, force_dtype=None, check_times=True):
+def check_recordings_equal(RX1, RX2, return_scaled=True, force_dtype=None):
+ assert RX1.get_num_segments() == RX2.get_num_segments()
+
+ for segment_idx in range(RX1.get_num_segments()):
N = RX1.get_num_frames(segment_idx)
# get_channel_ids
assert np.allclose(RX1.get_channel_ids(), RX2.get_channel_ids())
@@ -44,7 +47,10 @@ def check_recordings_equal(RX1, RX2, segment_idx=0, return_scaled=True, force_dt
# else:
# assert RX1.get_channel_property(ch, prop) == RX2.get_channel_property(ch, prop)
-def check_sortings_equal(SX1, SX2, segment_idx=0):
+def check_sortings_equal(SX1, SX2):
+ assert SX1.get_num_segments() == SX2.get_num_segments()
+
+ for segment_idx in range(SX1.get_num_segments()):
# get_unit_ids
ids1 = np.sort(np.array(SX1.get_unit_ids()))
ids2 = np.sort(np.array(SX2.get_unit_ids()))
