From ca6cbc97901019c6a188d1a64c4ca3378ad51b4e Mon Sep 17 00:00:00 2001 From: domna Date: Thu, 28 Mar 2024 08:07:43 +0100 Subject: [PATCH 1/5] Add depends for data field --- base_classes/NXdata.nxdl.xml | 17 +++++++++++++++++ base_classes/nyaml/NXdata.yaml | 15 +++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/base_classes/NXdata.nxdl.xml b/base_classes/NXdata.nxdl.xml index 408eb3a2e5..d03fa5ce7d 100644 --- a/base_classes/NXdata.nxdl.xml +++ b/base_classes/NXdata.nxdl.xml @@ -409,6 +409,23 @@ AXISNAME_indices documentation copied from datarules.rst + + + Points to the path of a field defining the data on which the `DATA` field depends. + + 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, ``@DATA_depends`` links + to that detectors data: + + @DATA_depends: '/entry/instrument/detector/data' for a 2D detector + + Standard deviations of data values - diff --git a/base_classes/nyaml/NXdata.yaml b/base_classes/nyaml/NXdata.yaml index 3bfbf1da82..a7e9198743 100644 --- a/base_classes/nyaml/NXdata.yaml +++ b/base_classes/nyaml/NXdata.yaml @@ -350,6 +350,21 @@ NXdata(NXobject): \@long_name: doc: | data label + \@DATA_depends(NX_CHAR): + doc: | + Points to the path of a field defining the data on which the `DATA` field depends. + + 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, ``@DATA_depends`` links + to that detectors data: + + @DATA_depends: '/entry/instrument/detector/data' for a 2D detector errors(NX_NUMBER): deprecated: Use ``DATA_errors`` instead (NIAC2018) doc: | From 8b419b335a976f17b287bb04fdf5ea8c533ec31a Mon Sep 17 00:00:00 2001 From: domna Date: Wed, 10 Apr 2024 09:08:35 +0200 Subject: [PATCH 2/5] Use `@reference` --- base_classes/NXdata.nxdl.xml | 99 +++++++++++++++++++--------------- base_classes/nyaml/NXdata.yaml | 87 ++++++++++++++++-------------- 2 files changed, 103 insertions(+), 83 deletions(-) diff --git a/base_classes/NXdata.nxdl.xml b/base_classes/NXdata.nxdl.xml index d03fa5ce7d..aaf7e2476b 100644 --- a/base_classes/NXdata.nxdl.xml +++ b/base_classes/NXdata.nxdl.xml @@ -235,6 +235,20 @@ without this attribute being set to "true".--> the axes attribute can be omitted. + + + 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 + +