SpikeSort icon indicating copy to clipboard operation
SpikeSort copied to clipboard

cluster labels should become dictionaries

Open btel opened this issue 13 years ago • 4 comments

btel avatar Feb 18 '12 01:02 btel

Can you give the location in the code where this needs to happen, and maybe a more specific description of what you want done?

cpcloud avatar Apr 19 '12 19:04 cpcloud

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.

btel avatar Apr 23 '12 17:04 btel

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

belevtsoff avatar Feb 05 '13 18:02 belevtsoff

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.

btel avatar Feb 05 '13 20:02 btel