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