Within DigitalMicrograph® software, the Least-Square Fitting palette provides an interactive way to fit mathematical models into spectral data. You can optimize the model by adjusting model parameters to minimize the deviation from the data in a least-square sense.
To access the Lead-Square Fitting palette, first expand the Data Fit technique. The palette becomes active when suitable spectral data is in the frontmost location on the current workspace. The tool offers two distinct fitting modes: multiple linear least square (MLLS) for reference data and non-linear least square (NLLS) to address model functions such as Gaussian peaks. The buttons toggle the tool's mode at the top of the palette.
NLLS fitting
The non-linear least-square fitting mode is useful for fitting a parameterized model function to the data. During this process, the fitting is performed iteratively by adjusting the parameter values from a starting estimate while minimizing the residual signal's square sum; fitting convergence is not guaranteed. The mode provides different model types to choose from.
Least-Square Fitting palette
The palette contains the following elements:
- Mode toggle (MLLS/NLLS) – Use this button to toggle between the two modes of fitting
- Setup – Opens the Least-Square Fitting Options dialog
- 1D Fit – When active (blue), enables live-fitting of the spectrum in the frontmost location (only available for spectra)
- Map – Performs the fit sequentially overall spectra of a spectrum image, producing maps of the fit parameters (only available for spectrum images)
- Add – Adds a new default model to the fit model list; simultaneously press the ALT key to add a different type item from the Model Type Selection dialog
- Remove – Removes the current model selection from the list
- Clear – Removes all model items from the list
- Rename – Renames the current model selection, or you can click on a list-entry while pressing the ALT button
- Resort – Shifts the current model selection up or down in the list, or you can click on a list-entry while selecting the CTRL or CTRL + SHIFT buttons
- Open – Opens a previously saved list of model items
- Save – Saves the current list of model items
- Model list – List all the model items in the current model
- Names in the model list need to be unique; by default, the item type uses a generic name
- Click an item to select it
- Click the blue triangle left of the item name to open or close the fit-parameter display of that item
- Each item type has a different set of parameters
- The small lock icon indicates whether the parameter is currently at a fixed value during fitting. Clicking the lock-icon toggles its state. You can manually adjust a locked parameter value by clicking on the number field and entering the value.