Finished basis functionality

This commit is contained in:
sakul-45 2021-07-11 22:59:27 +02:00
parent d79380d2b8
commit ece52240a2

View File

@ -260,7 +260,9 @@ uiwait(fig)
T1 = str2double(get(InpTx,'String'));
T2 = str2double(get(InpTy,'String'));
T3 = str2double(get(InpTz,'String'));
Exp.Temperature = [T1 T2 T3]; %Triplet population
Tsum = T1 + T2 + T3;
T1n = T1/Tsum; T2n = T2/Tsum; T3n = T3/Tsum; %normalize population
Exp.Temperature = [T1n T2n T3n]; %Triplet population
Sys.S = str2double(get(InpS,'String')); % Total Spin
Sys.g = str2double(get(InpG,'String')); % g-value
D = str2double(get(InpD,'String'));
@ -269,7 +271,14 @@ uiwait(fig)
lwGau = str2double(get(InpGauss,'String'));
lwLor = str2double(get(InpLor,'String'));
Sys.lw = [lwGau lwLor]; % mT, linewidth needs to be optimised
%perform a simulation with the parameters above
[bfield,spec] = pepper(Sys,Exp);
spec_norm = spec/max(spec); % normalize the simulation
%plot result
plot(ax,0.1*params.Field_Vector,params.max_mean,'r',...
bfield,spec_norm,'b','LineWidth',1.2)
legend('experimental','simulation')
axis tight
end
function PreSimDoneButtonPushed(src,event)