From b66d0d0504c4d4cc5e5d0a10a5ae57cbc5376573 Mon Sep 17 00:00:00 2001 From: Kyu Hyun Lee Date: Tue, 28 Nov 2023 14:35:35 -0800 Subject: [PATCH] Fix timestamp extend --- src/spyglass/spikesorting/v1/recording.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/spyglass/spikesorting/v1/recording.py b/src/spyglass/spikesorting/v1/recording.py index 23dfd8160..414d7d24d 100644 --- a/src/spyglass/spikesorting/v1/recording.py +++ b/src/spyglass/spikesorting/v1/recording.py @@ -94,7 +94,9 @@ def set_group_by_shank( sge_key["electrode_group_name"] = e_group # get the indices of all electrodes in this group / shank and set their sorting group for shank in shank_list: - sg_key["sort_group_name"] = sge_key["sort_group_name"] = sort_group + sg_key["sort_group_name"] = sge_key[ + "sort_group_name" + ] = sort_group # specify reference electrode. Use 'references' if passed, otherwise use reference from config if not references: shank_elect_ref = electrodes[ @@ -167,7 +169,9 @@ def set_group_by_shank( cls.insert1(sg_key, skip_duplicates=True) for elect in shank_elect: sge_key["electrode_id"] = elect - cls.SortGroupElectrode().insert1(sge_key, skip_duplicates=True) + cls.SortGroupElectrode().insert1( + sge_key, skip_duplicates=True + ) sort_group += 1 @@ -475,10 +479,8 @@ def _get_preprocessed_recording(self, key: dict): end_frame=interval_indices[1], ) recordings_list.append(recording_single) - timestamps.append( - all_timestamps[ - interval_indices[0] : interval_indices[1] - ] + timestamps.extend( + all_timestamps[interval_indices[0] : interval_indices[1]] ) recording = si.concatenate_recordings(recordings_list) else: