A Python GUI to analyze NeXus data
Project description
Introduction
NeXpy provides a high-level python interface to HDF5 files, particularly those stored as NeXus data, within a simple GUI. It is designed to provide an intuitive interactive toolbox allowing users both to access existing NeXus files and to create new NeXus-conforming data structures without expert knowledge of the file format.
See the NeXpy documentation for more details.
Installing and Running
Released versions of NeXpy can be installed using either
$ pip install nexpy
or::
$ conda install -c conda-forge nexpy
The source code can be downloaded from the NeXpy Git repository:
$ git clone https://github.com/nexpy/nexpy.git
Prerequisites
Python Command-Line API
NeXpy provides a GUI interface to the nexusformat API, which uses h5py to read and write HDF5 files that implement the NeXus data format standard. It does not use the NeXus C API, which means that the current version cannot read and write legacy HDF4 or XML NeXus files. One of the NeXus conversion utilities should be used to convert such files to HDF5.
If you only intend to utilize the Python API from the command-line, the only other required libraries are NumPy and SciPy. Autocompletion of group and field paths within an open file is available if IPython is installed.
NeXpy GUI
The GUI is built using PyQt. The qtpy package is used to import whatever PyQt library is installed, whether PyQt5, PyQt6, PySide2, or PySide6.
The GUI embeds an IPython shell and Matplotlib plotting pane, within a Qt GUI based on the Jupyter QtConsole with an in-process kernel.
Least-squares fitting of 1D data uses the LMFIT package.
Additional Packages
Importers may require additional libraries to read the imported files in their native format, e.g., spec2nexus for reading SPEC files or FabIO for reading TIFF and CBF images.
A 2D smoothing option is available in the list of interpolations in the signal
tab if astropy is installed. It is labelled
'convolve' and provides, by default, a 2-pixel Gaussian smoothing of the data.
The number of pixels can be changed in the shell by setting plotview.smooth
.
The following packages are recommended.
- TIFF/CBF file imports: fabio
- SPEC file imports: spec2nexus
- Gaussian smoothing: astropy
To run with the GUI
To run from the installed location, add the $prefix/bin directory to your path if you installed outside the python installation, and then run:
$ nexpy [-r]
The -r
option restores all files loaded in the previous session.
User Support
Consult the NeXpy documentation for details of both the Python command-line API and how to use the NeXpy GUI. If you have any general questions concerning the use of NeXpy, please address them to the NeXus Mailing List. If you discover any bugs, please submit a Github issue, preferably with relevant tracebacks.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nexpy-1.0.10.tar.gz
.
File metadata
- Download URL: nexpy-1.0.10.tar.gz
- Upload date:
- Size: 5.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4964a4107d7de3ce7def1ef38ce2d0a3c64217bfb339bd810bc7abbb4e62fb9c |
|
MD5 | 4fe04c2762e295e0224d41acd06d425f |
|
BLAKE2b-256 | c0993f31aafd97d77bfc0959c06ffab41f0b1f77ad399937418168e0b6509c04 |
File details
Details for the file NeXpy-1.0.10-py3-none-any.whl
.
File metadata
- Download URL: NeXpy-1.0.10-py3-none-any.whl
- Upload date:
- Size: 719.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bfad3cc084db312f103eef2cfd6fade9c26198841192aa2c4aedfbf0aea4fd6 |
|
MD5 | 3d8098dd3bdbbecf66827b9833168172 |
|
BLAKE2b-256 | 6e23b6b73ab225dfbde705ff438222563d7ca0a9825f67e4c11ed725a7036903 |