Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0 Curation does not throw away rejected units in the fetched sorting #1084

Open
shijiegu opened this issue Sep 2, 2024 · 1 comment
Open

Comments

@shijiegu
Copy link

shijiegu commented Sep 2, 2024

Describe the bug
v0 Curation does not throw away rejected units in the fetched sorting.

To Reproduce

import spyglass.spikesorting.v0 as sgs
key = {"nwb_file_name":'eliot20221022_.nwb',
       "waveform_params_name":"default_clusterless",
       "sorter":"mountainsort4",
       "sort_interval_name": '02_Seq2Session1',
       "sort_group_id": 0,
       "curation_id":1}

sorting = sgs.Curation.get_curated_sorting(key)

There will be 12 units in the sorting. However, 4 units are rejected in the label.

(sgs.Curation & key).fetch1("curation_labels")

Expected behavior
Rejected units are removed from the sorting.

@samuelbray32
Copy link
Collaborator

Spyglass spikesorting v0 does not make a spikeinterface spikesorting object for each curation. The information for the curated units can be accessed with (sgs.CuratedSpikeSorting() & key).fetch_nwb()[0]['units']. If you need something specific to the sorting object, see the code for Curation.save_sorting_nwb() for example of how to access and parse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants