Skip to content

Commit

Permalink
Fix timestamp extend
Browse files Browse the repository at this point in the history
  • Loading branch information
khl02007 committed Nov 28, 2023
1 parent f5a84a8 commit b66d0d0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/spyglass/spikesorting/v1/recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -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[
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b66d0d0

Please sign in to comment.