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
esfit problem with the 6.0.0-dev.19 version
-
- 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
Please attach you data files as well so we can reproduce this.
Re: esfit problem with the 6.0.0-dev.19 version
I cannot attach the .spc file because it has an invalid extension.
May I can send it by email?
May I can send it by email?
-
- 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
Please try again. We corrected the attachment settings.
Re: esfit problem with the 6.0.0-dev.19 version
Thank you Stefan!
I attach the .spc file
I attach the .spc file
- Attachments
-
- Cu_CHA1_25db_10G_70K_baseline.spc
- (23.44 KiB) Downloaded 500 times
-
- 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
The .par file is needed as well.
Re: esfit problem with the 6.0.0-dev.19 version
Sorry for the late reply.
Here it is!
Thank you for your help
Here it is!
Thank you for your help
- Attachments
-
- Cu_CHA1_25db_10G_70K_baseline.par
- (360 Bytes) Downloaded 505 times
-
- 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
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.Re: esfit problem with the 6.0.0-dev.19 version
Thank you very much for your help!
Re: esfit problem with the 6.0.0-dev.19 version
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:
Update: Actually the same holds for all other errors that used to come with a description and the line number where they occurred.
In doing a minimization of line widths, the fitting starts normally, but at some point dev10 throws an error:
In turn, with dev20 the error (for the same code and data) is:Error using pepper
Lorentzian linewidth is smaller than increment - cannot perform convolution.
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.Undefined function or variable 'out'.
Update: Actually the same holds for all other errors that used to come with a description and the line number where they occurred.