Skip to content

Conversation

JuliaSprenger
Copy link
Member

@JuliaSprenger JuliaSprenger commented Nov 23, 2018

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.

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
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?
muellerbjoern and others added 16 commits October 2, 2018 16:40
A few lines of code were not changed correctly, causing empty array
annotations to fail. This is fixed now.
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.
@pep8speaks
Copy link

pep8speaks commented Nov 23, 2018

Hello @JuliaSprenger! Thanks for updating the PR.

Line 279:17: W503 line break before binary operator
Line 280:17: W503 line break before binary operator
Line 281:17: W503 line break before binary operator
Line 287:17: W503 line break before binary operator
Line 288:17: W503 line break before binary operator

Line 297:13: E722 do not use bare 'except'
Line 356:13: E722 do not use bare 'except'
Line 580:32: W504 line break after binary operator
Line 904:23: W504 line break after binary operator

Line 286:25: E126 continuation line over-indented for hanging indent
Line 287:25: E126 continuation line over-indented for hanging indent

Line 154:17: W503 line break before binary operator
Line 155:17: W503 line break before binary operator

Line 11:1: E402 module level import not at top of file
Line 12:1: E402 module level import not at top of file
Line 13:1: E402 module level import not at top of file
Line 14:1: E402 module level import not at top of file
Line 15:1: E402 module level import not at top of file
Line 17:1: E402 module level import not at top of file
Line 26:1: E402 module level import not at top of file
Line 27:1: E402 module level import not at top of file
Line 28:1: E402 module level import not at top of file
Line 29:1: E402 module level import not at top of file
Line 31:1: E402 module level import not at top of file
Line 353:59: E241 multiple spaces after ','

Line 110:74: E231 missing whitespace after ','
Line 234:25: E126 continuation line over-indented for hanging indent
Line 238:25: E126 continuation line over-indented for hanging indent
Line 312:90: E226 missing whitespace around arithmetic operator
Line 768:17: W503 line break before binary operator
Line 769:17: W503 line break before binary operator
Line 770:17: W503 line break before binary operator

Line 409:21: W504 line break after binary operator

Line 445:34: E231 missing whitespace after ','

Comment last updated on November 23, 2018 at 18:17 Hours UTC

@coveralls
Copy link

coveralls commented Nov 23, 2018

Coverage Status

Coverage increased (+1.6%) to 49.642% when pulling ef6ad71 on JuliaSprenger:bjoern_arrayanno into 36ca4d0 on NeuralEnsemble:master.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants