Short user's manual

Installation procedure:

No installer is yet available. The program is written in Python, and depends on the numpy, scipy, matplotlib, pyQT and lmfit modules.


  1. Download and install a package containing python and it's scientific modules, such as pythonxy. You can find this here: I strongly recommend using a 2.7 version of Python
  2. Download and install lmfit. You can find it here: You should be careful to download the version corresponding to your Python version (which should be Python 2.7!)
  3. Download and untar the provided mQfit file.
  4. Double-click on the script, which should start the GUI.

Unix systems:

  1. Python is usually provided with Unix distributions (at least it is in ubuntu), but you probably have to download and install the numpy, scipy, matplotlib and pyQT modules.
  2. Download lmfit here:
  3. Download and untar the provided mQfit file.
  4. In a shell window, go to the unziped directory and launch the program through the command: python The GUI should then appear.


Loading data:

The data should be in the column format of lamp. The column format consists of an ascii file that is divided in two arrays: the first one contains intensity, while the second one contains calculated errors on the intensity. The first column of these arrays contains the energy values, and the first row angle values (wich should be in 2-theta degrees). The rest of the array are the intensity/error values.
The first step is to open the data and resolution files, and then enter the instrument parameters to load your data and resolution files. This can be done with the IN5 and IN6 menus. You can check if this has been done properly by clicking in the IN5 and IN6 icons in the toolbar that display useful information such as file names, Q values, etc...

Entering parameters and fitting your data:

Parameter values are in instrument units (energy and reciprocal distance). After loading your data, you have to enter your starting parameter values with the model menu. It will open a widget which allows you to enter your starting parameter values or to load previously saved parameters. If you are starting from scratch, do not forget to fill the background and center values, or it will cause a bug in the fitting. This will assign the same starting values to the background and center of each spectra. If you are continuing or have loaded data, you should keep these empty, unless you want to reassign their starting value. After you have loaded the parameters, fitting can be performed by clicking on the fit icon in the menu bar. This will cause the GUI to freeze, and the shell window will display the chi square values at each step of the minimization. At the end of the minimization, a message will warn you that the fit has finished.

Visualizing fitted data and residuals:

You can visualize your fitted data with the data visualization icon in the menu bar. This will display the experimental spectra, and the fitted components. The residuals can be displayed with the residuals icon in the menu bar.

Viewing fitted parameter values and saving data:

Fitted parameters values can be visualized with the fitted parameter values icon in the toolbar. Saving your data can be done by clicking on the save icon in the toolbar. This will save each spectra and the fitted component in separate ascii files, a file containing the fit results, and a parameter file that can be imported that can be loaded for another fit. It will also save, depending on the model used, useful curves such as FWHM of the lorentzian vs Q.