APS USAXS/SAXS/WAXS facility

Ultra-Small-Angle X-ray Scattering Facility

pyIrena

Tools for analysis of small-angle scattering data

pyIrena is a collection of tools for processing and analyzing small-angle scattering data, including SAXS, SANS, USAXS, and USANS, as well as powder diffraction data such as XRD and WAXS. It is primarily used in materials science, chemistry, polymer science, metallurgy, and physics, where it supports the study of solid and liquid systems. The software is designed to handle complex structural problems, including systems with broad size distributions, hierarchical structure across multiple length scales, and the presence of diffraction or structure factors.

pyIrena is a Python package that runs on macOS, Windows, and Linux. It is a translation of the original Irena tools into Python, developed with the assistance of Anthropic’s Claude and validated against the current Irena. The package is currently in an active public beta stage (version 0.4.6 at the time of writing) and continues to evolve rapidly. pyIrena can be used through its standalone graphical interface, which also supports scripting, or via its Python and command-line APIs, making it suitable for integration into SAXS and SANS instrument data-analysis pipelines.

pyIrena tools and capabilities :

  • Unified fit
  • Modeling
  • Size distribution
  • Simple fits with System specific models
  • Powder diffraction peak fitting tool (WAXS)

Support tools

  • Data plotting
  • Data merge
  • Data manipulation tool
  • HDF5 Data Viewer/collector
  • Scattering contrast calculator (Anomalous X-ray & neutron)
  • Data export - export to csv, itx (Igor Pro exchange format), jpg and few others.
  • Create reports from tools results

Note: optimal input for pyIrena are NXcanSAS hdf5 files with calibrated 1D SAS data, but you can also use generic hdf5 file or ASCII (2-3 columns) with q, intensity and (optional) uncertainty.  
pyIrena is FILE BASED, results from tools are stored in the HDF5 NXcaSAS file (which will be created if needed). 
pyIrena graphs all have right-click export options into various formats (including Igor Pro itx format). 

pyIrena can be used through:

  • GUI for each tool
  • Scripting using Data Selector GUI
  • Python API to run from other packages
  • Command line API to run from other packages 

To install pyIrena

                     pip install pyirena[gui]

 

For details and change log, see the pyIrena Github repository