19–22 Sept 2022
Paul Scherer Institute, Villigen, Switzerland
Europe/Zurich timezone

Taking the pain out of generating complete and compliant NeXus files for dynamic setups

20 Sept 2022, 14:10
20m
WHGA/Auditorium and online (Paul Scherer Institute, Villigen, Switzerland)

WHGA/Auditorium and online

Paul Scherer Institute, Villigen, Switzerland

Paul Scherrer Institute Forschungsstrasse 111 CH-5232-Villigen-PSI
Oral NOBUGS 2022

Speaker

Kenan Muric (European Spallation Source)

Description

NeXus has a powerful and fairly complete structure to hold the geometry of the experiment.
The data reduction package Scipp (links: https://scipp.github.io/index.html and https://scipp.github.io/scippneutron/index.html) can process data automatically based on the embedded NeXus geometry, that allows scientists to view the histogrammed data in scientific coordinates. Generating an accurate NeXus hierarchy with all the required information is cumbersome, especially for experiments where the setup changes frequently. There are no software tools that provide meaningful support to verify that geometry nodes are correctly connected or that the naming convention is followed according to the NeXus standard.

These points are addressed by the NeXus constructor (link: https://github.com/ess-dmsc/nexus-constructor) developed and used at the European Spallation Source (ESS) for creating, editing and visualizing NeXus template files. These JSON template files are used by the data file writer to populate NeXus files with information from the data acquisition pipeline. The NeXus constructor also provides a visual confirmation in 3D that the geometry is correct. The interpretation of the instrument geometry in the NeXus constructor has been confirmed to agree with Scipp. That makes successful processing of every written NeXus file very likely at the first attempt and removes the need for a trial-and-error approach.

NeXus constructor is written in Python/Qt. It displays a NeXus tree structure and an instrument 3D view for online visualization of NeXus groups that represent physical components in an instrument. This makes it possible for users to verify the location of different parts of the instrument when adding translations and rotations to individual instrument components. Base geometry shapes are provided by the application for rendering. If the shape of an object has a complex structure, as is the case for many neutron detectors, it is possible to load arbitrary geometries in OFF format as supported by NeXus.
The application supports adding and naming data fields, which can be static or to be filled in from the data acquisition. The NeXus standard naming and data types are always suggested as default options, so making the file compliant is the easy route.

Email address of presenting author kenan.muric@ess.eu

Primary authors

Kenan Muric (European Spallation Source) Tobias Richter (European Spallation Source)

Presentation materials