package for x-ray diffraction data evaluation
Project description
xrayutilities
[![Build Status](https://travis-ci.org/dkriegner/xrayutilities.svg?branch=master)](https://travis-ci.org/dkriegner/xrayutilities)
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-2017 Dominik Kriegner <dominik.kriegner@gmail.com>
Copyright (C) 2009-2013 Eugen Wintersberger <eugen.wintersberger@desy.de>
Contents
examples: directory with example scripts and configurations
xrayutilities: directory with the sources for the Python package
tests: directory with the unittest scripts
setup.py: distutils install script used for the package installation
xrayutilities.pdf: pdf-file with documentation of the package
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
If installation using aboves command fails due to missing OpenMP libraries, use
pip install –global-option=”–without-openmp” xrayutilities
Installation (source)
Installing xrayutilities from source is an easy process done by executing
python setup.py install
or
python setup.py install –prefix=<install_path>
in the source folder of xrayutilities on the command line/terminal. The first command installs in the systems default directories, whereas in the second command you can manually specify the installation path.
By default the setup.py script tries to use OpenMP. If you do not want to use OpenMP or do not have it available use the –without-openmp option for the installation:
python setup.py –without-openmp install –prefix=<install_path>
Requirements
The following requirements are needed for installing and using xrayutilities:
Python (version 2.7 or >= 3.2)
C-compiler (preferential with OpenMP support)
h5py
scipy (version >= 0.13.0)
numpy (version >= 1.8)
lmfit (optionally)
matplotlib (optionally)
unittest2 (optionally - only if you want to run the tests)
numpydoc (optionally - only when you want to build the 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 (Python(x,y) or WinPython).
Python-2.7 and Python-3.X compatibility
The current developement focuses on Python-3.X and we ask all users to update to Python-3 if possible, however, xrayutilies can be used with Python-2.7 as well. Care was taken to make this possible from the same code-base.
The Python package configuration
The following steps should only be necessary for user local installation to ensure the Python module is found by the Python interpreter: In this case the module is installed under <prefix>/lib[64]/python?.?/site-packages on Unix systems and <prefix>/Lib/site-packages on Windows systems.
If you have installed the Python package in a directory unknown to your local 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 git://git.code.sf.net/p/xrayutilities/code xrayutilities
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 (http://sf.net/projects/xrayutilities) if any code changed during the update you need to reinstall the Python package. To determine the path in which xrayutilities where installed previously use
- python -c “import xrayutilities as xu; print xu.__file__”
/usr/local/lib64/python2.7/site-packages/xrayutilities/__init__.pyc
if the output is e.g.: /usr/local/lib64/python2.7/site-packages/xrayutilities/__init__.py you previously installed xrayutilities in /usr/local, which should be used again as install path. Use
python setup.py install --prefix=<path to install directory>
to install the updated package.
Documentation
Documention for xrayutilities is found in the xrayutilities.pdf file or on the webpage http://xrayutilities.sourceforge.net
The API-documentation can also be browsed by
pydoc -p PORT
in any web-browser, after the installation is finished.
To build the PDF documentation from the docu-sources use:
python setup.py build build_doc -b pdf
You will need sphinx, numpydoc and rst2pdf.
Or generate a texinfo file using
python setup.py build_doc -b texinfo cd build/sphinx/texinfo; make
Packaging
create a tarball for redistribution of xrayutilities without the use of git
python setup.py sdist
creates a tarball in the directory dist, which contains everything needed for the installation of xrayutilities
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for xrayutilities-1.4.0.win-amd64-py3.6.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5315f6e67e4d9af12d4bee57b91526d740d257739bd8b7316b5f79379cdc677 |
|
MD5 | 70e7509b0133ec726bf7e33777061d3e |
|
BLAKE2b-256 | 5853a147493d39c88ce2b4de7e071b23f2b06b45abd5ec2a561bfc261642b32e |
Hashes for xrayutilities-1.4.0.win-amd64-py3.5.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 128530f2f5bd35af01cd66c9ebd51e7c24afb241129e1045346659032f980440 |
|
MD5 | a9a3ca484bbdf0e67674faeb93e18eec |
|
BLAKE2b-256 | 8eea6cf9a741fdb3869a95c04e3d00b344ba60ef43ba53a839f4c1f9fb7ff410 |
Hashes for xrayutilities-1.4.0.win-amd64-py2.7.10.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c50c733d7c6c588c60fc5d4973bc46bcc42a7e9abcc4ddaaee38748e5ef1ab5 |
|
MD5 | 80a6d06edaedb7d37c0b1f1854e7ccdf |
|
BLAKE2b-256 | e27633f603966f48df26bff70a59b3b3211122147d372bea18e5d34d397568f9 |
Hashes for xrayutilities-1.4.0-py3.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1e7f693bc73e56e4bd0841e25adaeff6b5b5bc4c4893d493527454bd2957557 |
|
MD5 | f835b0fb7d0ebe75256d07af45b1fa7c |
|
BLAKE2b-256 | b420f6ff8c69f0d1e2d25bcc57c892b8b47be55072847f7db25ca8572bcf5d4f |
Hashes for xrayutilities-1.4.0-py3.5-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c55b0e8b3027a1eff39d8b6d3ace02462017682e370c2d4bc454011b15da8c7 |
|
MD5 | 5a13f1f95f7983b10220dc5cd6ae0e16 |
|
BLAKE2b-256 | b8782b4a40dc1ec14e2021f345b7d9ea291757c33832675e24f2043954787571 |
Hashes for xrayutilities-1.4.0-py2.7.10-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e7762735f63358e245c81c5bd97852736ff1f4afe810e66c481b73b99f88aec |
|
MD5 | bddca370bdedc2153601282a5c0d8a4b |
|
BLAKE2b-256 | 3942c3ebdd6cf82c11fadff76b3efe9ac685f1e5aaeb627f4a7855a06f39de72 |
Hashes for xrayutilities-1.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8345479c125e35e5ecd64556f407f5fbb5a82e460c725f4fae6859f3670935de |
|
MD5 | 09c702e7d38a1aa324d8db7369609951 |
|
BLAKE2b-256 | e84a58a67103c3dd97565488b17aafb7d7ec48daa7594cf942d10665066c70ae |
Hashes for xrayutilities-1.4.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2542a348216e3afd2a96dcfb0e7ae9c083beb3decfe3a172993c8efcd2d3fba |
|
MD5 | cd60dd8ebdd95363d0df752d658d73d2 |
|
BLAKE2b-256 | 415a3e06faf050e27141c98f39b10e22a685cb375502fc7fe3c1556b06172794 |
Hashes for xrayutilities-1.4.0-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae640fe4c01e8baf8d16b4b9eb521659f13345ed6f74371c2158333c66c42b89 |
|
MD5 | 39774c861ddf0ae3aabcc152e303f2b3 |
|
BLAKE2b-256 | fa4d47c5f0f1c8cef16022b858191d01088c7887d440d9bc4b66cb1f78a8e241 |