Hello!
I have been working with Easyspin for awhile now and with the update to easyspin 6 my previous simulation code no longer converges for several of my EPR spectra. I have updated to the new syntax of esfit and chili, but the simulation times have increased and some simulations do not converge, especially at low temperatures. My thought is that I might need to adjust my LLMK, but those values worked previously before the easyspin 6 update.
New code (Easyspin 6 update):
B1=B/10;
expSpc=EPRSpec_240_up; % spectrum file
Params=Params_EPRSpec_240_up; % parameters file
%
Sys1.g=[2.0120 2.0130 2.0073];
Sys1.Nucs='14N';
Sys1.A=[20.9 19.26 103.2];
Sys1.weight=0.51412; %
Sys1.lw=0.78; %
Sys1.logtcorr=-7.8282; %
%
Sys2.g=[2.0120 2.0130 2.0073];
Sys2.Nucs='14N';
Sys2.A=[20.9 19.26 103.2];
Sys2.weight=1 - Sys1.weight; %
Sys2.lw=0.34182; %
Sys2.logtcorr=-8.6787; %
%
Sys = {Sys1,Sys2};
% Enter experimental parameters
Exp.mwFreq =9.5186; % units: GHz
Exp.Range = [331.83 345.83]; % No correction: [332.3 346.3]; Field correction is -4.7 Gauss= -0.47 mT
Exp.ModAmp = 0.2;% units, mT
Exp.Temperature = 240; % units, K
%
% Enter simulation vary & fix constant info (# entry is ± range; fix=0)
Vary1.g=[0 0 0];
Vary1.A=[0 0 0];
Vary1.weight=0.1;
Vary1.lw=0.1;
Vary1.logtcorr=0.1;
%
Vary2.g=[0 0 0];
Vary2.A=[0 0 0];
Vary2.weight=0.1;
Vary2.lw=0.05;
Vary2.logtcorr=0.1;
Vary = {Vary1, Vary2};
%
Opt.LLMK=[28,15,4,12]; % Previously it was [28 14 12 4] but Lodd does not seem to accept even numbers anymore and the M and K switched places
FitOpt.Method = 'simplex fcn'; % If I try to run just fcn, the simulation crashes unless I type an algorithm keyword
% Run simulation
BestSys=esfit(expSpc, @chili,{Sys,Exp,Opt},{Vary},FitOpt);
Previous code (everything else the same except for the last few lines):
Options.LLKM=[28,14,12,4];
FitOpt.Method = 'fcn'; % I did not have to specify the algorithm previously
% Run simulation
[BestSys,BestSpc]=esfit('chili',expSpc,{Sys1,Sys2},{Vary1,Vary2},Exp,Options,FitOpt);
If you have any ideas, please let me know!