esfit problem with the 6.0.0-dev.19 version
Posted: Fri Jan 10, 2020 4:48 am
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
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