SpikeSort
SpikeSort copied to clipboard
cluster labels should become dictionaries
Can you give the location in the code where this needs to happen, and maybe a more specific description of what you want done?
Most datastructures in spike_sort such as spike waveforms, features, spike times are dictionaries with at least one key data
. In addition, some can also include extra keys such as is_valid
, which allows to mask some of the spikes. However, spike labels are pure numpy dictionaries making it hard to apply a mask and append new attributes.
All clustering functions in spike_sort.core.cluster
should return dictionaries. Plotting functions should accept the dictionaries in place of numpy arrays. Finally some commponents should be updated, such as ClusterAnalyser
.
Before we do that we should make sure to have an unit tests for each affected function.
Because this will require changing a lot of code (I just "grep"ed the tree: tests, plotting. extracting, and components of course), it will be better to do this in a separate branch and closer to the release date, after we fix the rest of the stuff
Because this will require changing a lot of code (I just "grep"ed the tree: tests, plotting. extracting, and components of course), it will be better to do this in a separate branch and closer to the release, after we fix the rest of the stuf
Actually, I don't see a point now in doing it now. The intention was to be able to add properties, and for consistency with other data structures (features, spikes etc. are all dictionaries). We might well, switch it to next release.