-
Notifications
You must be signed in to change notification settings - Fork 67
nxdata stricter suggestion on when axisname indices can be omitted + clarify 3D or higher #1550
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,11 +75,12 @@ | |
|
|
||
| More complex cases are supported | ||
|
|
||
| * histogram data: ``x`` has one more value than ``data``. | ||
| * alternative axes: instead of a single ``x`` axis you can have several axes, one of which being the default. | ||
| * signals with more than one dimension: ``data`` could be 2D with axes ``x`` and ``y`` along each dimension. | ||
| * axes with more than one dimension: ``data`` could be 2D with axes ``x`` and ``y`` also being 2D, providing a | ||
| unique ``(x, y)`` coordinate for each ``data`` point. | ||
| * Histogram data. For example ``x`` has one more value than ``data``. | ||
| * Alternative axes. For example instead of a single ``x`` axis you can have several axes, one of which being the default. | ||
| * Signals with more than one dimension. For example ``data`` could be 2D with axes ``x`` and ``y`` along each dimension. | ||
| Equivalently 3- or higher-dimensional data is allowed. | ||
| * Axes with more than one dimension. For example ``data`` could be 2D with axes ``x`` and ``y`` also being 2D, providing a | ||
| unique ``(x, y)`` coordinate for each ``data`` point. Equivalently 3- or higher-dimensional axes are allowed. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addresses @rayosborn comment #1396 (review)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reference: the examples could give the impression NXdata only support 1D and 2D data. Solved by
|
||
|
|
||
| **Signals:** | ||
|
|
||
|
|
@@ -141,8 +142,8 @@ | |
| field name in the :ref:`axes </NXdata@axes-attribute>` attribute are used. | ||
|
|
||
| 4. When :ref:`AXISNAME_indices </NXdata@AXISNAME_indices-attribute>` is the same as the indices of "AXISNAME" in the | ||
| :ref:`axes </NXdata@axes-attribute>` attribute, there is no need to provide | ||
| :ref:`AXISNAME_indices </NXdata@AXISNAME_indices-attribute>`. | ||
| :ref:`axes </NXdata@axes-attribute>` attribute and :ref:`AXISNAME </NXdata/AXISNAME-field>` is one-dimensional, | ||
| the :ref:`AXISNAME_indices </NXdata@AXISNAME_indices-attribute>` attribute can be omitted. | ||
|
Comment on lines
+145
to
+146
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addresses @PeterC-DLS comment #1396 (comment)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reference: for higher dimensional axes the AXISNAME_indices attribute can never be omitted unambiguously by using the indices in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is a bit too strong as you could determine the indices ordering from the signal field shape if the pertinent dimensions are distinct: in the example,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure it can be omitted for nD if it can be derived "unambigously". But then to define what "unambigously" means in this context would be rather convoluted. For example it won't work when So your original suggestion to omit AXISNAME_indices only for 1D still makes sense imo. |
||
|
|
||
| 5. The indices of "AXISNAME" in the :ref:`axes </NXdata@axes-attribute>` attribute must be a subset of | ||
| :ref:`AXISNAME_indices </NXdata@AXISNAME_indices-attribute>`. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.