From 1e52303b245dc1b0848cc8bb783004cd1b0880fd Mon Sep 17 00:00:00 2001 From: "T. Haraszti" Date: Tue, 26 Nov 2024 11:03:07 +0100 Subject: [PATCH 1/2] Update NXscan.yaml I just added a slight clarification what we mean under the word scan. However, it makes me wonder whether this should be more a base class than an application definition. And whether the control parameter set should be only positional. So, I have some doubts here... --- applications/nyaml/NXscan.yaml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/applications/nyaml/NXscan.yaml b/applications/nyaml/NXscan.yaml index 38f6e0107c..d445b35daf 100644 --- a/applications/nyaml/NXscan.yaml +++ b/applications/nyaml/NXscan.yaml @@ -2,12 +2,15 @@ category: application doc: | Application definition for a generic scan instrument. - This definition is more an - example then a stringent definition as the content of a given NeXus scan file needs to - differ for different types of scans. This example definition shows a scan like done - on a rotation camera: the sample is rotated and a detector image, the rotation angle - and a monitor value is stored at each step in the scan. In the following, the symbol - ``NP`` is used to represent the number of scan points. These are the rules for + Repetitive measurements when varying a control parameter in a given range are called + scans. This application definition is designed as an envelop to describe such measurements + allowing for a generic definition of the scanned control parameter and the recorded data. + + This definition is more an example then a stringent definition as the content of a given + NeXus scan file needs to differ for different types of scans. This example definition + shows a scan like done on a rotation camera: the sample is rotated and a detector image, + the rotation angle and a monitor value is stored at each step in the scan. In the following, + the symbol ``NP`` is used to represent the number of scan points. These are the rules for storing scan data in NeXus files which are implemented in this example: * Each value varied throughout a scan is stored as an array of @@ -18,12 +21,12 @@ doc: | This to give an equivalent to the more familiar classical tabular representation of scans. These rules exist for a reason: HDF allows the first dimension of a data set to be - unlimited. This means the data can be appended too. Thus a NeXus file built according + unlimited. This means the data can be appended to. Thus a NeXus file built according to the rules given above can be used in the following way: * At the start of a scan, write all the static information. - * At each scan point, append new data from varied variables - and the detector to the file. + * At each scan point, append new data from varied variables and the detector to the file. + symbols: doc: | The symbol(s) listed here will be used below to coordinate datasets with the same shape. @@ -45,6 +48,8 @@ NXscan(NXobject): enumeration: [NXscan] (NXinstrument): (NXdetector): + # here we consider the raw data on the detector, which is always integer + # obtained by the A/D converter data(NX_INT): signal: 1 dimensions: From 5cfd6edc0ffce8f1c4f2435dc9922fee655aa7d5 Mon Sep 17 00:00:00 2001 From: Rubel Date: Wed, 27 Nov 2024 13:57:26 +0100 Subject: [PATCH 2/2] Generate nxdl file from NXscan.yaml. --- applications/NXscan.nxdl.xml | 182 ++++++++++++++++++----------------- 1 file changed, 95 insertions(+), 87 deletions(-) diff --git a/applications/NXscan.nxdl.xml b/applications/NXscan.nxdl.xml index 24bb157faf..45ce3aa8e6 100644 --- a/applications/NXscan.nxdl.xml +++ b/applications/NXscan.nxdl.xml @@ -1,10 +1,10 @@ - - + + - + - - The symbol(s) listed here will be used below to coordinate datasets with the same shape. - - - Number of points - - - xDim description - - - yDim description - + + The symbol(s) listed here will be used below to coordinate datasets + with the same shape. + + + + Number of points + + + + + xDim description + + + + + yDim description + + - - Application definition for a generic scan instrument. - - This definition is more an - example then a stringent definition as the content of a given NeXus scan file needs to - differ for different types of scans. This example definition shows a scan like done - on a rotation camera: the sample is rotated and a detector image, the rotation angle - and a monitor value is stored at each step in the scan. In the following, the symbol - ``NP`` is used to represent the number of scan points. These are the rules for - storing scan data in NeXus files which are implemented in this example: - - * Each value varied throughout a scan is stored as an array of - length ``NP`` at its respective location within the NeXus hierarchy. - * For area detectors, ``NP`` is the first dimension, - example for a detector of 256x256: ``data[NP,256,256]`` - * The NXdata group contains links to all variables varied in the scan and the data. - This to give an equivalent to the more familiar classical tabular representation of scans. - - These rules exist for a reason: HDF allows the first dimension of a data set to be - unlimited. This means the data can be appended too. Thus a NeXus file built according - to the rules given above can be used in the following way: - - * At the start of a scan, write all the static information. - * At each scan point, append new data from varied variables - and the detector to the file. - - - - - - - Official NeXus NXDL schema to which this file conforms - - - - - - - - - - - - + + Application definition for a generic scan instrument. + + Repetitive measurements when varying a control parameter in a given range are called + scans. This application definition is designed as an envelop to describe such measurements + allowing for a generic definition of the scanned control parameter and the recorded data. + + This definition is more an example then a stringent definition as the content of a given + NeXus scan file needs to differ for different types of scans. This example definition + shows a scan like done on a rotation camera: the sample is rotated and a detector image, + the rotation angle and a monitor value is stored at each step in the scan. In the following, + the symbol ``NP`` is used to represent the number of scan points. These are the rules for + storing scan data in NeXus files which are implemented in this example: + + * Each value varied throughout a scan is stored as an array of + length ``NP`` at its respective location within the NeXus hierarchy. + * For area detectors, ``NP`` is the first dimension, + example for a detector of 256x256: ``data[NP,256,256]`` + * The NXdata group contains links to all variables varied in the scan and the data. + This to give an equivalent to the more familiar classical tabular representation of scans. + + These rules exist for a reason: HDF allows the first dimension of a data set to be + unlimited. This means the data can be appended to. Thus a NeXus file built according + to the rules given above can be used in the following way: + + * At the start of a scan, write all the static information. + * At each scan point, append new data from varied variables and the detector to the file. + + + + + + + + Official NeXus NXDL schema to which this file conforms + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -