Appendix C. NeXus Utilities

Table of Contents

Utilities supplied with NeXus
Data Analysis
HDF Tools

There are many utilities available to read, browse, write, and use NeXus data files. Some are provided by the NeXus technical group while others are provided by the community. Still, other tools listed here can read or write one of the low-level file formats used by NeXus (HDF4, HDF5, or XML).

Utilities supplied with NeXus

Most of these utility programs are run from the command line. It will be noted if a program provides a graphical user interface (GUI). Short descriptions are provided here with links to further information, as available.

nxbrowse

NeXus Browser

nxconvert

Utility to convert a NeXus file into HDF4/HDF5/XML/...

nxdir

NXdir is a utility for querying a NeXus file about its contents. Full documentation can be found by running this command:

nxdir -h

nxingest

nxingest extracts the metadata from a NeXus file to create an XML file according to a mapping file.

The mapping file defines the structure (names and hierarchy) and content (from either the NeXus file, the mapping file or the current time) of the output file. See the man page for a description of the mapping file.

This tool uses the NAPI. Thus, any of the supported formats (HDF4, HDF5 and XML) can be read.

nxsummary

Use nxsummary to generate summary of a NeXus file.

This program relies heavily on a configuration file. Each item tag in the file describes a node to print from the NeXus file. The path attribute describes where in the NeXus file to get information from. The label attributes is what will be printed when showing the value of the specified field. The optional operation attribute provides for certain operations to be performed on the data before printing out the result.

See the source code documentation for more details.

nxtranslate

nxtranslate is an anything to NeXus converter. This is accomplished by using translation files and a plugin style of architecture where nxtranslate can read from new formats as plugins become available. The documentation for nxtranslate describes its usage by three types of individuals:

the person using existing translation files to create NeXus files
the person creating translation files
the person writing new Retrievers

All of these concepts are discussed in detail in the documentation provided with the source code.

nxvalidate

From the source code documentation: Utility to convert a NeXus file into HDF4/HDF5/XML/... Note: this command-line tool is different than the newer Java GUI program: NXvalidate.

nxvalidate

Java program (in development in 2010) to check any NeXus data file for conformance with the NeXus NXDL-based standard. Note: This Java GUI is different than the command-line tool: nxvalidate.

NXdump

NXdump is temporary wrapper script for .libs/NXdump in the NeXus code repository. From the source code documentation: The NXdump program cannot be directly executed until all the libtool libraries that it depends on are installed. This wrapper script should never be moved out of the build directory. If it is, it will not operate correctly.

NXplot

An extendable utility for plotting any NeXus file. NXplot is an Eclipse-based GUI project in Java to plot data in NeXus files. (The project was started at the first NeXus Code Camp in 2009.)