esfit problem with the 6.0.0-dev.19 version

A place to report and discuss potential bugs
Cleto
Newbie
Posts: 6
Joined: Thu Dec 26, 2019 3:17 am

esfit problem with the 6.0.0-dev.19 version

Post by Cleto »

Good morning,

I tried to use the "esfit" keyword in my script. Unfortunately, I received the following string as output: "Error using esfit. The simulation function (1st input) must be a function handle" even if I thought the script was ok. Later I tried to run the same script with the previous version (6.0.0-dev.18) and everything worked: the esfit window appeared and I could start the fitting of my parameters. Thus I believe that maybe there is a problem with the last develop version.
I report my script below.

clear all
[x,y,Params] = eprload('/home/paolo/Documenti/CuCHA/Spectra simulations/Cu_CHA_new samples/Cu_CHA 1/Cu_CHA1_25db_10G_70K_baseline.spc')

Sys0.g = [2.087 2.422];
Sys0.lwpp = 2.7;
Sys0.Nucs = 'Cu';
Sys0.A = [37 390];
Sys0.gStrain = [0.012 0.005];
Sys0.AStrain = [19 6];
Sys0.weight = 0.41;
Sys1.g = [2.079 2.385];
Sys1.Nucs = 'Cu';
Sys1.lwpp = 2.7;
Sys1.A = [12 447];
Sys1.gStrain = [0.007 0.019];
Sys1.AStrain = [10 10];
Sys1.weight = 0.59;
Sys0.gAStrainCorr = +1;
Sys1.gAStrainCorr = +1;
Vary0.gStrain = [0.002 0.015];
Vary0.AStrain = [5 5];
Vary0.weight = 0.2;
Vary1.gStrain = [0.04 0.06];
Vary1.AStrain = [30 40];
Vary1.weight = 0.2;
Exp.CenterSweep = [340 200]; %in mT
Exp.mwFreq = 9.420875;
Exp.ModAmp = 0.5; %in mT
Exp.nPoints = 6000;
Exp.Temperature = 70;
[xb,yb] = pepper({Sys0,Sys1},Exp);
sim = yb/max(yb);
B = x/10;
spc = y/max(y);
esfit('pepper',spc,{Sys0,Sys1},{Vary0,Vary1},Exp);

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

Re: esfit problem with the 6.0.0-dev.19 version

Post by Stefan Stoll »

Please attach you data files as well so we can reproduce this.
Cleto
Newbie
Posts: 6
Joined: Thu Dec 26, 2019 3:17 am

Re: esfit problem with the 6.0.0-dev.19 version

Post by Cleto »

I cannot attach the .spc file because it has an invalid extension.
May I can send it by email?
Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: esfit problem with the 6.0.0-dev.19 version

Post by Stefan Stoll »

Please try again. We corrected the attachment settings.
Cleto
Newbie
Posts: 6
Joined: Thu Dec 26, 2019 3:17 am

Re: esfit problem with the 6.0.0-dev.19 version

Post by Cleto »

Thank you Stefan!

I attach the .spc file
Attachments
Cu_CHA1_25db_10G_70K_baseline.spc
(23.44 KiB) Downloaded 500 times
Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: esfit problem with the 6.0.0-dev.19 version

Post by Stefan Stoll »

The .par file is needed as well.
Cleto
Newbie
Posts: 6
Joined: Thu Dec 26, 2019 3:17 am

Re: esfit problem with the 6.0.0-dev.19 version

Post by Cleto »

Sorry for the late reply.
Here it is!

Thank you for your help
Attachments
Cu_CHA1_25db_10G_70K_baseline.par
(360 Bytes) Downloaded 506 times
Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: esfit problem with the 6.0.0-dev.19 version

Post by Stefan Stoll »

Use esfit(@pepper,...) instead of esfit('pepper',...). This is a change in 6.0. It is described in the 6.0 documentation. Keep in mind that 6.0 is not finalized yet, and changes like these can be introduced.
Cleto
Newbie
Posts: 6
Joined: Thu Dec 26, 2019 3:17 am

Re: esfit problem with the 6.0.0-dev.19 version

Post by Cleto »

Thank you very much for your help!
thanasis
Local Expert
Posts: 253
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: esfit problem with the 6.0.0-dev.19 version

Post by thanasis »

Just a small observation from running esfit of versions of 6.0.0-dev10 and 6.0.0-dev20.

In doing a minimization of line widths, the fitting starts normally, but at some point dev10 throws an error:
Error using pepper
Lorentzian linewidth is smaller than increment - cannot perform convolution.
In turn, with dev20 the error (for the same code and data) is:
Undefined function or variable 'out'.
If the source of the error is the same, the dev10 error message is much more informative as to what the user can do to avoid it.

Update: Actually the same holds for all other errors that used to come with a description and the line number where they occurred.
Post Reply