-
Notifications
You must be signed in to change notification settings - Fork 3
Parse chopper tdc in the same way as the other logs #648
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
Conversation
| if "value" in x: | ||
| # A NXlog | ||
| return x["value"].squeeze() | ||
| elif "time" in x: | ||
| # A NXlog without 'value' field | ||
| return x["time"].squeeze() | ||
| else: | ||
| return x |
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.
Not sure I understand, I thought ScippNexus gives use a DataArray or a Variable in the two respective cases?
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 tried loading chopper data just with scippnexus and the groups with "value" are just loaded as a DataGroup.
Were you saying they should be loaded as a DataArray?
Note that the "value" entry in the data groups are DataArrays, but the diskchopper wants the value to be extracted out of the data group, into a flat structure.
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.
Oh, that is because ECDC NeXus file contain THREE NXlog subentries (value, alarm, connection_status). But my question was about the nested value vs time - isn't time a sc.Variable? Is it ok to return that directly?
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.
Is it ok to return that directly?
I think so. We want a flat structure that contains Variables or DataArrays. Then, with the changes in https://github.com/scipp/scippneutron/pull/649/files#diff-74c09268bce58a60a5fdcc25750870436b6748f2a8922b25379117108454c7baR651 we can construct a chopper using from_nexus.
Choppers in ECDC NeXus files store TDC as a normal NXlog with a "value".
Scippneutron had assumed that it would be a log without a value, just a "time" entry.
We now deal with both cases, with and without value.