@@ -134,19 +134,22 @@ def fit_and_plot(self):
134134
135135 if self .ui .subtract_bck_checkBox .isChecked () == False :
136136 self .ui .result_textBrowser .setText ("You need to check the subtract background option!" )
137+
138+ elif self .wlref_file != None and self .ui .WLRef_checkBox .isChecked () == False :
139+ self .ui .result_textBrowser .setText ("You need to check the White Light Correction option!" )
137140
138141 else :
139142 if fit_func == "Single Gaussian" and self .ui .subtract_bck_checkBox .isChecked () == True :
140143
141- single_gauss = Single_Gaussian (self .file , self .bck_file )
144+ single_gauss = Single_Gaussian (self .file , self .bck_file , wlref = self . wlref_file )
142145 self .result = single_gauss .gaussian_model ()
143146 self .ui .plot .plot (self .x , self .y , clear = True , pen = 'r' )
144147 self .ui .plot .plot (self .x , self .result .best_fit , clear = False , pen = 'k' )
145148 self .ui .result_textBrowser .setText (self .result .fit_report ())
146149
147150 elif fit_func == "Single Lorentzian" and self .ui .subtract_bck_checkBox .isChecked () == True :
148151
149- single_lorentzian = Single_Lorentzian (self .file , self .bck_file )
152+ single_lorentzian = Single_Lorentzian (self .file , self .bck_file , wlref = self . wlref_file )
150153 self .result = single_lorentzian .lorentzian_model ()
151154 self .ui .plot .plot (self .x , self .y , clear = True , pen = 'r' )
152155 self .ui .plot .plot (self .x , self .result .best_fit , clear = False , pen = 'k' )
0 commit comments