Skip to content
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

silx.io.nxdata: Fixed parsing of NXcanSAS's @uncertainties #3657

Merged
merged 2 commits into from
Sep 5, 2022

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Sep 5, 2022

Regarding parsing of NXData, this PR:

  • fixes the parsing of axes @uncertainties where a fallback was loading signal's @uncertainties: This is removed since it's nowhere in the specification and in contradiction with NXcanSAS application definition.
  • adds support of NXcanSAS signal's @uncertainties. The implementation does not check whether it's inside a NXcanSAS application definition.

@t20100 t20100 added this to the 1.1.0 milestone Sep 5, 2022
@t20100 t20100 requested a review from kif September 5, 2022 09:47
@kif
Copy link
Member

kif commented Sep 5, 2022

Fixes the bug ...

@kif
Copy link
Member

kif commented Sep 5, 2022

LGTM

@kif kif merged commit 77c6893 into silx-kit:master Sep 5, 2022
@t20100 t20100 deleted the fix-nx-parser branch September 5, 2022 14:20
@woutdenolf
Copy link
Contributor

woutdenolf commented Sep 6, 2022

I vote against supporting this.

Required for generic NXdata plotting:

/entry/transmission_spectrum/T
/entry/transmission_spectrum/errors

Add NXcanSAS requirements (irrelevant for silx):

/entry/transmission_spectrum/Tdev -> ./errors
/entry/transmission_spectrum/T@uncertainties="errors"

Related issue: nexusformat/definitions#1185

@vasole
Copy link
Member

vasole commented Sep 6, 2022

Just in case, do not forget about the generic DATASET and DATASET_errors approach. This approach is becoming the preferred one in order not to rely on attributes (that are dangerous when using external links).

@woutdenolf
Copy link
Contributor

Indeed, I have a proposal to make that part of the standard: nexusformat/definitions#1047. We already handle this in silx and h5web.

@t20100
Copy link
Member Author

t20100 commented Sep 12, 2022

We can revert it if you want, up to you.

It would be best to have a single way to express uncertainties, but since @uncertainties is added as a fallback after DATASET_errors to me it is not a big deal to support it: it's not incompatible with NXdata and offers support for NXcanSAS.
BTW, it would be best to update NXcanSAS to be consistent with NXdata.

@woutdenolf
Copy link
Contributor

BTW, it would be best to update NXcanSAS to be consistent with NXdata.

nexusformat/definitions#1185

@woutdenolf
Copy link
Contributor

We can revert it if you want, up to you.

I personally would revert this as it sets a precedent for a direction we don't want to go in.

@t20100
Copy link
Member Author

t20100 commented Sep 12, 2022

OK, then I'll revert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants