File Exchange

image thumbnail

Line-Profile Analysis Software (LIPRAS)

version 1.465.0.0 (43.2 MB) by Giovanni Esteves
Peak fitting GUI for Diffraction Data


Updated 03 Apr 2018

GitHub view license on GitHub

Line-Profile Analysis Software (LIPRAS), is a graphical user interface for least squares fitting of Bragg peaks in diffraction data. For any region of the inputted data, user can choose which profile functions to apply to the fit, constrain profile functions, and view the resulting fit in terms of the profile functions chosen. A Bayesian inference analysis can be carried out on the resulting least squares result(s) to generate a full description of the errors for all profile parameters.
Authors: Giovanni Esteves, Klarissa Ramos, Chris Fancher, and Jacob Jones

• Quickly extract relevant peak information: position, full width at half maximum (FWHM), and intensity
• Conduct Bayesian inference on least squares results using a Markov Chain Monte Carlo algorithm (need Statistics and Machine Learning Toolbox)
• Analyzes files with a different number of data points and/or X-values. However, check fitting range before attempting.
• Customize the background fit by either treating it separately (Polynomial or Spline) or including it in the least squares routine (Polynomial only)
• Choose from 5 different peak-shape functions: Gaussian, Lorentzian, Pseudo-Voigt, Pearson VII, and Asymmetric Pearson VII.
• Peak-shape functions can be constrained in terms of intensity, peak position, FWHM, and mixing coefficient
• Automatically calculate Cu-Kalpha2 peaks when working with laboratory X-ray data
• Fit up to 20 peaks in the current profile region
• For multiple diffraction patterns, results from the previous fit can be used as the subsequent starting parameters for next fit
• Visualize results with a plot of the resulting peak fit and residual plot, allowing you to see what peaks make up the overall fit
• Resulting coefficients values can be viewed with file number to quickly view trends in data
• Parameters files can be written and used to recreate fits and details what fit parameters and profile shape functions were used
• Accepts the following file types: .xy, [.ras, .acs] (Rigaku), .xls, .xlsx, .fxye, .xrdml (Panalytical), .chi, .csv (Windows Only)

LIPRAS is currently updated through GitHub
Web Page:

Requires MATLAB 2016b, Curve Fitting Toolbox, and GUI Layout Toolbox to run. The Statistics and Machine Learning Toolbox is required for Bayesian analysis.

If you use LIPRAS for your research, please cite it (choose one):

1. Giovanni Esteves, Klarissa Ramos, Chris M. Fancher, and Jacob L. Jones. LIPRAS: Line-Profile Analysis Software. (2017). DOI: 10.13140/RG.2.2.29970.25282/3
2. Giovanni Esteves, Klarissa Ramos, Chris M. Fancher, and Jacob L. Jones. LIPRAS: Line-Profile Analysis Software. (2017).

Comments and Ratings (4)

Sen Lin

Great tool ! Fitting several diff. patterns at a time is very nice.

Thank you AJ, I really appreciate it. I will definitely check out your submission.

AJ Geiger

Great GUI the least squares fitting works great! I just put out a GUI toolbox check it out. I think you may like it.



1. The 'Update' button, after conducting a fit, was not applying results of LS fit as starting parameters on next LS (i.e. hitting fit data) on the first click
2. Zoom resets on new data
3. Fixed an issue where selecting no file would cause an error


1. Read in Rigaku ASC and RAS files
2. Fixed issue with table display on BayesGUI when switching b/w include Bkg or not
3. Added ability to download ZIP file containing LIPRAS update


1. Analyze files with a different number of data points in least squares and Bayesian component. Check fitting range before attempting.
2. Bkg refined in least squares can now be used in Bayesian routine
3. Symmetric functions can be made asymmetric


1. Fixed an issue that caused the Bayesian of analysis of multiple files to use the SP from the first file and applied it to all files.
2. Bayesian fit plot now sets Xlim to min 2θ and max 2θ used in Least squares


Added multipliers to SD and UB/LB bounds
Added ability to plot resulting Bayesian fit
Bayesian component now checks for Statistics Toolbox
Added some logical statements to avoid error of hitting 'plot' when no Bayesian analysis has been conducted


Bug fixes to Bayesian GUI. Added ability to plot Sigma^2 trace plot.


Bug Fixes, Right-click now delete Bkg points during selection, Introduced alpha version of Bayesian analysis component, which requires Statistics and Machine Learning Toolbox


The ‘Check for Updates’ now displays current version and the available version if an update is recommended. Added a try/catch statement to .csv, .xlsx, .xls files for handling 2 or 3 column data (twotheta, intensity), (twotheta, intensity, error).


Added an if statement for cases when measured intensity was 0, which would cause the weight of that value to be 'Inf' in MATLAB.


Significant improvement to background refinement when 'Refine Bkg' is on


Small changes, 'Default' weight options for CHI files were incorrect. This was a typo, although could be forced by specifying 1/obs. Found out GOF or (reduced chi-square) is sse/dfe which are values found in the Fmodel files.


See Update Notes, Highlight:
1. Fixed an issue that caused the weights of the first pattern to be applied to all the patterns loaded instead of being file dependent
2. The errors from files (FXYE and XYE) are now properly read and applied as weights

Highlights, See update notes for details
• Preference Menu has been expanded
• Code clean up
• Fmodel for individual files are no longer written
• Kalpha2 peaks are now written in Fdata file when used

Updated Description

Needs Curve Fitting Toolbox to run

SourceForge now has stand-alone version

Added GitHub webpage

Added Stand-Alone version link for those that want to run LIPRAS without MATLAB

Updated description

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: GUI Layout Toolbox

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor