Skip to main content

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 into an existing environment using

    $ pip install nexpy

or

    $ conda install -c conda-forge nexpy

NeXpy will only run if a PyQt library (PyQt5, PyQt6, PySide2 or PySide6) is also installed. With pip (but not conda), a Qt binding can also be installed as an optional extra package

    $ pip install nexpy[qt]

The [qt] extra installs PyQt5 as the Qt binding. If you prefer a different binding, you can use [pyqt6], [pyside2], or [pyside6] instead.

NeXpy can be installed in an isolated environment using

    $ uv tool install nexpy[qt]

or

    $ pipx install nexpy[qt]

The source code can be downloaded from the NeXpy Git repository:

    $ git clone https://github.com/nexpy/nexpy.git

Once installed, NeXpy can be run from the command line:

    $ nexpy -h
    usage: nexpy [-h] [-v] [-r] [-f] [filenames ...]

    Launch NeXpy

    positional arguments:
      filenames             NeXus file(s) to open on launch (optional)

    options:
      -h, --help            show this help message and exit
      -v, --version         show program's version number and exit
      -r, --restore         open files from previous session
      -f, --faulthandler    enable faulthandler for system crashes

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 Qt. The qtpy package is used to import whatever Qt binding is installed. One of PyQt5, PyQt6, PySide2, or PySide6 must be installed separately (see installation instructions above).

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.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexpy-2.0.3.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexpy-2.0.3-py3-none-any.whl (631.2 kB view details)

Uploaded Python 3

File details

Details for the file nexpy-2.0.3.tar.gz.

File metadata

  • Download URL: nexpy-2.0.3.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for nexpy-2.0.3.tar.gz
Algorithm Hash digest
SHA256 58b98f999be0b07faa85e8665c4bb44eb620b8157c17ead5580f1df2bebedb8f
MD5 d70bf5c57287226bdfc932f0094b04fd
BLAKE2b-256 06cfd065fcea1b349052a23b3a1b6a7e060d97ef15d4eaff183269b496d87d50

See more details on using hashes here.

File details

Details for the file nexpy-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: nexpy-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 631.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for nexpy-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f652fba7fe06e4d8ecba4e67fb615982740b0f3be6f183d6816bf9c687d9cc5c
MD5 37bfcbe470f03365c5e80e290697288d
BLAKE2b-256 aeebfd84358c37b6279f886b9b6533cb0a3f2fccfe1e27577c2e0a7d7c7214f9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.14.8

2 files

0.14.7

2 files

0.14.6

2 files

0.14.5

2 files

0.14.4

2 files

0.14.3

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.7

2 files

0.12.6

2 files

0.12.5

2 files

0.12.4

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.12

1 file

0.10.11

1 file

0.10.10

1 file

0.10.9

1 file

0.10.8

1 file

0.10.7

1 file

0.10.6

1 file

0.10.5

1 file

0.10.4

1 file

0.10.3

1 file

0.10.2

1 file

0.10.1

1 file

0.10.0

1 file

0.9.3

1 file

0.9.2

1 file

0.9.1

1 file

0.9.0

1 file

0.8.1

1 file

0.8.0

1 file

0.7.2

1 file

0.7.1

1 file

0.7.0

1 file

0.6.5

1 file

0.6.4

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

1 file

0.5.4

1 file

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.5.0

1 file

0.4.7

1 file

0.4.6

1 file

0.4.5

1 file

0.4.4

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

0.3.0

1 file

0.2.1

1 file

0.2.0

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page