Coder Social home page Coder Social logo

generate-nexus-files's Introduction

Generate NeXus Files

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-base.txt
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

Examples

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 proposed NXsolid_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 an NXsolid_geometry group to describe the shape of entire detector panels.

  • SANS2D_NXlog_example.py demonstrates how one can use the cue datasets in the new NXevent_data group or in the updated NXlog to extract data for a specific time period from the file.

  • all/ contains all current IDFs from Mantid. Running parse_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.

Other tools

For documentation of nexusutils and the detector plotter and HDF5 size profiling tools see https://github.com/ess-dmsc/python-nexus-utilities

generate-nexus-files's People

Contributors

kmurica avatar danesss avatar mortenjc avatar matthew-d-jones avatar zjttoefs avatar ebadkamil avatar milanklausz avatar amues avatar rgbycp avatar celinedurniak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.