@@ -14,7 +14,7 @@ class Fitter:
1414 """
1515 Fitter class for executing the fitting functions and optimizations
1616
17- # TODO implement sensing of spectrum for Si samples
17+ IDEA: implement sensing of spectrum for Si samples
1818 """
1919
2020 fit_windows = ["1st_order" , "2nd_order" ]
@@ -48,7 +48,7 @@ def spectra(self, value):
4848 _fit_lbl = "int"
4949 elif isinstance (value , pd .DataFrame ):
5050 raise AttributeError
51- # TODO implement self.sense_windowname(value)
51+ # IDEA implement self.sense_windowname(value)
5252 else :
5353 raise ValueError (_errtxt )
5454
@@ -112,7 +112,7 @@ def fit_models(self, model_selection):
112112 self .FitResults .update (** _fittings )
113113
114114 def run_fit (self , model , _data , method = "leastsq" , ** kws ):
115- # TODO improve fitting loop so that starting parameters from modelX and modelX+Si are shared, faster...
115+ # ideas: improve fitting loop so that starting parameters from modelX and modelX+Si are shared, faster...
116116 _fit_res , _param_res = {}, {}
117117 init_params = model .make_params ()
118118 x , y = _data .ramanshift , _data [kws .get ("_int_lbl" )]
@@ -131,7 +131,7 @@ def run_fit(self, model, _data, method="leastsq", **kws):
131131 def get_int_label (self , value ):
132132 _lbl = ""
133133 if isinstance (value , pd .DataFrame ):
134- cols = [i for i in value .columns if not "ramanshift" in i ]
134+ cols = [i for i in value .columns if "ramanshift" not in i ]
135135 if len (cols ) == 0 :
136136 _lbl = ""
137137 if len (cols ) == 1 :
@@ -206,15 +206,10 @@ def model_result(self, value):
206206 _mod_lbl = f'Model_{ getattr (value ,"_modelname" )} '
207207 self .model_name_lbl = _mod_lbl
208208
209- # TODO remove
210- # from pprint import pprint
211- # print('===== /n',value._int_lbl,'/n')
212-
213209 self .raw_data_lbl = value ._int_lbl
214210
215211 self ._model_result = value
216212
217- # TODO rewrite class and attirbuter setter
218213 self .make_result ()
219214
220215 def make_result (self ):
@@ -335,7 +330,7 @@ def prep_components(self):
335330 _fit_comps_data = OrderedDict ({"RamanShift" : self .model_result .userkws ["x" ]})
336331 _fit_comps_data .update (self .model_result .eval_components ())
337332
338- # TODO take out
333+ # IDEA take out
339334 # print('===/n',self.model_result, '/n')
340335 # print('===/n',self.model_result.__dict__.keys(), '/n')
341336
@@ -344,7 +339,6 @@ def prep_components(self):
344339 {
345340 self .model_name_lbl : self .model_result .best_fit ,
346341 "residuals" : self .model_result .residual ,
347- # TODO check attributes of model_result
348342 self .model_result ._int_lbl : self .model_result .data ,
349343 }
350344 )
@@ -353,7 +347,7 @@ def prep_components(self):
353347
354348
355349def NormalizeFit (norm_cleaner , plotprint = False ): # pragma: no cover
356- # TODO optional add normalization seperately to Fitter
350+ # IDEA: optional add normalization seperately to Fitter
357351 x , y = norm_cleaner .spec .ramanshift , norm_cleaner .blcorr_desp_intensity
358352 Model = InitializeModels ("2peaks normalization Lorentzian" )
359353 params = Model .make_params ()
0 commit comments