17.4 The Peak Fitting Process

The process of fitting peaks is usually done in a few steps. There are times where I will refine peak intensities, positions and widths all together, usually I will follow the steps outlined here.

Note that a peak fit refinement is performed using the “Peak Fitting”/Peakfit menu command. (The “Peak Fitting”/“Peakfit one cycle” menu command does the same thing, but stops after a single least-squares cycle.) Note that if any background terms (Background tree entry) are set to be fit, they will also be refined when the Peakfit is run. Likewise, if the refine flags are set for U, V, W, X, Y and/or Z on the Instrument Parameters tree entry), these parameters will also be refined. Initially you will likely want to check that the Instrument Parameters refine flags are all turned off. You may want to use the tools discussed in §11.2. At least in the early stages of peak fitting, you either should fix the background or else have simple background settings where only a few background terms are fit. This is particularly true if the data range is relatively small. Do consider the upper and lower data limits, as even if you only supply peaks in a small section of the pattern, if the limits cover the entire data range, then the background will be fit over that entire range. The background over a small data region is likely to only need a few terms for fitting.

Initially peaks are located and then the peak intensities are refined (that flag is turned on by default as new peaks are created.) The fit is done using the “Peak Fitting”/Peakfit menu command. Once the peak intensities have been fit, look for any peaks with negative or approximately zero intensity. You may want to delete these peaks, or if you feel that there is actually peak in that location and will want to put it back into the refinement at a later time, you can reset the intensity manually and and remove the intensity refinement flag for that peak In the next step, you will refine peak positions, but the position of a peak with negligible intensity has no impact on the fit and the refinement where the position value is fit unlikely to progress. Likewise, when there are two closely spaced peaks, which may appear to be a single extra wide peak or a weaker shoulder on the edge of a strong peak, it may be hard to refine the positions of both peaks. You may be able to refine both peak positions later in the process, when the peak widths are well defined, but initially one should refine peak positions only where there is a clear peak maximum visible. Select the position refinement flag for these clearly defined peak positions. It can be helpful to double-click on a row label in the table, as that will highlight the peak location in the plot. Once the peaks to have positions varied have been identified, again use the “Peak Fitting”/Peakfit menu command.

At this point, one should consider the quality of the background fit and how well the peak widths are matched. For background fitting, all the tools discussed in §11.2 are available, but it is also possible to simply turn on and off the fitting of terms or change the number of terms that are fit as part of the peak fitting process. When it comes to fitting the peak profile, there is a decision to be made: do you trust the U, V & W terms supplied in the instrument parameters file? If you do believe the calibration was done well, you do not want to refine the U, V & W terms or for that matter the \(\sigma ^2\) term for any peaks. If you do not have accurate calibration for your data, you may want to refine the Gaussian widths. If you are fitting 5 or more peaks, you can consider fitting the U, V & W terms, but fitting a three-parameter function with 4 or fewer peaks is poor idea. In that case, refine the \(\sigma ^2\) widths directly. In addition, unless the pattern is very well fit at this stage, include Lorentzian broadening by fitting the \(\Gamma \) terms for each peak. You may not be able to refine the individual \(\Gamma \) terms for smaller peaks that are shoulders on larger peaks.