Smoothing Data

View Categories

Smoothing Data

2 min read

Quick Overview #

Smoothing raw data can be done in CasaXPS, but should be done with care! There are definitely occasions where data may be smoothed, such as in the case of analysing Auger differentials, or generating lineshape curves for LCF/PCA analysis. Smoothed data should always be described as such in any project reports, presentations, or publications, and the smoothing moethod reported.

CasaXPS Smoothing Options #

Data smoothing in CasaXPS
Data smoothing in CasaXPS

CasaXPS contains many smoothing options, all of which can be accessed using the processing (f8) window. An integer can be input (the various models have different limits), and the data smoothed. This can be undone using the processing history tab.

1. SG Quadratic / SG Quartic / SG Linear #

These refer to Savitzky-Golay (SG) filters:

  • They perform a local polynomial regression on the data.

  • The names indicate the polynomial order used:

    • Linear = 1st-order polynomial

    • Quadratic = 2nd-order

    • Quartic = 4th-order

  • Best used for smoothing while preserving peak shapes in spectroscopic data.


2. Gaussian #

  • Applies a Gaussian smoothing kernel, which weights nearby points using the Gaussian function.

  • Good at reducing high-frequency noise.

  • Preserves general shape better than a simple moving average but may blur peak edges more than SG.


3. SG Deg. 6 #

  • Savitzky-Golay with a 6th-degree polynomial.

  • Can capture more curvature in the data but may overfit if too high relative to smoothing width.


4. Sm SG D(n) P(m) #

  • Smoothed Savitzky-Golay Derivative:

    • D(n): Derivative order

    • P(m): Polynomial order

  • E.g., D(1) P(2) = 1st derivative using a 2nd-degree polynomial.

  • Common in spectroscopy for peak detection or baseline correction.


5. Sm Poly D(n) #

  • Smoothed Polynomial Derivative:

    • Similar to above but uses a smoothed polynomial approach, not strictly Savitzky-Golay.

  • May be a custom or variant algorithm implemented in the software.


6. Moving Average #

  • Simple method that replaces each point with the average of neighbouring values.

  • Easy to implement but can distort peaks.


7. Spike Suppression #

  • Specifically designed to remove sudden spikes or outliers.

  • Preserves general trends but may reduce sharp features.

Polynomial Regression Smoothing #

Data can also be smoothed by fitting a polynomial regression background to the data, and using the replace by envelope function in the ‘test data’ tab. Fit a background using quantify, and type ‘PR’ into the BG type box, and hit enter. The first parameter in the cross section is the order of the polynomial and can be modified with a number between 1-36.

Polynomial regression background in CasaXPS
Polynomial regression background in CasaXPS

After this has been fitted, you can go to the Test Data tab in Processing window, and select Replace by Envelope. This allows you to selectively smooth parts of your spectrum and not others. We would not recommend you ever publish any smoothed data without showing the original data alongside.

Replace by envelope in CasaXPS
Replace by envelope in CasaXPS

References #