Skip to main content

Package for x-ray diffraction data evaluation

Project description

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-2025 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 (pip)

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

pip install 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.6)
  • h5py
  • scipy (version >= 0.18.0)
  • numpy (version >= 1.9, >2.0 since xrayutilities-1.7.8)
  • lmfit (>= 1.0.1)
  • 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)
  • rst2pdf (optional - only when you want to build the 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).

Python-2.7 and Python-3.X compatibility

The current development is for Python3 (version >=3.6) only. xrayutilities up to version 1.5.x can be used with Python-2.7 as well. Python 3.3 to 3.5 was supported up to 1.6.0.

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 already installed xrayutilities 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.6/site-packages/xrayutilities/__init__.pyc

if the output is e.g.: /usr/local/lib64/python3.6/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.

Project details


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.7.12.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.7.12-cp314-cp314-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.14Windows x86-64

xrayutilities-1.7.12-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.7.12-cp314-cp314-macosx_10_15_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

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

Uploaded CPython 3.13Windows x86-64

xrayutilities-1.7.12-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.7.12-cp313-cp313-macosx_10_13_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

xrayutilities-1.7.12-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.7.12-cp312-cp312-macosx_10_13_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

xrayutilities-1.7.12-cp311-cp311-win_amd64.whl (8.5 MB view details)

Uploaded CPython 3.11Windows x86-64

xrayutilities-1.7.12-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.7.12-cp311-cp311-macosx_10_9_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

xrayutilities-1.7.12-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.7.12-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.7.12.tar.gz.

File metadata

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

File hashes

Hashes for xrayutilities-1.7.12.tar.gz
Algorithm Hash digest
SHA256 d5da6262fedd92401226796ffed82c7696f0dfb9468e1bc1dab8bc4e4bd80d7e
MD5 1337a80632dd8c0bebb49b7c64cc5f6b
BLAKE2b-256 d2bb6a2cbc1b228cf6d396e1982eebcbf13ad35abebceface3e1258aaa68d0e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 9436565e095465c93c6198ebafb7741acad69682b762385bfffeb45ea7c8bf4b
MD5 235e92b78c971ff045b310e7a0af31c1
BLAKE2b-256 e92c406094ab6cb91be7273a3bc4a88490f37de6aeb692e41dd461c845e9a549

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0ad404d2b53e1d58a7c443e64d3c875d4acf7294248514072066a2a64a2735e1
MD5 e1ec56210aad9a9ab43c6ff8e1ac35be
BLAKE2b-256 d6ca167cd5a976b6634f4bfcb736b7a0664bb1017fb425b1d4867ce0a783f8de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b5161bb9ee228263d435fbdbcecea6a34572f24a269e47d5b00d1c2944cfab83
MD5 108fb856190937a4c5a40487abb34937
BLAKE2b-256 22006ea163a3c9d427abdc164324427034c4f45e9f3c7cdd5991fc1cb9d110ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c46982d736c2fa003f5aba208076c7d7d3d5d03c9ae669d81443dd38a6e93e8b
MD5 7383dbb0240a646c0503cdd478fb67ab
BLAKE2b-256 29603e8536674c3feb65582ff52ff06a389eebd70c4fd31655de93e614b2011e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ef63a18531c576e27dd19372093539de25e11a8551a94ef8aa9f55e948b1f8b8
MD5 91a098c3ff3680efed516d9c493f1c63
BLAKE2b-256 83a3a6d800e62dd73f770f5d5439cd399f99d5ad038c6c5dc46156391c358886

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6a7efb51a606e8ca6190e0ab7d892d9bf3e7fcd1a63182b97371f2713ffa4f3e
MD5 168c98b3e90505a5008fb158ad9d22ac
BLAKE2b-256 5ef732ffd44b1f6bcd0b17a89678c38577275c5e876df8dc4a02176d11a642b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 836fe8591ae6755b57d4b04f9b8c343cc51c2814fa46480748774af3d32aab94
MD5 aae351c22ef03b0fe35d4858636f9c04
BLAKE2b-256 d6a97fb78eb65d6693053656ee0fafbdc758014e9ebd1d3050cba126c9459f63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c5d26a1386a34c54c47ca62f25b2bf8ffe5876f92761e3b3cd33573b4fcb0dde
MD5 3194a8f284670405d75cb119edd1db2b
BLAKE2b-256 a518be0848c80658f2de1e377fcfc4f473685a94975be37882ecfb997a7cdba9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9efb966d3d230d85d828b409899f1ab9af4b3ed5ba922b7ccfca9b3d6a144dcd
MD5 806de3c04c891185b2b193594cabb79f
BLAKE2b-256 7b76dcdcd6fbb2b7106ba24bbe1be1ae51556cc7e3843f7f178cacb76688d7e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b503d32c8ab0886b3f1124c6246f82c4fa554f919e7ce7e4bc12cb4b808882c1
MD5 80e60dc55726b40fd5584a4f217c8431
BLAKE2b-256 6a9e034f3ea08ddf875e8e3fd4278d0f3aa7d3e30bba9ea29b50340b4068f349

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cde08ba7f5f3b2f9b0c728cf230b8af44e484de87ad8c03d1568cfce091fef66
MD5 adb0fa8d0cfc730826f221399b743d0a
BLAKE2b-256 d40f86e2a3d3995de5a6ce42faa5bda19bcdd65e6be4d6abb6001c638fe56663

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 61e79d7f0562c8ad30f31d5462f0f3060005fd498cb8666fcc7b5da4b94f64f7
MD5 8238ade18a952667b67723476db8aac1
BLAKE2b-256 8ad915bb508095a972e40a114b416344d12b896377c83617495e3275d0789d14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 22ec80949b42491341f87d20449e850e80b40e680f09df5b241004945e881ef7
MD5 e7c438c230c1137f5ff21b331fb395ff
BLAKE2b-256 d7d8e9c42ae5b1e64f6308dd79d6172638221d011590f25a56dd643e8543e8b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a07b9ee536914e830a730d1201a5eaf9f22be10682ad9612c5b71d422585caa7
MD5 72c52045893727eee837b422bb5a7fa3
BLAKE2b-256 6e44dfacc98c153a4810522f379d0753d47fa3261afbace6dfac01850fbb9626

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.12-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ad9830c26425835de86565ecfbf96db118dc8b85ceb1d2ddbd70cc2623c6dea2
MD5 40865a8e5271f23a935b475bf3854836
BLAKE2b-256 efdbecbfe97b8077e40287d6c6e51eddfa9c978e2fbd54e754e218c4d91ccb29

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