[AGIPD] [Correct Summary] Make use of karabo_id to only load data from that detector
Description
Fixes https://git.xfel.eu/gitlab/detectors/calibration_workshop/issues/225 :
The matching pattern '*/DET/*
is too comprehensive, and there's a suggestion to change it to karabo_id + '/DET/*'
to only match for the detector in question.
Therefore, all usages of get_trains_data
had to be updated to add the karabo_id
as a parameter, replacing the unused path='*/DET/*'
.
How Has This Been Tested?
This was tested by adding the following in a new cell, which is a distillation of the content of the notebook's cell here:
out_folder = "/gpfs/exfel/d/proc/SPB/202031/p900145/r0881"
sequences = None
nmods = 16
include = '*S00000*' if sequences is None else f'*S{sequences[0]:05d}*'
karabo_id = "SPB_DET_AGIPD1M-1"
tid, corrected = get_trains_data(f'{out_folder}/', 'image.data', include, karabo_id, modules=nmods)
assert tid == 851711810
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- My code follows the code style of this project.
- I have updated the documentation accordingly.
Reviewers
Merge request reports
Activity
- Resolved by Cyril Danilevski
I've added a check to raise a
ValueError
when no data is available. The aim to highlight this case in the report.Sadly, it's a bit hidden in the changelog, so I've added a note.
Edit: see here
Edited by Cyril Danilevskimentioned in commit 3e1233e1
mentioned in merge request !407 (merged)