cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
313 stars 157 forks source link

Sort by columns in ClusterView #1072

Open alex-attinger opened 3 years ago

alex-attinger commented 3 years ago

Hi, I recently updated to the latest version of phy2 to work with Kilosort2.5. I noticed a strange behavior in the ClusterView. In older versions, it was possible to sort the units by e.g. KilosortLabel (KSLabel). Presumably the sorting used cluster ID as a secondary sort, since KSLabel is not unique. Importantly, the sorting order would remain the same after labeling a cluster as 'good'. In the latest version, it is still possible to sort by KSLabel, however, the order appears to shuffle every time a cluster is labeled. I think the behavior is similar if sorted by other columns that do not contain unique values (e.g. channel number), where it would still sort the units by channel number, but the order of all units on a given channel appears to be shuffled after every action. Has anyone else observed this and is there a way to restore the old behavior?