Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions base_classes/NXdata.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Equally 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. Equally 3- or higher-dimensional axes are allowed.

**Signals:**

Expand Down Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addresses @PeterC-DLS comment #1396 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 @axes instead. For example @axes=["x", "x", "z"] could be @x_indices=[0,1] or @x_indices=[1,0].

Copy link
Contributor

Choose a reason for hiding this comment

The 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, signal[23,47,17] with x[47,23] is unambigously inferred to have @x_indices=[1,0].

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 signal[23,23,17].

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>`.
Expand Down