Skip to content

Commit cb2b478

Browse files
authored
Merge branch 'master' into remove-cli
2 parents 65b7bf0 + 7839fb6 commit cb2b478

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
of `DLCPoseEstimation` #1208
2323
- Spikesorting
2424
- Fix compatibility bug between v1 pipeline and `SortedSpikesGroup` unit
25-
filtering #1238
25+
filtering #1238, #1249
2626
- Speedup `get_sorting` on `CurationV1` #1246
2727
- Behavior
2828
- Implement pipeline for keypoint-moseq extraction of behavior syllables #1056

src/spyglass/spikesorting/analysis/v1/group.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,12 @@ def fetch_spike_data(
189189
]
190190

191191
# filter the spike times based on the labels if present
192-
for attr in ("curation_label", "label"): # v1, v0. if both, use v0
193-
group_labels = getattr(nwb_file[nwb_field_name], attr, None)
192+
for col in ("label", "curation_label"): # v0, v1 names
193+
if col in nwb_file[nwb_field_name].columns:
194+
group_labels = nwb_file[nwb_field_name][col]
195+
break
196+
else:
197+
group_labels = None
194198
if group_labels is not None:
195199
group_label_list = group_labels.to_list()
196200
include_unit = SortedSpikesGroup.filter_units(

0 commit comments

Comments
 (0)