Parse ch 8000 opper tdc in the same way as the other logs#648
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.
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.
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.
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.
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.