2. Examples of writing and reading NeXus data files

Simple examples of reading and writing NeXus data files are provided in the NeXus Introduction chapter and also in the NAPI: NeXus Application Programmer Interface (frozen) chapter.

2.1. Code Examples in Various Languages

Each example in this section demonstrates writing and reading NeXus compliant files in various languages with different libraries. Most examples are using the HDF5 file format. Note however that other container formats like the legacy format HDF4 or XML can also be used to store NeXus compliant data.

Please be aware that not all examples are up to date with the latest format recommendations.

2.2. Visualization tools

Tools to visualize NeXus HDF5 files graphically or in text form.

2.3. Examples for Specific Instruments

Examples of working with data from specific instruments.

2.4. Other tools to handle NeXus data files

The number of tools that read NeXus data files, either for general use or to read a specific application definition, is growing. Many of these are open source and so also serve as code examples. In the section NeXus Utilities, we describe many applications and software packages that can read, write, browse, and use NeXus data files. Examples of code (mostly from the NeXus community) that read NeXus data are listed in section Language APIs for NeXus and HDF5.

The NIAC welcomes your continued contributions to this documentation.