Added warning for Triplett population fit boundary < 0
This commit is contained in:
parent
cc1f3ab4f6
commit
8645de60d6
@ -329,14 +329,20 @@ uiwait(fig)
|
|||||||
%get previous simulation parameters (manual or saved)
|
%get previous simulation parameters (manual or saved)
|
||||||
Sys0 = eventdata.simSys;
|
Sys0 = eventdata.simSys;
|
||||||
Exp0 = eventdata.simExp;
|
Exp0 = eventdata.simExp;
|
||||||
|
%check if Temperature can run into negative
|
||||||
|
for nT = 1:3
|
||||||
|
if Sys0.Temperature(nT) - Vary.Temperature(nT) < 0
|
||||||
|
warndlg('Triplett population boundary < 0!','Warning');
|
||||||
|
end
|
||||||
|
end
|
||||||
%perform fit
|
%perform fit
|
||||||
[BestSys,BestSpc] = esfit('thyme',params.max_mean,Sys0,Vary,Exp0,[],FitOpt);
|
[BestSys,BestSpc] = esfit('thyme',params.max_mean,Sys0,Vary,Exp0,[],FitOpt);
|
||||||
plot(ax,0.1*params.Field_Vector,params.max_mean,'r',...
|
plot(ax,0.1*params.Field_Vector,params.max_mean,'r',...
|
||||||
0.1*params.Field_Vector,BestSpc,'b','LineWidth',1.2)
|
0.1*params.Field_Vector,BestSpc,'b','LineWidth',1.2);
|
||||||
xlabel 'Magnetic Field / mT'
|
xlabel(ax,'Magnetic Field / mT');
|
||||||
ylabel 'EPR signal / A. U.'
|
ylabel(ax,'EPR signal / A. U.');
|
||||||
legend('experimental','simulation')
|
legend(ax,'experimental','simulation');
|
||||||
axis tight
|
axis(ax,'tight');
|
||||||
%normalize Triplett population
|
%normalize Triplett population
|
||||||
Tsum = sum(BestSys.Temperature);
|
Tsum = sum(BestSys.Temperature);
|
||||||
BestSys.Temperature = BestSys.Temperature ./ Tsum;
|
BestSys.Temperature = BestSys.Temperature ./ Tsum;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user