Page 1 of 1

Major rework of least-squares fitting in 6.0.0-dev.40

Posted: Wed Jun 22, 2022 9:35 am
by Stefan Stoll

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})

Re: Major rework of least-squares fitting in 6.0.0-dev.40

Posted: Tue Aug 23, 2022 4:25 am
by pihua498

I have installed 6.0.0-dev.43.
ESFitting does not recognaize data from "eprload".
Error message says numeric numbers are needed.

How do I fix it?
Thanks for your help.


Re: Major rework of least-squares fitting in 6.0.0-dev.40

Posted: Thu Sep 08, 2022 3:58 pm
by Stefan Stoll

Please post this as a separate topic in the General forum, and include a script that generates this error.