pyNexafs#

pyNexafs is a comprehensive toolkit for NEXAFS[1] (or XANES[2]) data, and is built to the feature-rich standards of xraysoftmat, so you can trust ongoing stability and developement.

pypi zenodo Documentation Coverage Status pre-commit.ci status

PyTest Linting Documentation

Python SemVer Code style: black Ruff Code doc: numpydoc

Motivation#

pyNexafs was designed to solve backwards-compatibility issues between (inevitably changing or upgraded) Synchrotron beamline configurations, and allow reproducable analysis (reduction, normalisation and fitting) of NEXAFS data. This is done by separating file parsing and NEXAFS (scan) handling.

Todo List#

This repository is in a Beta development state. The following list maps the required features to be implemented before a full released.

  • ☑ Implement base classes for parsing and NEXAFS

  • ☑ Implement core normalisation wrappers

  • ☑ Implement support for Australian Synchrotron NEXAFS beamlines

  • ☑ Fix parser classes to be more flexible (multi-dimensional data) but allow/encourage overriding of to_scan method.

  • ☐ Ensure parser load method records the successful method signature.

  • ☐ Comprehensive mapping structure for NEXAFS data types (including accessors for a single scan, i.e. scan.drain, scan.flour or scan.PFY…)

  • ☐ Comprehensive readthedocs documentation.

  • ☐ Comprehensive (>90%) unit testing for core API and modules.

  • ☐ Functioning PyQt6 GUI

  • ☐ Unit testing for PyQt6 GUI

  • ☐ Generic NEXAFS file loader (two column)

This repository does not support EXAFS [3], which has a very similar measurement philosophy yet very distinct physics.

Footnotes

pyNexafs Features#

Feature

Description

Reduction

Pre-edge removal (nearby edge, elastic peak, etc.)
Normalization
Background subtraction

Fitting

Global dataset peak fitting

Compatibility

Please raise an issue with an example file / relevant information for unsupported formats.

Visualization

PyQt6 GUI for fast data processing

Typing

Enumerated NEXAFS detection sources.
Type hints for all functions and classes.