Page 1 of 1

Different edfs simulations from esfit and pepper

Posted: Wed Aug 22, 2018 4:06 pm
by kuyung
Hello,
I've been getting different simulated edfs spectra from esfit and pepper simulation using the same parameter. I'm not quite sure what I did wrong, here are the scripts and pictures:
Thanks for your time!
esfit:

Code: Select all

Sys.Nucs = '51V';
Sys.g = [1.9300 1.9166 1.9743];
Sys.A = [298.2152 359.8756 130.6171]; %MHz
Sys.AStrain = [42.4494 32.8162 14.8598];
Sys.lw = [3.0076 0.6431]; % Gaussian Lorentzian broadening
Vary.g = [0.05 0.05 0.05];
Vary.A = [20 20 20];
Vary.AStrain = [30 30 10];
Vary.lw = [1 1]; % £= log10(tcorr/seconds)
Exp.mwFreq = 9.425585;  % GHz
Exp.CenterSweep = [329.6 200];  % mT
Exp.Temperature = 80; % temperature in kelvin
Exp.Harmonic = 0;
esfit('pepper',real(norm_spec),Sys,Vary,Exp);
https://imgur.com/a/m2s8kx8

simulation:

Code: Select all

Sys.Nucs = '51V';
Sys.g = [1.9300 1.9166 1.9743];
Sys.A = [298.2152 359.8756 130.6171]; %MHz
Sys.AStrain = [42.4494 32.8162 14.8598]; %MHz
Sys.lw = [3.0076 0.6431]; % Gaussian Lorentzian broadening mT
Exp.mwFreq = 9.425585;  % GHz
Exp.CenterSweep = [329.6 200];  % mT
Exp.Temperature = 80; % temperature in kelvin
Exp.Harmonic = 0;

[x,y1] = pepper(Sys,Exp);
minVal = min(y1);
maxVal = max(y1);
norm_data = (y1 - minVal)/(maxVal - minVal);
plot(x,norm_data,'LineWidth',1,'Color','b')
hold on
plot(B/10,real(norm_spec),'LineWidth',1)
hold off
%these limits just help you define the size of window it provides%
xlim([280 420]);
ylim([0.0 1]);
https://imgur.com/a/ksqJ9f6

Re: Different edfs simulations from esfit and pepper

Posted: Thu Aug 23, 2018 7:15 am
by Stefan Stoll
Make sure to scale the simulated spectrum the same way you asked esfit to scale it:

Code: Select all

y_sim = rescale(y_sim,y_exp,'lsq0')

Re: Different edfs simulations from esfit and pepper

Posted: Thu Aug 23, 2018 9:32 am
by kuyung
It worked. Thanks again for your help!