Skip to content

Commit 1fa4be3

Browse files
authored
Update channelsaggregationrecording.py
1 parent 90269de commit 1fa4be3

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/spikeinterface/core/channelsaggregationrecording.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ def __init__(self, recording_list_or_dict=None, renamed_channel_ids=None, record
105105
"Locations are not unique! " "Cannot aggregate recordings!"
106106
)
107107

108-
planar_contour_keys = [key for recording in recording_list for key in recording.get_annotation_keys() if 'planar_contour' in key]
109-
if len(planar_contour_keys)>0:
110-
if all(k == planar_contour_keys[0] for k in planar_contour_keys): # we add the 'planar_contour' annotations only if there is a unique one in the recording_list
111-
planar_contour_key = planar_contour_keys[0]
112-
collect_planar_contours = []
113-
for rec in recording_list:
114-
collect_planar_contours.append(rec.get_annotation(planar_contour_key))
115-
if all(np.array_equal(arr, collect_planar_contours[0]) for arr in collect_planar_contours):
108+
planar_contour_keys = [key for recording in recording_list for key in recording.get_annotation_keys() if 'planar_contour' in key]
109+
if len(planar_contour_keys)>0:
110+
if all(k == planar_contour_keys[0] for k in planar_contour_keys): # we add the 'planar_contour' annotations only if there is a unique one in the recording_list
111+
planar_contour_key = planar_contour_keys[0]
112+
collect_planar_contours = []
113+
for rec in recording_list:
114+
collect_planar_contours.append(rec.get_annotation(planar_contour_key))
115+
if all(np.array_equal(arr, collect_planar_contours[0]) for arr in collect_planar_contours):
116116
self.set_annotation(planar_contour_key, collect_planar_contours[0])
117117

118118
# finally add segments, we need a channel mapping

0 commit comments

Comments
 (0)