fix key error modules_mappings
Description
It seems that I merged the latest fix for the summary reports with a key error bug.
This is a hotfix for it on top of 3.2.3 tag.
How Has This Been Tested?
Locally:
xfel-calibrate agipd DARK \
--cal-db-interface tcp://max-exfl016:8015#8044 \
--concurrency-par karabo_da \
--karabo-da AGIPD00 AGIPD01 AGIPD02 AGIPD03 AGIPD04 \
AGIPD05 AGIPD06 AGIPD07 AGIPD08 AGIPD09 AGIPD10 \
AGIPD11 AGIPD12 AGIPD13 AGIPD14 AGIPD15 \
--receiver-id {}CH0 --karabo-id-control SPB_IRU_AGIPD1M1 \
--karabo-da-control AGIPD1MCTRL00 \
--h5path-ctrl /CONTROL/{}/MDL/FPGA_COMP \
--mem-cells 0 --thresholds-offset-hard 0 0 \
--thresholds-offset-hard-hg 3500 6000 \
--thresholds-offset-hard-mg 3500 9000 \
--thresholds-offset-hard-lg 3500 9000 \
--in-folder /gpfs/exfel/exp/SPB/202130/p900188/raw \
--out-folder /gpfs/exfel/data/scratch/ahmedk/test/fixed_gain/SPB_summary_fix2 \
--karabo-id SPB_DET_AGIPD1M-1 \
--operation-mode ADAPTIVE_GAIN \
--run-high 302 --run-med 303 --run-low 304
AGIPDCharacterizeDarkImages.pdf
on xcal@max-exfl016: http://max-exfl016:8008//gpfs/exfel/d/cal/caldb_store/xfel/reports/SPB/SPB_DET_AGIPD1M-1/dark/dark_002932_r46_r47_r48_210412_122200.pdf
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- My code follows the code style of this project.
Reviewers
Merge request reports
Activity
Make sure to fill the checklist of tests after deployment as we always do. I think we already have what we need to avoid this. This is a mistake from my side. That I haven't double-checked the production reports to fill the test checklist for the latest deployed tag 3.2.3
Edited by Karim Ahmed
- Resolved by Thomas Kluyver
Where does the YAML come from? The code I can see in
Characterize_AGIPD_Gain_Darks_NBC.ipynb
looks it saves it with a key"module_mapping"
(underscore, nos
).
- Resolved by Karim Ahmed
I've also just noticed a potential error on this line (just after this change):
if qm not in metadata["modules_mapping"].keys() and metadata["modules_mapping"][qm]:
It looks like if the first test is True, qm is not a key, so the second test will always throw KeyError. It works only where all modules are found, unless I'm missing something.
Edited by Thomas Kluyver
- Resolved by Karim Ahmed
- Resolved by Karim Ahmed
If there are no further comments @kluyvert I will merge and deploy 3.2.4 on xcal@max-exfl016
Edited by Karim Ahmedmentioned in commit 7b94c17a