-
Notifications
You must be signed in to change notification settings - Fork 261
[MRG] Array Annotations (improved) #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] Array Annotations (improved) #606
Conversation
This includes: - New class DataObject, of which all data objects (BaseSignal, SpikeTrain, Event, Epoch) are subclasses - That contains duplicate functionality of all data objects - Instance attribute array_annotations - Check for consistency of array_annotations - Regular annotations are processed as before, so array annotations need to be specified using the parameter array_annotations upon instance creation
(obj.array_annotate)
that is now in class DataObject
added array_annotations to relevant places in the structure of neo. Merging will still need to be done, because it is more complicated.
situations It's important to note, that a lot has to be done decentralized. For other annotations array_finalize can just copy them over, but for array annotations only certain parts (or even nothing) can be copied at certain times.
AnalogSignal/IrregularlySampledSignal: Every trace has one for each annotation Event/Epoch/SpikeTrain: Every timestamp has one for each annotation and they are kept accordingly Annotations that exist only for one of the two objects are ignored
investigation. Changed test_spiketrain to its original state
…into arr_anns/test3 Also changed test for hasattr in array_finalize to if attr is None: ...
to check if hasattr(self, 'array_annoations'), else it does not work
…into arr_anns/test3 Also fixed PEP8 issues in Epoch
…into arr_anns/test3 Careful! Might have broken event.py! times= is not passed to __init__ any more from functions and methods?
…into arr_anns/test3
…into arr_anns/test3
…into arr_anns/test3
…into arr_anns/test3
duplicate_with_new_data
duplicate_with_new_data
…into arr_anns/no_dict_no_zero
…into arr_anns/test3_test
A few lines of code were not changed correctly, causing empty array annotations to fail. This is fixed now.
…into arr_anns/test3
…hon-neo into bjoern_arrayanno
Only the first element need to be checked if converting to numpy array first. Cathing the case where the dtypes are so different that the result dtype is object. After this only the first element of the array needs to be checked for correctness, because the others share the same dtype. This increases performance.
…hon-neo into bjoern_arrayanno
Hello @JuliaSprenger! Thanks for updating the PR.
Comment last updated on November 23, 2018 at 18:17 Hours UTC |
Avoid hard coding of warning settings Travis testing Travis testing Travis testing Test travis Travis testing Travis test Travis test Travis test Travis test Travis test Clean up travis testing
84ce353
to
ef6ad71
Compare
This PR includes all commits of #472 by @bjoern1001001 and some additional small changes from my side to improve the documentation, tests and current merge conflicts occurring in #472 and is a reviewed version of #472.
I suggest, that either #472 includes my suggestions by accepting muellerbjoern#2 or this PR here merged directly.