S-bit rate scan analysis
Description
Add a command to gemos
to analyze the results of the sbit rate scans. The command takes as input the files containing the result of the threshold scan (can be for different VFATs and different iterations) and the rate to be accepted to determine the VFAT threshold. The output file contains the thresholds in DAC units for each VFAT.
Example of usage:
poetry run gemos analyze sbit -r 100 /gemdata/sBitRateScan/fed1478-slot07.txt /gemdata/results/sBitRateScan/fed1478-slot07.cfg
Related Issue
How Has This Been Tested?
Tested on the results of a threshold scan taken on a GE2/1 module.
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
-
My code follows the code style of this project. -
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I have read the CONTRIBUTING document. -
I have added tests to cover my changes. -
All new and existing tests passed.
Merge request reports
Activity
- Resolved by Antonello Pellecchia
- Resolved by Laurent Petre
- Resolved by Antonello Pellecchia
- Resolved by Antonello Pellecchia
- Resolved by Antonello Pellecchia
- Resolved by Antonello Pellecchia
added 1 commit
- b843af3c - Redefine threshold to be first value below set rate
added 1 commit
- 1ebe48ab - Redefine threshold to be first value below set rate
- Resolved by Laurent Petre
- Resolved by Laurent Petre
The plotting routine is extremely slow, i.e. tens of minutes for the 144 chambers at p5. Could it be that the same canvas is not being reused?
/afs/cern.ch/user/l/lpetre/GEM/cmsgemonline/cmsgemos-analysis/gemos/analysis/threshold_scan_analysis.py:61: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`ma tplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). thr_scan_fig, thr_scan_axs = plt.subplots(nrows, ncols, figsize=(40, 25))
Also, the plotting cannot be disabled. As we discussed in person, the analysis and plotting should be in different sub-commands:
-
gemos analyze
: analyze the scan, produce the results in text form, but does not produce plots -
gemos plot
: plots the scans and the results if provided
Edit: the plotting routine consumes a huge amount of memory since the figure is never closed (and somehow not garbage collected). One should close the figure after saving it, or, better, re-use the same figure/canvas between iteration and clean it before plotting the new one.
Edited by Laurent Petre -
- Resolved by Laurent Petre