-
Notifications
You must be signed in to change notification settings - Fork 4
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 NXlog with "sublogs" such as connection_status and alarm #138
Conversation
time-indexing, since the time coord of each time-series is different. We can | ||
support label-based indexing for this in the future. If additional time-series | ||
are contained within the NXlog then loading will return a DataGroup of the | ||
individual time-series (DataArrays). |
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.
If we had some form of flexible structured dtypes, could this data be merged into a single data array by binning? (e.g. with the main log's time coord)
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 don't think so. What do you have in mind?
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.
da['time', i]
contains the value of the main log in this bin as well as all values of sublogs that fall into this bin.
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.
Typically the main log has many more values than the sublogs (often by orders of magnitude), so I don't see how that would be useful/feasible?
for name in self._sublogs: | ||
for k in list(children): | ||
if k.startswith(name): | ||
field = children.pop(k) |
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.
This modifies the argument children
. Please make a copy first.
for name in self._sublogs: | ||
# Somewhat arbitrary definition of which fields is the "value" | ||
value_name = 'severity' if name == 'alarm' else None | ||
sublogs[name] = self._assemble_sublog(dg, name, value_name=value_name) |
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.
_assemble_sublog
also modifies an argument (dg
)
This is the way ESS tries to store additional values at distinct time-stamps. It is apparently being proposed for standardization in NeXus.
It is kind off a mess and not possible to handle nicely (see comments/docstrings), but apparently this cannot be changed, so we have to deal with it somehow.