diff --git a/cal_tools/cal_tools/agipdlib.py b/cal_tools/cal_tools/agipdlib.py index 898aff6dfe213aa72963b04501eb71e32e3f3059..eae027c1317c42e9bba63422ce903318c07c5303 100644 --- a/cal_tools/cal_tools/agipdlib.py +++ b/cal_tools/cal_tools/agipdlib.py @@ -157,7 +157,18 @@ class AgipdCorrections: self.mg_bl_adjust = 0 self.acquisition_rate = acquisition_rate self.valid_indices = None - self.corr_bools = corr_bools + + # check if given corr_bools are correct + tot_corr_bools = ['only_offset', 'pc_corr', 'ff_corr', + 'adjust_mg_baseline', 'do_rel_gain', 'blc_noise', + 'match_asics', 'corr_asic_diag', 'dont_zero_nans', + 'dont_zero_orange'] + + if set(corr_bools).issubset(tot_corr_bools): + self.corr_bools = corr_bools + else: + raise Exception('Correction Booleans: {} are not available!' + .format(list(set(corr_bools) - set(tot_corr_bools)))) def get_iteration_range(self): """Returns a range expression over which to iterate in chunks