]> General Background Optical Property Functions

General Background Optical Property Functions

If not known from some other experimental measurement, background optical properties can be obtained by fitting to the experimental data. While faster, specialized, fitting routines are available for fitting either the absorption or the scattering individually, the toolbox also includes generalized routines for finding both sets of optical coefficients simultaneously. Since these routines do not need additional Matlab toolboxes, there are also suitable for sites with only the core Matlab toolboxes installed.

Function Summary

Syntax: [mus, mua, costfunc] = fitBackground(SD, Medium, MeasList, data);
Inputs: SD SD structure
Medium Medium structure
MeasList Measurement List that corresponds to experimental data
data Experimental data to be fit against
Outputs: mus X-values of cost function [vector]
mua Y-values of cost function [vector]
costfunc Cost function calculated on a regular grid [matrix]. For complex data, the amplitude and phase costs are computed separately.
Syntax: [SD2, Medium2] = newFitBackground(SD, Medium, MeasList, data, muvec);
Inputs: SD SD structure
Medium Medium structure
MeasList Measurement List that corresponds to experimental data
data Experimental data to be fit against
Outputs: SD2 SD structure with best-fit SD.SrcAmp and SD.DetAmp values
Medium2 Medium structure with best-fit Muao and Muspo values

Detailed Descriptions

fitBackground() is obsolete except as a sanity check (and for anyone with a desperate need to find out what the cost function looks like). Use newFitBackground() for any serious data analysis.

fitBackground() calculates a cost function over a fixed grid of points. While the grid search is robust and useful for generating contour plots, it is not particularly accurate or efficient.

newFitBackground() is a much more useful function. It simultaneous solves for the optical properties as well as the source and detector amplitudes by non-linearly minimizing the difference between the experimental data and the theoretical prediction. The minimization is done using a Levenberg-Marquardt scheme which continually adjusts the regularization of the inverse and using numerical estimates of the Jacobian matrices (see genSDJacobian() and genMuJacobian()).

For both fitBackground() and newFitBackground(), the cost function is given by

C = log 2 Φ / Φ 0 μ

where the Φ i are the individual experimental measurements, Φ i 0 μ are the theoretical predictions, given optical properties μ, and the angle brackets denote an average over all measurements. Minimizing the function is equivalent to minimizing the residue in the Rytov approximation (which is what newFitBackground() actually does).