Esfit- pepper discrepancies

General forum for EasySpin: questions, how to's, etc.
Post Reply
Jurec IRB
Newbie
Posts: 1
Joined: Fri Dec 01, 2017 12:48 am

Esfit- pepper discrepancies

Post by Jurec IRB »

Hey, sorry for bothering you. I'm PhD student for Zagreb, Croatia (IRB) and I am using the latest version of easyspin (5.2.11.).
I have a problem and I hope you will give me some kind of advice how to fix it.
I have experimental data that I fitted a couple of months ago using esfit in easyspin. I've got pretty good match with experiment but when I use that data (from esfit that match the experiment) with pepper I am getting some kind of discrepancies.
Basically, I am using the same values of g, A, AFrame, weight and lwpp, same experimental frequency, range and number of points, and I get pretty good match with experiment using this data with esfit. But when I try to plot this with pepper I am getting different picture.
What am I doing wrong?

Code: Select all

clear, clf
[B,spc] =textread('/Users/Jurica/Desktop/TREHALOZA/xband/01250315bl.txt');
B=B/10.; %militesle!
Sys.S = 1/2;
Exp.mwFreq =9.6415;
Exp.Range = [339.23 349.23];
Exp.Harmonic = 1;
Exp.nPoints=1024;

Sys1.g = [2.00617 2.00447 2.00221];
Sys1.Nucs = '1H,1H,1H';
Sys1.A = [59.77 72.92 67.72; 9.33 11.36 12.0757; 33.8556 -6.094 5.26];
Sys1.AFrame = [188.17 89.95 97.30; -62.85 -7.53 -109.76; 172.15 -25.08 73.23]*pi/180;
Sys1.lwpp = [1.64286];
Sys1.weight = 1.225;
Vary1.lwpp = [0.00001];

Sys2.g = [2.00694 2.00388 2.00232];
Sys2.Nucs = '1H,1H,1H';
Sys2.A =[34.534 40.20 -3.102; 3.925 -5.2213 11.337; 16.077 12.74 16.65];
Sys2.AFrame = [90.41 -112.83 89.84 ; 89.85 111.22 0.68; -6.45 90.95 -9.20]*pi/180;
Sys2.lwpp = [0.533639];
Sys2.weight = 1.40205;
Vary2.lwpp = [0.00001];

Sys3.g = [2.00586 2.00508 2.00211];
Sys3.Nucs = '1H,1H,1H';
Sys3.A =[67.81 51.7389 12.743; 11.96 8.9889 0.11; 17.32 -17.4202 35.2535];
Sys3.AFrame = [276.27 81.36 91.91; 15.69 64.92 39.79; 23.03 74.67 -6.97]*pi/180;
Sys3.lwpp = [1.88387];
Sys3.weight = 0.32304;
Vary3.lwpp = [0.00001];

%FIRST
Opt = struct('Verbosity',1);
Opt.nKnots = 91;       % increments, no interpolation
SimOpt.Method = 'perturb';
FitOpt.Method = 'simplex int';

esfit('pepper',spc,{Sys1,Sys2,Sys3},{Vary1,Vary2,Vary3},Exp,SimOpt,FitOpt);


%SECOND
[x,y1]=pepper(Sys1,Exp); 
[x,y2]=pepper(Sys2,Exp);
[x,y3]=pepper(Sys3,Exp);
[x,y4]=pepper({Sys1,Sys2,Sys3},Exp);

E = plot(B,(spc/max(spc)),'r');
hold on;
S1 = plot(x,(y4/max(y4)),'b');

title(sprintf('glass additonally heated at 90C, %g GHz',Exp.mwFreq));
xlabel ('magnetic field [mT]');
legend ('exp','sum'); 
Image
Image

Edit: Notice how green line follows the black dots in 1st picture but in second one the blue line doesn't follow the red experimental data.
Shouldn't the green line (in 1st) and blue line (in 2nd) be the same because they are plotted from same parameters?

And excuse my abuse of english language. English is my second language.
Stefan Stoll
EasySpin Creator
Posts: 1041
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Esfit- pepper discrepancies

Post by Stefan Stoll »

It looks like you are using 'perturb' for the fitting, but not for the simulation.
Post Reply