@@ -336,13 +336,16 @@ def ClassBased(self, node: HDFRoot, uncGrp: HDFGroup, stats: dict[str, np.array]
336336 with warnings .catch_warnings ():
337337 warnings .filterwarnings ("ignore" , message = "invalid value encountered in divide" )
338338 # convert to relative in order to avoid a complex unit conversion process in ProcessL2.
339+
339340 ES_unc = es_unc / np .abs (es )
340341 LI_unc = li_unc / np .abs (li )
341342 LT_unc = lt_unc / np .abs (lt )
342343
344+
343345 # interpolation step - bringing uncertainties to common wavebands from radiometric calibration wavebands.
344346 data_wvl = np .asarray (list (stats ['ES' ]['std_Signal_Interpolated' ].keys ()),
345347 dtype = float )
348+
346349 es_Unc = self .interp_common_wvls (ES_unc ,
347350 np .array (uncGrp .getDataset (rad_cal_str ).columns [cal_col_str ],
348351 dtype = float )[ind_rad_wvl ],
@@ -361,7 +364,7 @@ def ClassBased(self, node: HDFRoot, uncGrp: HDFGroup, stats: dict[str, np.array]
361364 data_wvl ,
362365 return_as_dict = True
363366 )
364-
367+
365368 # return uncertainties to ProcessL2 as dictionary - will update xUnc dict with new uncs propagated to L1B
366369 return dict (
367370 esUnc = es_Unc ,
@@ -2269,4 +2272,4 @@ def update_cal_rad(PANEL, S12_sl_corr, LAMP, int_time_t0, t1):
22692272 ind_nocal = ind_nan | ind_zero
22702273 updated_radcal_gain [
22712274 ind_nocal == True ] = 1 # set 1 instead of 0 to perform calibration (otherwise division per 0)
2272- return updated_radcal_gain
2275+ return updated_radcal_gain
0 commit comments