Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spikeinterface_gui/backend_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ def set_external_curation(self, curation_data):

curation_view = self.views["curation"]
self.controller.set_curation_data(curation_data)
self.controller.current_curation_saved = True
curation_view.notify_manual_curation_updated()
self.controller.current_curation_saved = True
curation_view.refresh()

# we also need to refresh the unit list view to update the unit visibility according to the new curation
Expand Down
6 changes: 4 additions & 2 deletions spikeinterface_gui/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ def set_curation_data(self, curation_data):
new_curation_data["label_definitions"] = default_label_definitions.copy()

# validate the curation data
model = CurationModel(**new_curation_data)
model = Curation(**new_curation_data)
self.curation_data = model.model_dump()

def save_curation_in_analyzer(self):
Expand Down Expand Up @@ -1117,11 +1117,13 @@ def set_label_to_unit(self, unit_id, category, label):
if label is None:
self.remove_category_from_unit(unit_id, category)
return

label_types = self.curation_data['label_definitions'].keys()

ix = self.find_unit_in_manual_labels(unit_id)
if ix is not None:
lbl = self.curation_data["manual_labels"][ix]
if "labels" in lbl and category in lbl["labels"]:
if "labels" in lbl and category in label_types:
# v2 format
lbl["labels"][category] = [label]
elif category in lbl:
Expand Down
Loading