PyXRD

HomePage: http://github.org/mathijs-dumon/PyXRD

Author: Mathijs Dumon

Download: https://pypi.python.org/packages/source/P/PyXRD/PyXRD-0.5.4.zip

        PyXRD
=====

PyXRD is a python implementation of the matrix algorithm for computer modeling
of X-ray diffraction (XRD) patterns of disordered lamellar structures.
It's goals are to:

 - provide an easy user-interface for end-users
 - provide basic tools for displaying and manipulating XRD patterns
 - produce high-quality (publication-grade) figures
 - make modelling of XRD patterns for mixed-layer clay minerals 'easy'
 - be free and open-source (open box instead of closed box model)
 
PyXRD was written with the multi-specimen full-profile fitting method in mind. 
A direct result is the ability to 'share' parameters among similar phases.
This allows for instance to have an air-dry and a glycolated illite-smectite 
share their coherent scattering domain size, but still have different basal 
spacings and interlayer compositions for the smectite component. 

Other features are (incomplete list):

 - Import/export several common XRD formats (.RD, .RAW, .CPI, ASCII)
 - simple background subtraction/addition (linear or custom patterns)
 - smoothing patterns and adding noise to patterns
 - peak finding and annotating (markers)
 - custom line colors, line widths, pattern positions, ...
 - goniometer settings (wavelengths, geometry settings, ...)
 - specimen settings (sample length, absorption, ...)
 - automatic parameter refinement using several algorithms, e.g.:
    - L BFGS B
    - Brute Force
    - Covariation Matrix Adapation Evolutionary Strategy (CMA-ES; using DEAP)
    - Multiple Particle Swarm Optimization (MPSO; using DEAP)
 - scripting support

DISCLAIMER
==========
PyXRD is still very much work in progress. Currently there is no strict 
development cycle as it is still a one-mans project. This also means little
time is going into testing and adding new tests for new features. Most of the
codebase therefore remains untested at this point and Things May Break as a 
result.

If you encounter serious bugs please send me the output so we can improve the code!
We'll try to make a habit out of writing UnitTests for each bug we encounter.


INSTALLATION
============

As of version 0.5.0 PyXRD (finally) supports standard python packaging, meaning 
it is available from the [Python package index](https://pypi.python.org/pypi)
and has become very easy to install for most Python users.

If you're not used to (installing) Python software, see below for specific instructions.

DEPENDENCIES
------------

This is what should be present on your system.

 * Python 2.7.4 (other version may also work, or may not)
 * Setuptools 1.4.1
 * PyGTK 2.24.2 or later
 * Numpy 1.7.0 or later
 * Scipy 0.11.0 or later
 * Matplotlib 1.2.1 or later
 * PyParsing 1.5.7 or later
 * (optional) DEAP 0.9.1 or later

Windows
-------

There are numereous ways to install python 'packages' or software. If you're a 
first-time Python user and don't really care about what way it is installed,
just download and install these, in the order given:

 1. [Python 2.7.4](http://www.python.org/ftp/python/2.7.4/python-2.7.4.msi)
 2. [Setuptools 1.4.1](http://www.lfd.uci.edu/~gohlke/pythonlibs/v92jt8xn/setuptools-1.4.1.win32-py2.7.exe)
 3. [PyGTK 2.24.2](http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.2.win32-py2.7.msi)
 4. [Numpy 1.7.0](http://sourceforge.net/projects/numpy/files/NumPy/1.7.0/numpy-1.7.0-win32-superpack-python2.7.exe/download)
 5. [Scipy 0.11.0](http://sourceforge.net/projects/scipy/files/scipy/0.11.0/scipy-0.11.0-win32-superpack-python2.7.exe/download)
 6. [Matplotlib 1.2.1](https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.2.1/matplotlib-1.2.1.win32-py2.7.exe)
 7. [PyParsing 1.5.7](http://sourceforge.net/projects/pyparsing/files/pyparsing/pyparsing-1.5.7/pyparsing-1.5.7.win32-py2.7.exe/download)
 8. [PyXRD](https://github.com/mathijs-dumon/PyXRD/releases)

At this point you should have a working version of PyXRD installed (with a desktop shortcut).

If you want to use the evolutionary algorithms for parameter refinement, you'll
need to install DEAP as well. There is currently no windows installer ava