Linear Combination Modeling
Introduction
This project allows for fitting one wave (1-dimensional, 2-dimensional, 3-dimensional or 4-dimensional) as a linear-combination of multiple 1-dimensional waves by using Igor’s FuncFit (linear combination modeling, LCM). For 2-dimensional, 3-dimensional and 4-dimensional waves-to-fit each single sub-wave will be fitted individually. The wave-to-fit must be saved as columns for 2-dimensional waves, as layers for 3-dimensional waves and as chunks for 4-dim. waves.
Each single wave of the wave-to-fit is fitted to equation
Σi (ai⋅wavei(x)) + abs. offset
and the results (of ai and the absolute offset) will be saved as waves in a subfolder of the wave-to-fit. For 1-dimensional waves global variables are used and the results are printed to history.
This package is freely available for not commercial use. The procedure was developed by Dr. Gregor Germer within a research project of Prof. Dr. Eckart Rühl (Physical Chemistry, Freie Universität Berlin, Berlin, Germany) funded by the German Research Foundation (DFG), grant no: RU 420/12-1. It is required to cite the following reference when this procedure is used for scientific work and publications: G. Germer, T. Ohigashi, H. Yuzawa, N. Kosugi, R. Flesch, F. Rancan, A. Vogt, and E. Rühl, “Improved Skin Permeability after Topical Treatment with Serine Protease: Probing the Penetration of Rapamycin by Scanning Transmission X-Ray Microscopy”, ACS Omega 6, 12213-12222 (2021). doi.org/10.1021/acsomega.1c01058.
Menu
The procedure creates several new entries under Analysis/Packages/Linear-combination modeling/
Start LCM (new dataset).
Start a fresh fit set.
Restart LCM.
Restart old LCM set using another wave. Information or configuration wave must be selected in the data browser.
Calculate relative sigma of LCM sigma wave from Data Browser.
Calculate the relative sigma from a selected sigma wave in the data browser. relative sigma = sigma / coef
Release ThreadGroup for aborted LCM using Igor Pro's beach ball.
If you abort a fit using Igor’s beach ball, you can release the MultiThread using this function.
Start LCM by choosing waves
If you start or restart a LCM fit, the procedure will show you a data browser window and you have to choose the wave-to-fit (1-dim., 2-dim., 3-dim., or 4-dim.).
The initial LCM function will ask you for reference waves as input for the fit. Choose all needed 1-dim. waves at the same time. The restart LCM will choose these waves automatically.
It is important that all used waves are correctly scaled. After choosing the reference waves Igor will generate copies of these waves using the same scale as the wave-to-fit. Missing points will be interpolated.
Fig. 1: Overview of the information and options in the LCM control panel
LCM Panel Options
In this panel you have to choose the parameters of the fit. The restart function will copy the used entries (see Fig. 1).
The left-hand column shows most of the parameters for the linear-combination modeling. You can choose the accuracy of the Fit (FitTol), Start and End of the Fit and the values (Initial value, Min, and Max) for the reference waves. If Min = Max, the initial guess will remain unchanged (using /H (hold) in the fit).
The middle column shows a drop-down-menu for different fit methods:
No x-shift analysis
The normal linear-combination.
Multiple x-shift analysis
This allows each reference wave to be shifted separately along the x-axis. Initial guesses of low values for the waves may lead to a singular matrix error. Values around 0.5 should work fine. The initial guesses for the x-shift and the ± is used from below. ± = 0 holds the initial guess.
Σi (ai⋅wavei(x+bi)) + abs. offset
Single x-shift analysis
Small initial guesses for the waves may lead to a singular matrix error. Values around 0.5 should work fine.
The initial guesses for the x-shift and the ± is used from the first entry below.
Σi (ai⋅wavei(x+b)) + abs. offset
Notice for x-shift analysis:
When fitting a shift of a wave along the x-axis, the index can go out of range. This results in an error of the fit. The function automatically calculates the minimum start and maximum end point of the fit for the case of maximum shift. It will correct the user input if necessary. You may get better results if you set the start and the end of the fit manually. Likewise, the range of the shift should be set as small as possible.
One can set the guesses for all waves to a defined value via the shortcut buttons at the bottom of the middle column. The Min = 0 button will result in a fit to a non-negative matrix factorization and Min = -inf in a numerical singular value decomposition of your entry data set. The biggest advantage compared to other known evaluation software is that different limits can also be easily selected for each input reference.
The right-hand column allows one to generate a mask using the start and end values via the buttons.
Waves Button
A panel will be opened that shows the average of the wave-to-fit (blue) and the reference waves for a quick overview.
Save Config. Button
A wave in the folder root: will be saved that can be used to restart a LCM fit using the visible waves and parameters.
Cancel Button
The LCM panel will be closed without fitting and all temporary data will be removed. (Only one LCM panel can be opened at a time.)
Do it Button
The LCM fit will be started based on the user inputs. Depending how many reference waves and wave inside the wave-to-fit, it may require up to several minutes to finish. For a multi-dimensional wave-to-fit all of the available CPU-threads will be used.
After the fit is done, a “LCM done.” text will be printed in history. Three “beeps” of sound might be played if the variable v_beep in the function f_LCM_beep() is set from 0 to 1.
The results will be saved in a subfolder of the wave-to-fit. The coef and sigma parameters (wave or variable/G), the mask wave, all parameters of the fit in the information wave, and the fit will be found in this subfolder.
Project Details
Current Project Release
Release File: | LCM_5.10_20230330.ipf (136.77 KB) |
Version: | 5.10 |
Version Date: | |
Version Major: | 5 |
Version Patch Level: | 10 |
Release Notes: |
Added support for 4-dim. waves-to-fit. Absolute offset is now called offset in the results. Correction of the description for the use of 2-dim. waves-to-fit. |
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More