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] [-l [LOGFILE]] [-i INTEREST]
 2                     infile
 3
 4positional arguments:
 5  infile                HDF5 or NXDL file name
 6
 7optional arguments:
 8  -h, --help            show this help message and exit
 9  --report REPORT       select which validation findings to report, choices:
10                        COMMENT,ERROR,NOTE,OK,TODO,UNUSED,WARN
11  -l [LOGFILE], --logfile [LOGFILE]
12                        log output to file (default: no log file)
13  -i INTEREST, --interest INTEREST
14                        logging interest level (1 - 50), default=1 (Level 1)

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

The logging INTEREST levels are for output from the program,

Examples

–tba–