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 [email protected]

Copyright (C) 2009-2013 Eugen Wintersberger [email protected]

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

  • examples: directory with example scripts and configurations
  • lib/xrayutilities: directory with the sources for the Python package
  • tests: directory with the unittest scripts
  • setup.py: setuptools install script used for the package installation

Installation (pip)

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

pip install xrayutilities

or for a user installation (without admin access) use

pip install --user xrayutilities

Installation (source)

Installing xrayutilities from source is an easy process done by executing

pip install .

in the source folder of xrayutilities on the command line/terminal. Directly calling setup.py by

python setup.py install

or

python setup.py install --prefix=<install_path>

is possible but you have to manually ensure that the dependencies are all installed! The first command installs xrayutilities in the systems default directories, whereas in the second command you can manually specify the installation path.

By default the installation procedure tries to enable OpenMP support (recommended). It is disabled silently if OpenMP is not available. It can also be disabled by using the --without-openmp option for the installation:

python setup.py build_ext --without-openmp install

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 (preferential with OpenMP support)
  • Python dev headers
  • setuptools
  • 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)
  • 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.10.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.10-cp313-cp313-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

xrayutilities-1.7.10-cp313-cp313-macosx_10_13_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

xrayutilities-1.7.10-cp312-cp312-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

xrayutilities-1.7.10-cp312-cp312-macosx_10_13_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

xrayutilities-1.7.10-cp311-cp311-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

xrayutilities-1.7.10-cp310-cp310-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

xrayutilities-1.7.10-cp39-cp39-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.9Windows x86-64

xrayutilities-1.7.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

xrayutilities-1.7.10-cp39-cp39-macosx_10_9_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for xrayutilities-1.7.10.tar.gz
Algorithm Hash digest
SHA256 252320f188a0b9e76ef2a09cfb3c7abb8b9e26378f746cc3a04e15ce5202e949
MD5 b63ec5940fbb579cde90960b9042acc7
BLAKE2b-256 5e673031dc489e46595ad4cec544509c80b62f390264a830e0e366666ecf4119

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c12977475ec7012613944dc9428db69a468ca963a23626a67014b5454e33375a
MD5 58f530f71a428f6ef34ce0b8fe5f97f8
BLAKE2b-256 758930bf8b133ba8589c9132c876a97b909d8f1090b9f0330f57fea6c62a852c

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d43e98e2e003d809b40bb5723cc511b682c23d9685ef30ac51e947892d2c248f
MD5 f4c5bb69c8ca8f8643a8837d4000f6d7
BLAKE2b-256 eb0404cd53f71322238b68dfbbad28515200b543bcdb45410928fedb49f8423d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 aea0a4cb4a0d23c3a3d8fbe40b4ca9804c32301fb5c9c8da158e21153ed74f24
MD5 32f43dfb1af964385b131eb8e4595e67
BLAKE2b-256 edcc3ae68e06ee589197ab38eb20244deb7d0675f042f1b0869dfd53348c59e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f12bbb35c18a8ec6da6820821701de4e77b189b5ef73137892efb4ec56335a27
MD5 405b56d9e086d4517d1bc0bdafae3cbb
BLAKE2b-256 291c91377bddda36862e88b44dfdcd4d3039a3bbf128cbe921d9ee3539f93170

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e26a44779928e96fa13d33925a401f32bf925a83cdbdb57ccb5908637239b60
MD5 57e51863728eaf892c9030bb4d7b98dd
BLAKE2b-256 ad2df3139d52248fca404b1d7cd51823148e40184de4240ab589035fb2572643

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a16ec3d4fef2fa4c6f44bffc83d7e41731942c966379fc02f243463534e08e8b
MD5 fb728ebc55a991739b7b8af5a98a145f
BLAKE2b-256 29eb8be76b7c7516b81b242336bf2d75aac69d68c572848d3c7a19eb6b9f6da3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 57a401ac429977aebf73ec7a621e84a1e55d18a433dc9ee080530e62f1a7a55d
MD5 2dc2b379305d215dfd12e0e524bfe9c1
BLAKE2b-256 c131941578ac01a51771417835ebb527fc811d2aa7d3efe236ee1d336114f7bf

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f7055a760ae5687ab506d9b1dfb29295159fa1f07706141e03af70337444ca76
MD5 ae6c5fface503fc4b821d88d83de8962
BLAKE2b-256 683c46dcca3504ea806cf8f2b10d1e1a71911ab61f7fa8448e7bcc904abe541b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 34150000272a17742768b01ffec59602c4fc56673ef27badd22e2f533c733b3f
MD5 69788d4811ccb023334151d057740c61
BLAKE2b-256 010c1a32972337d7e7ad2c30125d8c6f876a7a9f6075d1fda64e9715cc1507cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d00cb63d20f6352e282701a8c5969f6dfe1d9377917c6fbfb3be09921920eaca
MD5 7edd185d7ec292a96d8f88b9c6e99424
BLAKE2b-256 0d4424c0d65b23b41d80310677e867ada1f0b3d41b456c00151eb92ac32077bd

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a0ffea99d280108548c51de0291b2f6ceb4c2a8fd2f9e458bec85b3806ae4936
MD5 3fd503939ec6a55c8020193395c18814
BLAKE2b-256 68f4de06891dc5a9cc8442720679ab2bb41319063c6888a069f5d2ce4af0d2da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 784dc864c4e68ddbd0c486e59581f5f587733b14ac77106481f3ab080d971445
MD5 7867e1808eadc3a7948dc05e95084228
BLAKE2b-256 060f59288389b409126fadadbc51147115a238477311dbc4ec17babe520feac0

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.10-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5e926d13d10b26e461865364872c85deb5aef6bb536427dc83d1fbce06fedf6c
MD5 4a42d77ee80d74f6e9e9c4e463ffc8fe
BLAKE2b-256 ef6a4af43740f8ce3fd68584c2268235a6bd371759e57e5651d606e352f631cc

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15c3c92d090717dd1ff5538b4c91d04641d196601e340d3582891b79bde01873
MD5 54f4704be504868e51a716833fae491e
BLAKE2b-256 009a2556a7a50d6eee735d9d3dc43a3576e61b4674f3cf76dd6d6377a3524505

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.10-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 531e5fba85290805ce9e327230e50c165f566167c0ec56e731820848c590e145
MD5 f812fc8945bea9da28d490d82e3565e1
BLAKE2b-256 691cb569ddd0a8ff124f72f9459f5bf642c9acb15983cc35f5fd9c596001aaef

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