I have one question regarding the fitting procedure in EasySpin:
Is there any kind of normalisation or scaling of the y axis carried out before the fitting? I did not find any clue that there is one in the documentation, but I noticed when I fitted a spectrum, obtaining good results and then using the same parameters to simulate the spectrum with pepper and plotting it, that the simulation gave me a much larger signal. I have attached two pictures of the fitting window and the result of the pepper simulation, as well as my code.
What am I making wrong?
Thank you!
Best regards,
Felix
My code:
Code: Select all
clear
% load data
[index fieldQ12Cu2Plus intensityQ12Cu2Plus] = textread('LK051404.006', '%u %f %f', 'headerlines', 1);
[intensityQ12Cu2Plus BlineQ12Cu2Plus] = normalise( intensityQ12Cu2Plus);
[index fieldMn12Cu2Plus intensityMn12Cu2Plus] = textread('LK051104.001', '%u %f %f', 'headerlines', 1);
[intensityMn12Cu2Plus BlineMn12Cu2Plus] = normalise( intensityMn12Cu2Plus);
intensity = intensityMn12Cu2Plus - intensityQ12Cu2Plus;
intensity = intensity*(-1);
field = fieldQ12Cu2Plus/10;
zoomStart = 570;
zoomEnd = 853;
g2 = [ 2.2676 2.0358 2.0642];
A2 = [520.0056 1.1631 12.0101];
lwpp = 3.3096;
Exp2 = struct('mwFreq', 9.5, 'Range', [ field(1) field(end) ], 'nPoints', length(field));
Sys2 = struct('S',1/2,'g', g2, 'lwpp', lwpp);
Sys2 = nucspinadd(Sys2,'63Cu', A2);
Exp3 = struct('mwFreq', 9.5, 'Range', [ field(zoomStart) field(zoomEnd) ], 'nPoints', length(field(zoomStart:zoomEnd)));
[x3 y3]= pepper(Sys2, Exp3);
%With normalising the simulation results are looking as in the
%fitting window.
y3 = y3 / (max(y3) - min(y3));
Vary = struct('lwpp', 0.5, 'g', [0.05 0.05 0.05], 'A', [30 30 30]);
esfit('pepper', intensity(zoomStart:zoomEnd), Sys2, Vary, Exp3);
figure
plot(x3,y3, '-r', field(zoomStart:zoomEnd), intensity(zoomStart:zoomEnd),'-b');
legend('fit','data');
title('Zoom');
xlabel('Magnetic Field [mT]');
ylabel('Intensity [a. u.]');
grid on