Skip to content

Commit

Permalink
NXdata linking of signal (#205)
Browse files Browse the repository at this point in the history
* Add depends for data field

* Use `@reference`

* use reference attribute in NXmpes and NXmpes_arpes

* change text style

* fix duplicated in reference attribute

---------

Co-authored-by: Lukas Pielsticker <50139597+lukaspie@users.noreply.github.com>
# Conflicts:
#	base_classes/nyaml/NXdata.yaml
#	contributed_definitions/NXdata_mpes.nxdl.xml
#	contributed_definitions/NXmpes.nxdl.xml
#	contributed_definitions/NXmpes_arpes.nxdl.xml
#	contributed_definitions/nyaml/NXdata_mpes.yaml
#	contributed_definitions/nyaml/NXmpes.yaml
#	contributed_definitions/nyaml/NXmpes_arpes.yaml
  • Loading branch information
domna authored and lukaspie committed Sep 24, 2024
1 parent 317531d commit d3a2126
Showing 1 changed file with 55 additions and 27 deletions.
82 changes: 55 additions & 27 deletions base_classes/NXdata.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ without this attribute being set to "true".-->
the axes attribute can be omitted.
</doc>
</attribute>
<attribute name="reference">
<doc>
Points to the path of a field defining the data to which the `DATA` group refers.

This concept allows to link the data to a respective field in the NeXus hierarchy, thereby
defining the physical quantity it represents.

Example:
If the data corresponds to a readout of a detector, ``@reference`` links
to that detectors data:

@reference: '/entry/instrument/detector/data' for a 2D detector
</doc>
</attribute>
<attribute name="AXISNAME_indices" type="NX_INT">
<!--
nxdl.xsd rules do not allow us to show this as a variable name
Expand Down Expand Up @@ -283,33 +297,6 @@ AXISNAME_indices documentation copied from datarules.rst
to avoid string parsing in reading applications.
</doc>
</attribute>
<attribute name="AXISNAME_depends">
<doc>
Points to the path of a field defining the axis on which the ``AXISNAME`` axis depends.

This concept allows to link an axis to a respective field in the NeXus hierarchy, thereby
defining the physical quantity it represents.

Here, *AXISNAME* is to be replaced by the name of each
field described in the ``axes`` attribute.

Examples:
If a calibration has been performed, ``@AXISNAME_depends`` links to the result of
that calibration:

@AXISNAME_depends: '/entry/process/calibration/calibrated_axis'

If the axis corresponds to a coordinate of a detector, ``@AXISNAME_depends`` links
to that detector axis:

@AXISNAME_depends: '/entry/instrument/detector/axis/some_axis' for a 2D detector

If the axis is a scanned motor, ``@AXISNAME_depends`` links to the transformation
describing the respective motion, e.g.:

@AXISNAME_depends: '/entry/instrument/detector/transformations/some_transformation' for a motion of the detector
</doc>
</attribute>
<field name="AXISNAME" type="NX_NUMBER" nameType="any">
<doc>
Dimension scale defining an axis of the data.
Expand Down Expand Up @@ -354,6 +341,30 @@ AXISNAME_indices documentation copied from datarules.rst
The ``axes`` *group* attribute is now preferred.
</doc>
</attribute>
<attribute name="reference">
<doc>
Points to the path of a field defining the axis to which the ``AXISNAME`` axis refers.

This concept allows to link an axis to a respective field in the NeXus hierarchy, thereby
defining the physical quantity it represents.

Examples:
If a calibration has been performed, ``@reference`` links to the result of
that calibration:

@reference: '/entry/process/calibration/calibrated_axis'

If the axis corresponds to a coordinate of a detector, ``@reference`` links
to that detector axis:

@reference: '/entry/instrument/detector/axis/some_axis' for a 2D detector

If the axis is a scanned motor, ``@reference`` links to the transformation
describing the respective motion, e.g.:

@reference: '/entry/instrument/detector/transformations/some_transformation' for a motion of the detector
</doc>
</attribute>
</field>
<field name="FIELDNAME_errors" type="NX_NUMBER" nameType="any">
<doc>
Expand Down Expand Up @@ -408,6 +419,23 @@ AXISNAME_indices documentation copied from datarules.rst
data label
</doc>
</attribute>
<attribute name="reference">
<doc>
Points to the path of a field defining the data to which the `DATA` field refers.

This concept allows to link the data to a respective field in the NeXus hierarchy, thereby
defining the physical quantity it represents.

Here, *DATA* is to be replaced by the name of each
data field.

Example:
If the data corresponds to a readout of a detector, ``@reference`` links
to that detectors data:

@reference: '/entry/instrument/detector/data' for a 2D detector
</doc>
</attribute>
</field>
<field name="errors" type="NX_NUMBER" deprecated="Use ``DATA_errors`` instead (NIAC2018)">
<doc>
Expand Down

0 comments on commit d3a2126

Please sign in to comment.