-
Notifications
You must be signed in to change notification settings - Fork 250
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
buffer description api in neorawio and xarray reference API bridge #1513
Conversation
Looks good! |
…_buffer_description_api=True This should also solve the memmap and memmory leak problem.
…_buffer_description_api=True This should also solve the memmap and memmory leak problem.
…-neo into json_api
…-neo into json_api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me.
Co-authored-by: Zach McKenzie <92116279+zm711@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a first reading. I think that this PR and the future documentation would benefit greatly if we have the schema of the buffer description somewhere. It does not have to be a formal schema (although that would be great) it could be just a description on the documentation or a python data class with types. Something that I can reference to see what should I expect to fill when I am doing a buffer like this.
For reading analog signals **neo.rawio** has 2 important concepts: | ||
|
||
1. The **signal_stream** : it is a group of channels that can be read together using :func:`get_analog_signal_chunk()`. | ||
This group of channels is guaranteed to have the same sampling rate, and the same duration per segment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have logical channels, this should be same units as well, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment not yet. The API do not enforce and ensure this.
See this https://github.com/NeuralEnsemble/python-neo/blob/master/neo/rawio/baserawio.py#L118
Ideally units should be add but some IO are mixing maybe the units in the same stream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add it as an ideal? Or would you rather first do the changes and then change it here?
I can close this for example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some tricky cases where the units is manually done by the user for some formats.
not sure but maybe spike2 is in that case.
What should we do ? split all groups of same units in separate streams ? this could be an good idea but we need first a deeper check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I think that the concept of stream should include same unit across the stream but this we will need to solve in a case by case basis (the deeper check that you mention).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple more comments from me too.
Merci beaucoup @zm711 and @h-mayorquin for the review |
@zm711 @h-mayorquin @alejoe91 |
yeah!! |
Given the idea of @bendichter and this gist
This is an implementation of "buffer_description_api" for reading analogsignal chunk.
This 100% backward compatible.
The idea/goal is:
See also kerchunk