Strange behaviour of esfit during fitting

A place to report and discuss potential bugs
Post Reply
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Strange behaviour of esfit during fitting

Post by katarkon »

I have found that for some files experimental spectrum looks like scaled by negative factor. It is clearly visible on screenshot.

esfit.png
esfit.png (62.23 KiB) Viewed 7017 times

This behaviour is kept at any scaling mode, except 'no scaling' which throws an error

Code: Select all

Undefined function or variable "scalefactor".
Error in C:\easyspin-5.2.30\easyspin\rescale.p>rescale (line 140)
Error in C:\easyspin-5.2.30\easyspin\esfit.p>assess (line 843)
Error in C:\easyspin-5.2.30\easyspin\esfit_simplex.p>esfit_simplex (line 77)
Error in C:\easyspin-5.2.30\easyspin\esfit.p>runFitting (line 681)
Error while evaluating uicontrol Callback

For the other files with the same system esfit works properly (except error with no scaling).
I override the problem using Sys.weight=-1 where appropriate, but it does not look like good solution.

Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Strange behaviour of esfit during fitting

Post by Stefan Stoll »

Please post the experimental data and the simulated spectrum that give the negative rescaling, and we'll look into this issue.

katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Re: Strange behaviour of esfit during fitting

Post by katarkon »

Sorry, Stefan, the first issue isn't a bug in esfit. Real reason is incorrect units for Exp.Temperature (C instead of K) for custom simulation function. Correction of the temperature units solves the problem.
However, second issue is still actual. Example script basicfit.m with 'no scaling' throws an error

Code: Select all

Undefined function or variable "scalefactor".
Error in C:\easyspin-5.2.30\easyspin\rescale.p>rescale (line 140)
Error in C:\easyspin-5.2.30\easyspin\esfit.p>assess (line 843)
Error in C:\easyspin-5.2.30\easyspin\esfit_simplex.p>esfit_simplex (line 77)
Error in C:\easyspin-5.2.30\easyspin\esfit.p>runFitting (line 681)
Error while evaluating uicontrol Callback

It seems to be a bug.

Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Strange behaviour of esfit during fitting

Post by Stefan Stoll »

Yes, this is a bug, thanks for reporting. It will be fixed in the next patch release, 5.2.31

Post Reply