-
Notifications
You must be signed in to change notification settings - Fork 9
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
data.split (and other methods?) do not pass parent's attrs to children #1058
Comments
This is certainly not critical... I'm not even sure it should be the case that attrs are blindly applied to e.g. split et al... It's a one liner to apply them when they should be applied:
|
Most use cases I am familiar with would benefit from attrs copying through to the split objects - This issue came up in discussion because we have a need to tie some constant acquisition parameters to data objects (sample thickness, sample number, PMT voltage, heater temperature, etc.). I think this will come up increasingly often if the 'info' section of acquisitions becomes more used. Storing these parameters as variables causes split to fail. Storing in Data.attrs was @darienmorrow 's proposed solution, but it sounds like users will have to be careful to track their attrs through processing. |
I think this is not true? Perhaps this an issue of not broadcasting these parameters to the dimensionality of the data object? In any case, it seems like we need a more concrete vision of what attrs should be to move forward with this. If attrs is about storing conditions of the experiment, it's more likely than not that a split/chopped dataset will retain have those conditions. Should we implement a "kind" property for attrs members (e.g. could be "persistent" or "unique") so they can guide the attr inheritance process? Note that this could raise issues for |
Could add a keyword to split that assigns the attrs of the initial object to all created objects in the resulting split list, where the default of this argument is false (to remain consistent with previous implementation). I still believe general use benefits from this argument being true. |
Note, this issue originated in a slack conversation with @DLafayetteII
The text was updated successfully, but these errors were encountered: