Closed jusjusjus closed 4 years ago
From what you say, I think it's ok to associate Categories with epochs. I think this logic should be handled in class Epochs
. Also, we should see if the exact times match between the two xml times to make sure no stray file is affecting the analysis.
I think that could work. So maybe a Epochs.add_category_names()
which gets the category names if they are available. Is still think Reader.epochs
should return the epochs with the category names filled in automatically.
@ephathaway according to our conversation I refactored category association into class Epochs. If you consider merging this into your branch, please make sure that returning Epochs
instead of list[epochs]
doesn't cause any problems downstream. Please also consider adding some more documentation and testing, as well as code clean up if you like.
@jusjusjus the reason I included the association of category names within
Reader.epochs
is because I can't think of a situation where you wouldn't want the category names if they are available. From a user perspective, I think it makes more sense to be able to runReader.epochs
and have the category names for each epoch than to have to runReader.associate_categories_with_epochs()
first.Maybe a private function
Reader._associate_categories_with_epochs
that gets called when you doReader.epochs
?