Skip to content

Bug: manual labels of sorting analyzer are not reset in the Spikeinterface-GUI #223

@chiyu1203

Description

@chiyu1203

Dear Spikeinterface community,
I have been comparing the performance of several sorters and manually curating and labeling them on spikeinterface-gui .
My pipeline is created on jupyter notebook and involves saving the sorting analyser of different sorters into the disk and then load them one by one when doing the curation.
Here is the code.

sorter_list=["spykingcircus2","tridesclous2","mountainsort5","herdingspikes"]
this_sorter=sorter_list[3]
#oe_folder=r'Y:\GN25060\251130\coherence\session1\2025-11-30_14-25-01'
sorter_suffix = generate_sorter_suffix(this_sorter)
phy_folder_name = "phy" + sorter_suffix
analyser_folder_name = "analyser" + sorter_suffix + ".zarr"
sorting_folder_name = "sorting" + sorter_suffix
if analysis_methods.get("load_analyser_from_disc")==True:
    sorting_analyzer = si.load_sorting_analyzer(oe_folder / analyser_folder_name)
run_mainwindow(sorting_analyzer,curation=True)

Then I do the work on the GUI and click the buttons to save the labels (good, mua or noise) in the analyser and export them as a json file. While I switch to the next sorter, I close the GUI, which essentially finish executing that cell. Then I changed the index number of the sorter list to move on to the next sorter. With this pipeline, I noticed that labels made for previous sorters on the spikeinterface-gui would remain there (e.g. unit ID 10 is noise) for the next sorter. This is not a big issue but will leads to a bug when I did not remove those legacy labels but save/export them altogether with the new one. For example, Mountainsort5 identified only 29 units. However, because I first did manual curation on tridesclous2, which identified more than 80 units, and those labels seemed to carry over to the Mountainsort one. The resulting json file will have both information, attached file as an example.
manual_curation_1st.json

Is this a fixable bug? Should I move away from using this pipeline on jupyter notebook?
below is the software/hardware version.
spikeinterface 0.103.2
spikeinterface-gui 0.12.0
python 3.10.14
Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions