Skip to content
Snippets Groups Projects
Commit e68b94e3 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

valueErr if wrong bool key is given

parent d09fdfd2
No related branches found
No related tags found
1 merge request!200Feat/only offset
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment