Skip to content

Commit

Permalink
Update src/spyglass/spikesorting/v1/figurl_curation.py
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Brozdowski <[email protected]>
  • Loading branch information
khl02007 and CBroz1 authored Dec 8, 2023
1 parent 80ef44d commit 634d149
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/spyglass/spikesorting/v1/figurl_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,15 @@ def make(self, key: dict):

@classmethod
def get_labels(cls, curation_json):
curation_dict = kcl.load_json(curation_json)
if "labelsByUnit" in curation_dict:
return {
labels_by_unit = kcl.load_json(curation_json).get("labelsByUnit")
return (
{
int(unit_id): curation_label_list
for unit_id, curation_label_list in curation_dict[
"labelsByUnit"
].items()
for unit_id, curation_label_list in labels_by_unit.items()
}
else:
return {}
if labels_by_unit
else {}
)

@classmethod
def get_merge_groups(cls, curation_json):
Expand Down

0 comments on commit 634d149

Please sign in to comment.