Validation#

Validation is the process of comparing an object with a standard. An important aspect of validation is the report of each aspect tested and whether or not it complies with the standard. This is a useful and necessary step when composing NeXus HDF5 data files or software that will read NeXus data files and when building NeXus Definition Language (NXDL) files.

In NeXus, three basic types of object can be validated:

  • HDF5 data files must comply with the specifications set forth in the applicable NeXus base classes, application definitions, and contributed definitions.

  • NeXus NXDL files must comply with the XML Schema files nxdl.xsd and nxdlTypes.xsd.

  • XML Schema files must comply with the rules defined by the WWW3 consortium. TODO: citation needed.

User interface: subcommand: validate#

validate a NeXus file

command line help

 1usage: punx validate [-h] [--report REPORT] infile
 2
 3positional arguments:
 4  infile           HDF5 or NXDL file name
 5
 6optional arguments:
 7  -h, --help            show this help message and exit
 8  -f FILE_SET_NAME, --file_set_name FILE_SET_NAME
 9                        NeXus NXDL file set (definitions) name for validation -- default=v2018.5
10  --report REPORT       select which validation findings to report, choices: COMMENT,ERROR,NOTE,OK,OPTIONAL,TODO,UNUSED,WARN (separate with comma if more than one, do not use white space)

The REPORT findings are as presented in the table above for each validation step.

Examples#

–tba–