nubs01 / blechpy

Python package for extraction, spike clustering and processing of Intan recorded neural data for Katz Lab
MIT License
11 stars 5 forks source link

_change_root() does not change self.rec_labels #7

Closed danielsvedberg closed 4 years ago

danielsvedberg commented 4 years ago

https://github.com/nubs01/blechpy/blob/c053e394ac4c266880928512060f527937e3ff89/blechpy/datastructures/experiment.py#L72

I ran exp.sort_spikes() after changing root and got the error

'experiment' object has no attribute 'rec_labels_values'

sort_spikes() pulls rec_labels_values from self.rec_labels, which is records the directory name when you instantiate an experiment object, but it's not altered when you run _change_root(). I believe adding a snippet that changes self.rec_labels when you run _change_root() should fix this issue.

nubs01 commented 4 years ago

Fixed