[CCP14 Home: (Frames | No Frames)] CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

## Fitting peaks on a difficult background

### (Define the diffraction pattern / spectrum into sub-ranges that can be fitted in a convenient fashion)

The CCP14 Homepage is at http://www.ccp14.ac.uk

[Tutorials page] | [XFIT Tutorial Index]

[The reference to use for XFIT or FOURYA in any resulting publications is: Cheary, R. W. & Coelho, A. A. (1996). Programs XFIT and FOURYA, deposited in CCP14 Powder Diffraction Library, Engineering and Physical Sciences Research Council, Daresbury Laboratory, Warrington, England. (http://www.ccp14.ac.uk/tutorial/xfit-95/xfit.htm)]

### Why bother and what's the solution

For fitting patterns with problematic backgrounds, there are various tricks that can be used. You may only find out which one works most effectively the hard way. We will be using method 4 from the following list under the assumption that other methods are not working effectively.

• Tricks Fitting Noisy Data with Broad Peaks (and Nasty Backgrounds)
1. When peaks are merging significantly into the background - Try fixing all peaks to be 100% Gaussian.
2. When getting into false minima, could try constraining peak widths to be the identical (best done over short ranges).
3. Rebin the raw data into fewer data points (statistically valid and speeds up the data analysis) (i.e., 4000 data points into 1000 data points)
4. Define the spectrum into sub-ranges that can be fitted in a convenient fashion.
5. Specifying a more flexible higher order polynomical to fit the background.
6. Using a broadened peak (or several broadened peaks) to model nasty humps or backgrounds - including using the Split Pearson 7 (PVII) to model assymmetric backgrounds.

Please remember that if you are interested in peak areas, using a PVII - Split Pearson can be a dangerous peak function to use.

### Fitting peaks with difficult backgrounds - defining the subranges to fit

In this example, make an estimate of which ranges might be good to split things into. These can always be modified later. The following screen images shows 4 regions that I think would be good to fit things with.

(This is single peak Energy Dispersive Diffraction data so there is no need to define a wavelength spectrum)

### Background

From the options box, select File Details

Then from the Edit File Details menu enable a 2nd order polynomial background by selecting Bkg Parameters, with an Order of 2

### Fitting first sub-range

Using the arrow mode combined with the the left and right mouse keys, Zoom up on the range between 33 and 47.

Select Ins/Del Peaks from the Options box.

Select PV (Pseudo Voight) from the Peak Edit Options box. (the peaks are symmetric - if not, try using PVII (Split Pearson))

Put the mouse over a peak and click left mouse button to insert a peak (right mouse button to remove a peak). Repeat this for the observed peaks.

Now select Fit, Fit Marqardt to starting refining these peaks. This should happening routinely without problems. If not, you have have to combine a few other tricks such as forcing the peaks to be Gaussian or constraining overlapping peaks to have the same width and shape.

### Fitting other sub ranges

With the plot window selected, select "s" from the keyboard to unzoom (lower case "s")

To now fit on the second range, using the arrow mode combined with the the left and right mouse keys, Zoom up on the range between 50 and 68.

Select Ins/Del Peaks from the Options box.

Select PV (Pseudo Voight) from the Peak Edit Options box. (the peaks are symmetric - if not, try using PVII (Split Pearson))

Put the mouse over a peak and click left mouse button to insert a peak (right mouse button to remove a peak). Repeat this for the observed peaks.

Now select Fit, Fit Marqardt to starting refining these peaks (XFIT only fits on the area visible on the screen). This should happening routinely without problems. If not, you have have to combine a few other tricks such as forcing the peaks to be Gaussian or constraining overlapping peaks to have the same width and shape.

With the plot window selected, select "s" from the keyboard to unzoom (lower case "s")

### Fitting remaining sub ranges

#### Just repeat the above until satisfied with the fit. You will note that trying some options out found this pattern was best fitted in three separate ranges (not 4)

The finished unzoom result.

[Tutorials page] | [XFIT Tutorial Index]

 [CCP14 Home: (Frames | No Frames)] CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

If you have any queries or comments, please feel free to contact the CCP14