EELS | AMETEKSkip to Main Content
No options found

Multiple Linear Least Squares

You can use the multiple linear least-squares (MLLS) method to fit a number of reference spectra and/or models to a spectrum. The reference spectra can be fitted as a linear combination.

 

F(E)=AEr+BaSa(E)+BbSb(E)+...F(E)=AE^{-r}+B_{a}S_{a}(E)+B_{b}S_{b}(E)+...


where

  • Sa(E),Sb(E)...S_{a}(E),S_{b}(E)... = Reference models
  • Ba,Bb...B_{a},B_{b}... = Scaling coefficients
MLLS fitting schematic
   

Common uses for MLLS

MLLS fitting is commonly used for the following applications:

  • Separation of overlapping EELS edges – Extracts edge signals when conventional background removal is insufficient.
  • Spectral phase mapping – Maps out the spatial distribution of a specific spectral shape, such as energy dispersive x-ray spectroscopy (EDS) or EELS low-loss distribution.
  • Energy-loss near-edge structure (ELNES) fingerprinting – Uses reference spectra to determine the spatial distribution of chemical states associated with an ionization edge.
  • Anisotropic studies – Enables orientation‑ and coordination‑dependent mapping.

Tool overview

The Least‑Squares Fitting palette in the DigitalMicrograph® 3 software provides tools for setting up and performing both:

Least SquaresTool Palette
   

The palette includes controls to:

  1. Select the fitting type (MLLS or NLLS)
  2. Open the least‑squares fitting preferences dialog
  3. Add references from the front‑most spectrum or from any open dataset
  4. Add NLLS fit models
  5. Overlay references in a new DigitalMicrograph line plot
  6. Rename, reorder, or remove references
  7. Show or hide the 1D live fit overlay
  8. Generate least‑squares fit maps using current parameters
  9. Load or save reference lists
  10. Clear the reference list


Select MLLS or NLLS using the corresponding buttons in the palette to enable the desired fitting mode.

MLLS Fitting Preferences

The MLLS Fitting Preferences dialog contains parameters specific to configuring and executing MLLS fitting.

Fit Settings

  • Use fit weights computed from data – Specifies the weighting scheme used to determine the least‑squares fit parameters.
  • No negative coefficients – Constrains all fit coefficients to be non‑negative.
    (This option is available only when Use fit weights is disabled.)
  • Live display – Controls the output shown for the 1D live fit, including:
    • Total fit
    • Residual (misfit) signal
    • Individual fits
    • Cumulative model display
    • Limit display to fit range
  • Output fit as – Determines whether results are reported as fit coefficients or signal integrals.
MLLS Options Setup
   

Additional output options

  • Fit uncertainties – Outputs uncertainty maps for the fit coefficients.
    (Available only when Use fit weights is enabled.)
  • Reduced chi‑squared – Outputs the reduced chi‑squared value as a measure of goodness of fit.

Performing an MLLS fit

To perform an MLLS fit on spectra or models over a specific energy range (for example, overlapping edges or superimposed fine structure):

  1. Select the dataset to be analyzed.
  2. Use the rectangular ROI tool to define the energy range for fitting.
  3. If fitting background and ionization edges separately, define an appropriate background fit region before proceeding.
MLLS_InternalRefs_bkgnd_window
   

MLLS internal references

Internal references are extracted directly from the dataset being analyzed.

  1. Ensure MLLS is selected in the Least‑Squares Fitting palette.
  2. Select the internal reference option (C from Figure 2, above).
MLLS Fitting dialog
   
  1. Select both the background and edge regions as references and click OK.
    1. The background reference is automatically named Bkgd.
    2. Assign a descriptive name to the edge reference.
MLLS fit - Add reference dialog
   
  1. The references appear in an ordered list in the fitting palette.
  2. Enable 1D Fit to overlay the live fit and assess fit quality.
Least square fitting dialog
   

Assess fit quality

  • A good fit is indicated by:
    • Close agreement between the total fit and raw data
    • Low residuals with no strong features
MLLS_InternalRefs_LiveFit_Good
   
  • A poor fit is indicated by:
    • Mismatch between fit and data
    • Large residuals with pronounced features

 

Add additional references as needed, using the live fit as a guide.

MLLS_InternalRefs_LiveFit_Bad
   

Generating MLLS fit maps

MLLS_InternalRefs_LiveFit_Final
   

When you are satisfied with the reference list:

  1. Click Map to open the MLLS output options dialog.
  1. Configure output options:
    1. Display maps as fit coefficient or signal integral
    2. Hide background maps (optional)
    3. Generate additional outputs such as:
      1. Reduced chi‑squared maps
      2. Residual signal
      3. Fit uncertainties
  2. Click OK to start the computation.

 

MLLS Fit Map Options
   

MLLS fitting is performed pixel‑by‑pixel, using the specified fit regions and parameters derived from the exploration spectrum.

MLLS MLLS Internal References Oxygen Maps
   

MLLS external references

External references are spectra or models loaded from other datasets.

Workflow

  1. Ensure MLLS is selected in the Least‑Squares Fitting palette.
  2. Select the external reference option (D from Figure 2, at top).
  3. Choose the reference spectra and click OK.
12_LLSTool_MLLS_ExternalRefs_Choosin_486x486
   
  1. Rename references as needed and arrange them in the desired order.
  2. Assess fit quality using the 1D live fit.
13_LLSTool_MLLS_ExternalRefs_populat_486x486
   
  • If the total fit closely matches the raw data and the residual is low with no pronounced features, the fit quality is good and no additional references are required.
total MLLS fit does match the data
   
  • If the total fit does not match the data and the residual is large or contains strong features, the fit quality is poor and additional references are needed.
total MLLS fit does not match the data
   
  1. Add or refine references as necessary, using the live fit overlay as a guide.
  2. When you are satisfied with the reference list, select Map to open the MLLS fit options dialog.
  3. Configure the desired output options (see the previous section), then click OK to generate optimized fitting maps in a new workspace.
MLLS External References Final Fit
   
Want to enhance your EELS results

Want to enhance your EELS results?

Visit EM Academy to stream lessons from application specialists and design engineers anytime, anywhere, and at your own pace.