btel / SpikeSort

Spike sorting library implemented in Python/NumPy/PyTables
http://spike-sort.readthedocs.org
Other
27 stars 12 forks source link

ClusterAnalyzer.delete_cells() fails, if called before self.labels is requested #75

Closed belevtsoff closed 11 years ago

belevtsoff commented 11 years ago

This happens because the method delete_cells tries to write to self.cluster_labels attribute which is None at that time.

A workaround solution would be to substitute: self.cluster_labels[self.cluster_labels == cell_id] = self.trash_label with self.cluster_labels[self.labels == cell_id] = self.trash_label

But this problem occurs with other methods and possibly even in other components. @btel can you think of more generic solution? e.g. making labels property writable

btel commented 11 years ago

I remeber we discussed it already. Is it fixed?

belevtsoff commented 11 years ago

Well, I'm not sure. I'd say no, cuz the issue us still opened, but I'll check anyway...

belevtsoff commented 11 years ago

Ok, I'll stick with the suggested solution. It's not too bad cuz self.labels is meant to be read from, and self.cluster_labels is supposed to be written to