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) | ||||
|         Sys0 = eventdata.simSys; | ||||
|         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 | ||||
|         [BestSys,BestSpc] = esfit('thyme',params.max_mean,Sys0,Vary,Exp0,[],FitOpt); | ||||
|         plot(ax,0.1*params.Field_Vector,params.max_mean,'r',... | ||||
|                 0.1*params.Field_Vector,BestSpc,'b','LineWidth',1.2) | ||||
|         xlabel 'Magnetic Field / mT' | ||||
|         ylabel 'EPR signal / A. U.' | ||||
|         legend('experimental','simulation') | ||||
|         axis tight | ||||
|                 0.1*params.Field_Vector,BestSpc,'b','LineWidth',1.2); | ||||
|         xlabel(ax,'Magnetic Field / mT'); | ||||
|         ylabel(ax,'EPR signal / A. U.'); | ||||
|         legend(ax,'experimental','simulation'); | ||||
|         axis(ax,'tight'); | ||||
|         %normalize Triplett population | ||||
|         Tsum = sum(BestSys.Temperature); | ||||
|         BestSys.Temperature = BestSys.Temperature ./ Tsum; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user