Generate example NeXus files in the proposed format for ESS from existing NeXus files and Mantid IDFs. Uses https://github.com/ess-dmsc/python-nexus-utilities
Tested with Python 3.7, >=3.6 should be fine. You can install dependencies with
pip install -r requirements.txt
To display the plots generated by DetectorPlotter
you may need to install tk libraries, on Ubuntu for example:
sudo apt install python3-tk
on CentOS (with EPEL installed):
sudo yum install python34-tkinter
Example scripts can be found in the examples
directory. Example scripts should be run from their own directory with the root directory of the repository in PYTHONPATH
(IDEs such as PyCharm do this by default).
-
SANS2D_example.py
example using a NeXus file and Mantid instrument definition from the SANS2D instrument. This outputs a new NeXus file in the proposed new format and contains examples of using the proposedNXsolid_geometry
group to describe pixel shape. -
WISH_example
geometry example using a Mantid IDF for the WISH instrument. This demonstrates conversion from a polar coordinates system and more complex geometry with many (10 panels x 152 tubes x 512 pixels) detector pixels. -
LOKI_example.py
geometry example using a Mantid IDF for the LOKI instrument. It contains an example of using anNXsolid_geometry
group to describe the shape of entire detector panels. -
SANS2D_NXlog_example.py
demonstrates how one can use thecue
datasets in the newNXevent_data
group or in the updatedNXlog
to extract data for a specific time period from the file. -
all/
contains all current IDFs from Mantid. Runningparse_all.py
will attempt to convert all of these to the NeXus format. This is intended to help discover where the parser currently fails. -
SMALLFAKE_example
creates a small (~35 kB) NeXus file for a fake instrument with a few tube detectors.
For documentation of nexusutils and the detector plotter and HDF5 size profiling tools see https://github.com/ess-dmsc/python-nexus-utilities