Error with "-p warning" argument in the "gemos analyze dac" command
Description
Trying to run the dac scan analysis (gemos analyze dac
) with the optional argument -p warning
causes an error such as the following:
.
.
.
File "/afs/cern.ch/user/d/destrada/private/cmsgemos-analysis/gemos/analysis/dac_scan_analysis.py", line 229, in create_configuration
plot_scan(input_df, output_df, output_dir / "plots")
File "/afs/cern.ch/user/d/destrada/private/cmsgemos-analysis/gemos/analysis/dac_scan_analysis.py", line 168, in plot_scan
dac_scan_axs[group_index].plot(
.
.
.
ValueError: setting an array element with a sequence
Steps to reproduce
Taking as input files those available in /afs/cern.ch/work/c/cgalloni/public/4Yechan/
the command would be:
gemos analyze dac 4Yechan/dacScan/*.txt test_out/ -m 4Yechan/vfat_map.dat -c 4Yechan/vfat_calibration.txt -p warning
Possible fixes
When -p warning
argument is passed, the data are filtered before to perform the plots (dac_scan_analysis.py-line 211). So, the problem may be here.
The error appears in dac_scan_analysis.py-line 168, because chousen_dac
is not a single value but a list, that does not happen when the data are not filtered.