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-2024 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

  • 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.8.tar.gz (9.1 MB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

xrayutilities-1.7.8-cp312-cp312-macosx_10_9_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11 macOS 10.9+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for xrayutilities-1.7.8.tar.gz
Algorithm Hash digest
SHA256 63fd635b1113601e163c29005d0ee1409e4551556f495fcef0a413c241fd232f
MD5 04c343904c3858101b2a7ec48d398198
BLAKE2b-256 905f102333c2896598d468e8f58ec21ee3cb25963f4f27d79beb5d9cede8795c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 aabdb1dd95d1124fe8ccda2f6eb57cd6daecafcf2d3022aeec4c42887ba6507e
MD5 06613d613b145cec277e126e2888ff41
BLAKE2b-256 9f65adc62f79645038bf7488ae8e76ac95e28a0ac0a3b872acf81038f90ba2a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e80e1a6526fa32612f1edb0a730dc9365fb28e4d147b9adbc9335c6e61e0bef3
MD5 d5e1976a43b855badfba76f088119726
BLAKE2b-256 0d9507c2402cb6418173018044c1492be155e9f0e81f54bb14e7c113b411be55

See more details on using hashes here.

File details

Details for the file xrayutilities-1.7.8-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e8d1a8dfc137f0e219843032f15bd228b53d53f6d2e49d6c8368b192b56fb38d
MD5 16c672fe65d17d7028d8db205f9cb41d
BLAKE2b-256 3ac23b7e85f415cd9de877a06684fd2ad1fff74462d2cd9cec0d4d2955ef9e63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 04ac7f2507c5b758a07e4a3097614e548fce41bf2d24f4c3614c4d8331d43b45
MD5 adcab0e35e36b9578242e74a4dd87bde
BLAKE2b-256 49a3e202a93527572c95d45da85ea31417402456e4be270f5e405ca45e2f1f2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f81a8a1ee38a43f67096e8b56a0fff6d4091ecd72c5369c0628f6dd86ea2d88a
MD5 d65053dcf0606af0553d3a012af46309
BLAKE2b-256 24cb23e1ce9825bd172751ceee710d6c98c1370430d82e68f0c3825091df25ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fa4725ba8edf5f81d9cceba198be3329fe98885e9ddd4e31c31aab38444ae4b7
MD5 0a46ce0164173c544c5d3cbc9b69261b
BLAKE2b-256 d227054a6fb739648706dd5ed516bea1e37372e5932ebe419c3348a705d42706

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0df1cc689478ac8d0aa37a02cb65757b578849bf71e0d99ee114c4c7d93064c2
MD5 ad81edbf6d5a83e851ac031ceef5dfee
BLAKE2b-256 5c5a8bf687af77c8653bf078f9cb24e978a2b125909c336b0f3eda451825032d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 590e86885bc6b907ecbffae2a09d6bc82f176dbd2a31535851c7cca6519c5d64
MD5 bc056ee05e60d1c8821a392d9c587da1
BLAKE2b-256 7a4aa3e7ae607068e643cf380f632bd1396989388b87ac6b79a64cae9efb484f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9d339552c8616d20abfba474a5e9c050d12852faa1777c924a01a81ca587829d
MD5 f6942ee9cbc7538ecb6cfe0fa273049c
BLAKE2b-256 9d9e540600085131c6959fb43c0e87da4036bb05916dafdb4d52b9f0347f0d96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b38f07785123e6be2d4cd51d8a7b4f7f6bd65deb1b83bcb9714488f4c14e6721
MD5 5117d03a69301aad7d346642a60d2064
BLAKE2b-256 c206d41163e7f712bbb76b42982a2ec52e087e1dc4fa30f46473219abaa17beb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b89203c9de3ac670d55cd48de5f7ae8976821fa8c0d6fc3b1bef497ce1d87b5e
MD5 038900bd0445d9cba3a29b1b5c31ac22
BLAKE2b-256 efef660030f55f5db872b77099c25a8ba34690730001c4d30fc9bb569a98c5df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xrayutilities-1.7.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ffd2166683524f3127262e690f45fd8e2ec563458fcadbb30347911cb423a57d
MD5 56e92288d8b8ae0b67ad9b1c4a2f6db8
BLAKE2b-256 afc43cf965de0c5f6d2182ccfdd37711f98e23fc724c116d0cd4f75160bdd1ba

See more details on using hashes here.

Supported by

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