Skip to main content

xrayutilities

Build Status

xrayutilities is a collection of scripts used to analyze and simulate x-ray diffraction data. It consists of a Python package and several routines coded in C. For analysis the package is especially useful for the reciprocal space conversion of diffraction data taken with linear and area detectors. For simulations code for X-ray reflectivity, kinematical and dynamical diffraction simulation of crystal truncation rods as well as fundamental parameters powder diffraction is included.

Copyright (C) 2009-2026 Dominik Kriegner dominik.kriegner@gmail.com

Copyright (C) 2009-2013 Eugen Wintersberger eugen.wintersberger@desy.de

Mailing list and issue tracker

To get in touch with us or report an issue please use the mailing list (https://sourceforge.net/p/xrayutilities/mailman/xrayutilities-users/) or the Github issue tracker (https://github.com/dkriegner/xrayutilities/issues). When you want to follow announcements of major changes or new releases its recommended to sign up for the mailing list

Contents

  • doc: documentation source files
  • examples: directory with example scripts and configurations
  • lib/xrayutilities: directory with the sources for the Python package
  • src: directory with the C extension for improved performance
  • tests: directory with the unittest scripts
  • pyproject.toml, meson*: packaging configuration and build files

Installation

xrayutilities can be installed in several ways depending on your operating system and preference.

Installation (pip)

Using the python package manager pip you can install xrayutilities by executing

pip install xrayutilities

Note that on recent Linux distributions pip install outside of a virtual environment might fail with an externally-managed-environment error. In this case, it is recommended to use a virtual environment or one of the other installation methods below.

Installation (Conda)

xrayutilities is available via the conda-forge channel:

conda install -c conda-forge xrayutilities

Installation (Linux system packages)

On Debian-based distributions (Debian, Ubuntu, Mint, ...) xrayutilities is available as a system package:

sudo apt install python3-xrayutilities

Installation (source)

Installing xrayutilities from source is an easy process done by executing

pip install .

By default the installation procedure enables OpenMP support (recommended). It fails if no OpenMP support is available. It can be disabled by using the the following custom meson option for the installation:

pip install . --config-settings=setup-args="-Duse_openmp=disabled"

To allow to proceed with the installation without OpenMP but use it if available use:

pip install . --config-settings=setup-args="-Duse_openmp=auto"

Requirements

The following requirements are needed for installing and using xrayutilities:

  • Python (>= 3.10)
  • h5py
  • scipy (version >= 0.18.0)
  • numpy (version >= 2.1.0)
  • lmfit (>= 1.0.1)
  • odrpack
  • matplotlib (optional, version >= 3.1.0)
  • mayavi (optional, only used optionally in Crystal.show_unitcell)

When building from source you also might need:

  • C-compiler (with OpenMP support)
  • Python dev headers
  • meson-python
  • pytest (optional - only if you want to run the test environment)
  • sphinx (optional - only when you want to build the documentation)
  • numpydoc (optional - only when you want to build the documentation)
  • latex (optional - only when you want to build the PDF documentation)
  • sphinx_rtd_theme (optional - only when you want to build the documentation)
  • sphinx-pyproject (optional - only when you want to build the documentation)
  • svglib (optional - only when you want to build the pdf documentation)

refer to your operating system documentation to find out how to install those packages. On Microsoft Windows refer to the Documentation for the easiest way of the installation (Anaconda, Python(x,y), or WinPython).

Supported Python versions

The table below summarizes the Python versions supported by recent xrayutilities release intervals. For exact packaging details of older releases, refer to the corresponding release tag.

xrayutilities version Python support Notes
current development >= 3.10 Current development and tests target Python 3.10 and newer. NumPy >= 2.1.0 is required.
1.7.8 - 1.7.x >= 3.7 NumPy 2 support was added for PyPI wheels in 1.7.8.
1.7.0 - 1.7.7 >= 3.6 Python 3.6 became required in 1.7.0 due to f-strings.
1.6.x Python 3 only Python 2 code paths were removed in 1.6.0.
<= 1.5.4 Python 2.7 and Python 3 1.5.4 was the final Python 2 compatible release.

The Python package configuration

The following steps should only be necessary when using non-default installation locations to ensure the Python module is found by the Python interpreter. In this case the module is installed under /lib[64]/python?.?/site-packages on Unix systems and /Lib/site-packages on Windows systems.

If you have installed the Python package in a directory unknown to your Python distribution, you have to tell Python where to look for the Package. There are several ways how to do this:

  • add the directory where the package is installed to your PYTHONPATH environment variable.

  • add the path to sys.path in the .pythonrc file placed in your home directory

    import sys
    sys.path.append("path to the xrayutilities package")
    
  • simply apply the previous method in every script where you want to use the xrayutilities package before importing the package

    import sys
    sys.path.append("path to the xrayutilities package")
    import xrayutilities
    

Obtaining the source code

The sources are hosted on sourceforge in git repository. Use

git clone https://github.com/dkriegner/xrayutilities.git

to clone the git repository. If you would like to have commit rights contact one of the administrators.

Update

If you installed xrayutilities via pip, you can update it by:

pip install -U xrayutilities

If you installed via conda:

conda update xrayutilities

If you installed via apt:

sudo apt update
sudo apt install python3-xrayutilities

If you installed from source, you can update it by navigating into its source folder and obtain the new sources by ::

git pull

or download the new tarball from sourceforge (https://sf.net/projects/xrayutilities) if any code changed during the update you need to reinstall the Python package. Thats easiest achieved by

pip install .

In case you are not certain about the installation location it can be determined by

python -c "import xrayutilities as xu; print(xu.__file__)"
  /usr/local/lib64/python3.10/site-packages/xrayutilities/__init__.py

if the output is e.g.: /usr/local/lib64/python3.10/site-packages/xrayutilities/init.py you previously installed xrayutilities in /usr/local, which should be used again as install path. Use ::

pip install --prefix=<path to install directory> .

to install the updated package.

Documentation

Documentation for xrayutilities is found on the webpage https://xrayutilities.sourceforge.io

The API-documentation can also be browsed by

pydoc -p PORT

in any web-browser, after the installation is finished.

Download files

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

Source Distribution

xrayutilities-1.8.0.tar.gz (9.1 MB view details)

Uploaded Source

Built Distributions

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

xrayutilities-1.8.0-cp314-cp314-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.14Windows x86-64

xrayutilities-1.8.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

xrayutilities-1.8.0-cp314-cp314-macosx_11_0_arm64.whl (8.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

xrayutilities-1.8.0-cp314-cp314-macosx_10_15_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

xrayutilities-1.8.0-cp313-cp313-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.13Windows x86-64

xrayutilities-1.8.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

xrayutilities-1.8.0-cp313-cp313-macosx_11_0_arm64.whl (8.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

xrayutilities-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

xrayutilities-1.8.0-cp312-cp312-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.12Windows x86-64

xrayutilities-1.8.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

xrayutilities-1.8.0-cp312-cp312-macosx_11_0_arm64.whl (8.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

xrayutilities-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

xrayutilities-1.8.0-cp311-cp311-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.11Windows x86-64

xrayutilities-1.8.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

xrayutilities-1.8.0-cp311-cp311-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

xrayutilities-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

xrayutilities-1.8.0-cp310-cp310-win_amd64.whl (8.5 MB view details)

Uploaded CPython 3.10Windows x86-64

xrayutilities-1.8.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

xrayutilities-1.8.0-cp310-cp310-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

xrayutilities-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file xrayutilities-1.8.0.tar.gz.

File metadata

  • Download URL: xrayutilities-1.8.0.tar.gz
  • Upload date:
  • Size: 9.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for xrayutilities-1.8.0.tar.gz
Algorithm Hash digest
SHA256 4840d3d746ef7655317eb44d57ec4e99e9792c6ab2b87397ba276e6ea8a9dc18
MD5 c142f5b942cc6cf818cb5dcce99f2881
BLAKE2b-256 2877db5b3f3cb7b22014f0c6107ea80849582e6df46f2e5e671d6738ae978c28

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3f8317e8e0471fc6cfc1dcf36b712f564cfa0e5f72f167d90b296f788d7f5477
MD5 969bf665721bb129c03d920ceb280a2b
BLAKE2b-256 cd4a8d25e20cf6a97826ff8812019c1663fab15829a00bea785aca5b703c8c18

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a48420f107d68e03f14809737ba15ea997bc99d7588462b60a3c4c6ef017e98c
MD5 cfe91c7cfa324941489ca9371851d573
BLAKE2b-256 d54bb2aec81019975f90167b704b0244c875a97b0165cc0d45e3edab57b3a62d

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3938cfbdb6be0f1daa1714fe23c524ec7fb338df06a5b2bd5be315cb51ada1c7
MD5 ce5f111753ab42af69f29f9467595b4d
BLAKE2b-256 62629fb771e95f38608943020d5bf4fc17158121728eb6b0837c2c1990353f5c

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c7afcda368bc0db7278dc6558790a25eb4cd2a0698659099866d15bb53989b37
MD5 903271d29181427d56fcf3a94f7598be
BLAKE2b-256 b61d0c1fc40142f8e611b77ef32e4a08049f1deae5f5071b628ac7925fe54906

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 401befab47e48ea6b786ee02c880da60b7fd81545c21d59f0b2f9cab5dd6cf5a
MD5 4b4f8cc1608958ca8705f313177677fb
BLAKE2b-256 d4a4ae37224e5bfcd39c5f355ad9faace000808944a440a193d2339b3c4abbb4

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2f9d68d9a33caeb235f8b4dd267a003e74fde40e8db26f6f3e59296fc1d11466
MD5 57fe55d794ee4ee33c8b65b747901789
BLAKE2b-256 cff165c0cc10f35d10425ad3305f01e83fd7d69188cb603f3b3a3ce88dffc4a6

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 35dc320c1727d9f6739f62c05ae79b3077cb04deb9cdd1d2c84a22da63057544
MD5 80addf77669fcabf0f58ac633afc3460
BLAKE2b-256 3b6455a59c39b340dce191d64ba2662e95e6fd2041b3621ee86d36a65269e1cd

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 171bfedb59c22e30d70f0a3da4b5ed3a89a9792f387ce76c9878de59b5fd35e6
MD5 2e24599ae2bbebf895a38aeae7e93c37
BLAKE2b-256 4bb0e820a0513a5d3f41c310d85f776941e3cccbb629351a4c128bbf73a459dc

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1a9f53079f165988d76889c9e1ec7d17dbeeb7309dc1017cb9dd4337408b8b1a
MD5 8b13be6da51018c45515fa473200a6dc
BLAKE2b-256 7bd965f5391925f03c887630d517af654ac89e321b1d63afcb7f50d6dbbc56fd

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e4c602ef15dea0f0837891baaa4baa503b67b982a59986f3689a4f2b1f70b7dd
MD5 ee4a290c581f412d603be812c9380c02
BLAKE2b-256 d8c2f60a6b67505e53907bb657678169780d2f7e43e7fa9eba8e47926318c7d3

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db687f6694b7baac9d7b695036ff0ac7808cd79f568052d93ae6be43c0624dcb
MD5 0bf1ffab686e02ee4a734f9266e3da69
BLAKE2b-256 35edbdbcccfbbcee572094d3407632a726891b5aac7d46790cdabd583e409615

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0cd4fb00d26efa8c2d19ab5318488789dfec859cc4edff3a65fc03a5c0a3fa63
MD5 b944a684b2956a25ba14d26d70e30c54
BLAKE2b-256 68e961863d91ae0a2e55403375d3fc52aae1aad3bfd9cba7f526f0dffdf61d54

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 314ebe801deadbe6c0adc37200660c588aad25088ce6fe57242d0ad7c1bcec22
MD5 96f6133eb491b04563ac95a61833227b
BLAKE2b-256 d74698a2ca0be4fa7de28399c52b21f74a48ff79682f0c41aa2f561b4b6abce8

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 758d3f3ea6c70a6c86f8a4f179eb5e956f28a1e20d425a72fd477cc374fa605b
MD5 5c733b886772863a0384fc9a67d42e7b
BLAKE2b-256 b2fe0e936326f8c811130644e636d1aadd2e39fb2ba74cb202303d7c8f861c05

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 600925299b663bb745b70adcf9f786534fcdddc9aaf73be9a2de6d7a5f9acc3c
MD5 5a7c16aaaeb0fe9878a3eca59915cea3
BLAKE2b-256 36579d411699e90174c9d1899c1e64b2a51f69f8af4828b3de2535d3b5ab4ba4

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2272abcfd4387c6060dd6a99d2dca0083deb9db41f7a4e85f2ef07cb4cfc3321
MD5 1caeba74e3a528356987f8ee42f0f585
BLAKE2b-256 2998ea3d164c57c1b8937b41e1ea1c523a408d959351e708f0a2252272b69da9

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ab82f1d9d82d1c059296cf966a033d608248f13e18f80c6c8e2a92187ba89326
MD5 81f8ff323d7ef2957eb9b703d7759256
BLAKE2b-256 1a344bbe003a86d763baf9c9df8314555e7eab15a89e23726b19a9950a7bdfb8

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 354e7a1e216a1e220a8a2b741d13a6d29c9152dd3130d7825167715097e1a464
MD5 7d66538391c5d6dc193fafd937735e75
BLAKE2b-256 2a658204a3f481bbb2af8f6a4c7ebf98dab09f25aa7ce44b1cc489472c98e794

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1aab5ca4daeec83f0f37d3581f955ae0c17b01443dee030293efb1162107104f
MD5 1b0608b01b398342d8ccdc7b99cecbb3
BLAKE2b-256 4d5ea5f05b4ac1a087dfa8e007513a368fbe8c22fea5d56bacbe7dcfd02e9406

See more details on using hashes here.

File details

Details for the file xrayutilities-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b9771153f775c6e1615395720f34ba18aa7ff8277f924b9b08973827b422a300
MD5 f0ff037f48ec379444df232884979bb2
BLAKE2b-256 94671f59a7ea65dd2bde3d5954d053327854c3e9d0de6787349a62b00fc5f538

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page