Data sometimes not stored for all scan parameters
It can sometimes happen (and I do not know why) that raw data
and meta data
is not stored for all scan parameters. For example this is the exception thrown during GDAC tuning analysis with 50 different GDAC settings:
2018-05-05 10:21:05,403 - [Analysis ] - INFO Calculate S-curve fit start parameters
31%|▎ | 24186/76800 [00:01<00:03, 17222.70it/s]
2018-05-05 10:21:06,832 - [Analysis ] - ERROR Exception during in analysis
Traceback (most recent call last):
File "tune_global_threshold.py", line 121, in analyze
a.analyze_data()
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis.py", line 512, in analyze_data
self._create_additional_hit_data(hist_occ, hist_tot, hist_rel_bcid, hist_scurve, hist_event_status, hist_bcid_error)
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis.py", line 578, in _create_additional_hit_data
self.threshold_map, self.noise_map, self.chi2_map = au.fit_scurves_multithread(hist_scurve, scan_param_range, n_injections=n_injections, invert_x=True)
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis_utils.py", line 972, in fit_scurves_multithread
invert_x=invert_x)
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis_utils.py", line 875, in get_noise
mu1 = y[x > mu].sum()
IndexError: boolean index did not match indexed array along dimension 0; dimension is 44 but corresponding boolean dimension is 50
Traceback (most recent call last):
File "tune_global_threshold.py", line 141, in <module>
print tuning.analyze()
File "tune_global_threshold.py", line 121, in analyze
a.analyze_data()
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis.py", line 512, in analyze_data
self._create_additional_hit_data(hist_occ, hist_tot, hist_rel_bcid, hist_scurve, hist_event_status, hist_bcid_error)
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis.py", line 578, in _create_additional_hit_data
self.threshold_map, self.noise_map, self.chi2_map = au.fit_scurves_multithread(hist_scurve, scan_param_range, n_injections=n_injections, invert_x=True)
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis_utils.py", line 972, in fit_scurves_multithread
invert_x=invert_x)
File "/faust/user/themperek/git/bdaq53/bdaq53/analysis/analysis_utils.py", line 875, in get_noise
mu1 = y[x > mu].sum()
IndexError: boolean index did not match indexed array along dimension 0; dimension is 44 but corresponding boolean dimension is 50
But in the raw data
file only 44 scan parameter IDs are set!
The consequential exception in the data analysis is unrelated, this happens already during data taking.
Edited by David-Leon Pohl