diff --git a/pre_simulation_TREPR.m b/pre_simulation_TREPR.m index 58627ad..e2a9c4c 100644 --- a/pre_simulation_TREPR.m +++ b/pre_simulation_TREPR.m @@ -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)