-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support a "labels" field in AxisInfo if present. #1
Conversation
… array shape along dimension with labels must also modify labels field.
* faster unit tests on core processing * accommodate size-0 arrays * slight optim. using template struct.
From @griffinmilsap here I didn't know about an lsl connector; this is really cool! When you're ready, let's add it into the README as another extension :D AxisArray is VERY inspired by XArray (my absolutely favorite data structure for offline analyses) that unfortunately has a little too much going on under the hood to be performant enough for low latency, high-message-rate stream processing. An earlier version of I feel like the general solution to this particular problem is adding a In summary, AxisArray needs some TLC for
Coming back to today and this PR: These operations on coords/labels probably eventually belong in AxisArray helper functions/implementation rather than spread throughout the signal processing modules. Collecting common operations on AxisArrays together in one place would make this whole thing a lot easier to maintain, but if this gets you where you're going today I support a merge after review (feel free to merge it in yourself once my review posts) |
Assert generators do not mutate inputs
(Migrating from ezmsg-org/ezmsg#123)
ezmsg-lsl has a SpaceAxis that I patch into AxisArray, and SpaceAxis has a labels field. This solves an issues that we discussed in ezmsg-org/ezmsg#43
Units that transform the AxisArray in a way that modifies the length of the dimension with the "labels" field, should probably also modify the labels, if present! This PR does that for Units that I'm aware of that modify the shape of the array along axes other than "time".
For affine_transform, it's difficult to know what the new labels should be so in most cases they are just dropped. However, if the affine_transform has rows or columns of zeros then we can get a good guess at thew new labels.