Major rework of least-squares fitting in 6.0.0-dev.40
Dear Easyspin users,
As of 6.0.0-dev.40, EasySpin's least-squares fitting function esfit
have undergone a major overhaul. Here are the major changes:
-
esfit
now calculates uncertainties for all fitted parameters, using the covariance matrix approach. -
esfit
can now fit system and experimental parameters at the same time, without the need for writing custom functions. -
esfit
's graphical user interface has been updated and expanded to allow editing of current, lower and upper bounds for each parameter. -
esfit
's graphical user interface now also displays the parameter uncertainties. -
esfit
can now be used to run least-squares fitting with any non-EasySpin model function that takes a vector of parameters. -
You can now add a mask to block out parts of the spectrum from the fitting.
-
You can now use Autoscaling and baseline correction independently from each other.
Try out the new functionality and let us know over in the Gneral forum if you encounter any issues!
Here is a quick script to get you started:
Code: Select all
clear, clc
Sys.g = [2 2.1 2.2];
Sys.lw = 1;
Exp.mwFreq = 9.5;
Exp.Range = [300 350];
[B,spc] = pepper(Sys,Exp);
spc = addnoise(spc,100,'n');
Sys0.g = [1.99 2.08 2.22];
Sys0.lw = 1.5;
vSys.g = [0.05 0.05 0.05];
vSys.lw = 1.2;
esfit(spc,@pepper,{Sys0,Exp},{vSys})