Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


© Sébastien Merkel, Université Lille 1, France
Since June 2011, polydefix is open source software, licensed under the GPL Version 2.
Multifit/Polydefix homepage is at


Multifit/Polydefix is an open-source IDL software package for an efficient processing of diffraction data obtained in deformation apparatuses at synchrotron beamlines. Multifit allows users to decompose two-dimensional diffraction images into azimuthal slices, fit peak positions, half-widths, and intensities, and propagate the results to other azimuth and images. Polydefix is for analyzes of deformation experiments. Starting from output files created in Multifit or other packages, it will extract elastic lattice strains, evaluate sample pressure and differential stress, and prepare input files for further texture analysis.

Multifit/Polydefix homepage is at

About Polydefix

Polydefix is for lattice strains, pressure, stress, and texture analysis (see below). It will start from the output iles created in Multifit and extract the information required for establishing the rheological behavior of the sample.

Multifit/Polydefix is written in the Interactive Data Language (IDL) provided by Exelis Visual Information Solutions (Boulder, Colorado). It is an open-source software package, licensed under GNU General Public License that runs within the IDL Virtual Machine, as provided at no-cost by Exelis Visual Information. It will run on any platform with an IDL Virtual Machine, Windows, OS X, Linux, and Solaris. The IDL Virtual Machine does not require a license to run. An IDL license is required, however, for developing, compiling, and adding new features.

Development with IDL

IDL comes with a complex eclipse-based development environment in a graphical user interface (gui) for editing projects. Over the years the gui became more and more complex. It is a complete overkill for what we are doing here. Moreover, each upgrade of IDL comes with technical issues and, recently, it simply stopped working on my computers. Therefore, I decided to completely quit using the IDL gui for developing applications and develop multifit/polydefix in text mode only. You are welcome to try using the gui if you want, but I will not help you with it.

Compiling, editing, and playing with the code

Once you downloaded the latest version of the code, you can simply open the files in your favorite text editor. I use kate, one of the KDE text editor. It does have a specific mode for coloring IDL codes (select Tools -> Highlighting -> Sources -> RSI IDL).

To compile and run the code, you should move into the folder with your source, start IDL in the command line, and type @build:

  cd ~/IDL/Polydefix

You can then test your changes by typing


in the command line. It will start the latest version you compiled.

Once you're done, if you want to quit IDL, simply type exit in the IDL command line.

I do not recommend the IDL development environment. On the other hand, the online help is extremely helpful. To start the help from the command line, simply type idlhelp.

File descriptions


Build instructions are in file "build" To build, type @build in IDL command prompt.

UI Components

  • program start, calls
  • main UI functions to set the wavelength, fit files, set HKL planes, show about...
  • UI and functions to test lattice strains fits
  • UI and functions to test pressure fits
  • UI and functions to test cell parameters fits
  • UI and function to set material properties (name, symmetry, EOS, elasticity)
  • UI to have a plot
  • UI that with the lattice strain tests
  • UI for a progress bar
  • UI for intensity vs. orientation for diffent images
  • UI for intensity vs. image for diffent orientations

Data classes

  • Main experiment data: where is it stored, wavelength, material, and all functions to work on it
  • Material data + functions on EOS and elasticity
  • unit cell function, get dhkl or volumes from unit cell parameters
  • holds all fitSubPatternObject objects, knows how to fit lattice strains equations
  • holds data for one subpattern (2theta, intensity vs azimuth and such)
  • holds a lattice strain fit


  • equations for lattice strain fits with center correction, called from a fitPatternObject
  • equations for for lattice strain fits with NO center correction, called from a fitSubPatternObject
  • other type of lattice strain fits, not called
  • non linear fitting
  • non linear fitting


Multifit/Polydefix is an open-source IDL software package for an efficient processing of diffraction data obtained in deformation apparatuses at synchrotron beamlines.







No releases published


No packages published