You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/how-tos/pynxtools/validate-nexus-files-other-tools.md
+2-77Lines changed: 2 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,86 +38,11 @@ In case you are interested in testing these tools, we encourage you to follow th
38
38
??? info "A note on operating systems"
39
39
Note that installation on Windows can be tricky because cmake can sometimes not find the libxml2 library. Though, if you solve this, this may work on Windows. Therefore, we recommend to use Linux.
40
40
41
-
The tool `cnxvalidate` is written in C and has to be built from source (e.g., by using `cmake`).
42
-
43
-
#### Install `cmake`, `HDF5` & `xml2` libraries
44
-
45
-
Install all dependencies required to install `cnxvalidate` via `cmake`:
Now you have a folder called "definitions". The path to this definitions folder is used in the `-l` option of `cnxvalidate` to tell the program which NeXus definitions shall be used.
41
+
The tool `cnxvalidate` is written in C and has to be built from source (e.g., by using `cmake`). You can find instructions in the [README](https://github.com/nexusformat/cnxvalidate#building-nxvalidate) of the GitHub repository.
117
42
118
43
### Usage
119
44
120
-
After installation, you can invoke the help call from the command line:
45
+
After installation, you can invoke the help call for the executable (called `nxvalidate`) from the command line:
Copy file name to clipboardExpand all lines: docs/learn/nexus/nexus-rules.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,12 +56,14 @@ A python implementation of this process can be found in [this function](https://
56
56
57
57
Aside from these general rules, there are a number of special rules for NeXus names that need to be considered:
58
58
59
-
- There is a set of reserved words (like `BLUESKY_`, `DECTRIS_`, `IDF_`, etc.) that are reserved for certain projects and communities. These are prefixes (typically written as uppercase + underscore) that cannot be overwritten by namefitting. For the full list, see [Rules for Storing Data Items in NeXus Files](https://manual.nexusformat.org/datarules.html), section "Reserved prefixes".
59
+
- There is a set of prefixes (like `BLUESKY_`, `DECTRIS_`, `IDF_`, etc.) that are reserved for certain projects and communities. These prefixes (typically written as uppercase + underscorecannot be overwritten by namefitting.
60
60
61
-
- There is also a set of reserved suffixes that are used to give additional information for a group or field. For the full list, see [Rules for Storing Data Items in NeXus Files](https://manual.nexusformat.org/datarules.html), section "Reserved suffixes".
61
+
- There is also a set of reserved suffixes that are used to give additional information for a group or field. These can only be used if the original field is present as well. As an example, the field `temperature_set` - which uses the suffix `_set`, reserved for setpoint of field values - can only be present if the field `temperature` is present as well.
62
62
63
63
- Additionally to namefitting, data annotation can use further information. For example, in case of NXdata, the axes listed among the `@axes` shall fit to any instances of `AXISNAME` and data objects listed in `@signal` or `@auxiliary_signals` shall fit to instances of `DATA`. Such rules are typically given in the base classes (e.g., see [here](https://manual.nexusformat.org/classes/base_classes/NXdata.html#index-0) for NXdata). Any tool that makes use of the base classes should implement these special rules in its validation procedure. As an example, pynxtools has a special [function for handling NXdata](https://github.com/FAIRmat-NFDI/pynxtools/blob/474fe823112b8ee1e7b42ac80bb7408fdde22bd5/src/pynxtools/dataconverter/validation.py#L220).
64
64
65
+
For the full list of these respective rules, see [Rules for Storing Data Items in NeXus Files](https://manual.nexusformat.org/datarules.html).
66
+
65
67
## Concept name inheritance
66
68
67
69
Note that NeXus also supports inheritance of concepts. The same rules as for instance names on the data level apply here for the inherited concept names. That is, the name of a concept must match in concept name and `nameType` to inherit from another concept. As an example, if we define a field with name `userID` and `nameType="partial"` in a base class and then use this base class in an application definition, the concept `user` and `nameType="specified"` would inherit its property. Contrarily, the concept `my_user` would not inherit from `userID`.
Copy file name to clipboardExpand all lines: docs/learn/pynxtools/nexus-validation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@
4
4
5
5
Validation is a processing step during which the structure, concepts, and annotations of data in a file are checked for conformance with a specific version of the NeXus definitions. The processing yields a list of deviations between the actual formatting of individual data instances and their expected formatting. These deviations are typically categorized based on their severity. In effect, boolean or more nuanced conclusions can be drawn how closely the content of the file follows the definitions.
6
6
7
-
The validity of NeXus files is fundamental to ensure FAIR data. Without specific requirements, it is not possible to understand the data. What type of experiment? What Laser Wavelength? Which voltage? What data is represented in a table? What is the unit of a value? Which ISO norm does this refer to? Where was this measured? Which year was this measured?
7
+
The validity of NeXus files is fundamental to ensure FAIR data. Validation ensures that key contextual information - such as the type of experiment, laser wavelength, applied voltage, structure of tabular data, units of measurement, referenced standards, measurement location, and acquisition time - matches the expected definitions and formats.
8
8
9
-
The NeXus application definitions define the minimum set of terms/concepts that must be reported for a given experiment (i.e., the required terms that you must add to the NeXus file in order to be compliant with that application definition). Application definitions may also define terms that are optional in the NeXus data file. NeXus files are considered valid if they comply with the respective NeXus application definition.
9
+
The NeXus application definitions define the minimum set of terms/concepts that must be reported for a given experiment (i.e., the required terms that you must add to the NeXus file in order to be compliant with that application definition). Application definitions may also define terms that are optional in the NeXus data file. Entries in NeXus files (which are instances of the [`NXentry`](https://manual.nexusformat.org/classes/base_classes/NXentry.html) base class) should report which definition they implement (under [`NXentry/definition`](https://manual.nexusformat.org/classes/base_classes/NXentry.html#nxentry-definition-field)). These entries are considered valid if they comply with the respective NeXus application definit Such an entry is valid if all required concepts of the respective application definition are present and if all instance data within the entry adheres to the format and constraints defined in the application definition.
0 commit comments