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

NXdata: errors on auxiliary signals #1044

Closed
woutdenolf opened this issue Apr 7, 2022 · 4 comments · Fixed by #1047
Closed

NXdata: errors on auxiliary signals #1044

woutdenolf opened this issue Apr 7, 2022 · 4 comments · Fixed by #1047
Assignees
Milestone

Comments

@woutdenolf
Copy link
Contributor

We have the VARIABLE_errors fields to specify the errors on all axes but we only have one errors field to specify the errors on the signal. I would propose DATA_errors to specify errors on all signals (auxiliary and default).

data:NXdata
   @axes=["x"]
   @signal="data1"
   @auxiliary_signals=["data2", "data3"]
   x: [1024]
   data1: [1024]
   data2: [1024]
   data3: [1024]
   x_errors: [1024]
   data1_errors: [1024]
   data2_errors: [1024]
   data3_errors: [1024]

data1_errors is errors in the current definition and data2_errors, data3_errors do not exist in the current definition.

@woutdenolf woutdenolf added this to the NXDL 2022.03 milestone Apr 26, 2022
@woutdenolf woutdenolf self-assigned this Apr 26, 2022
@woutdenolf
Copy link
Contributor Author

Looking very closely at the definition it seems that VARIABLE_errors can refer to any field

<field name="VARIABLE_errors" type="NX_NUMBER" nameType="any">

But we also have

<field name="VARIABLE" type="NX_NUMBER" nameType="any">

which is for axes only. So probably we should just rename VARIABLE_errors to FIELD_errors and in the comments say it applies to any field, whether it is an axis, signal or auxiliary signal.

@woutdenolf
Copy link
Contributor Author

woutdenolf commented Apr 26, 2022

Hmm it's more complicated. It says

"Errors" (actually *uncertainties*) associated with axis ``VARIABLE``. 

so VARIABLE_errors applies to axes only. But then you have this paragraph

This pattern of using ``VARIABLE_errors`` can be used ...
to associate uncertainties with a dataset named ``VARIABLE``.

So the _errors pattern might apply to auxiliary signals, depending on how you interpret this text.

<field name="VARIABLE_errors" type="NX_NUMBER" nameType="any">
<doc>
"Errors" (actually *uncertainties*) associated with axis ``VARIABLE``.
Client is responsible for defining the dimensions of the data.
The name of this field may be changed to fit the circumstances
but is matched with the *VARIABLE* field with ``_errors`` appended.
This pattern of using ``VARIABLE_errors`` can be used
throughout a NeXus data file to associate uncertainties
with a dataset named ``VARIABLE``. This pattern also
applies to other relationships such as ``VARIABLE_resolutions``
to connect additional data with a certain dataset.

@woutdenolf
Copy link
Contributor Author

woutdenolf commented Sep 14, 2022

To summarize: currently NXdata does not allow errors on auxiliary signals.

Proposal:

  • renaming the VARIABLE field to AXISNAME
  • updating the doc of VARIABLE_errors to say it applies to axes, signal or auxiliary signals: this is the actual change, although it is already somewhat support by NeXus as described here.
  • deprecate errors in favor of VARIABLE_errors for the signal field

@benajamin
Copy link
Contributor

benajamin commented Sep 14, 2022

NIAC agrees that this is just a documentation bug that should be fixed. Also the errors field was already decided to be deprecated in 2018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants