Draft: [LPD][JUNGFRAU][CORRECT] Avoid reading INDEX/timestamp for dataFormatVersion 0.5
This bug was identified while correcting old LPD run from proposal 900113.
Description
Avoid reading INDEX/timestamp
for dataFormatVersion
= '0.5'
.
This bug is expected only for old RAW data.
How Has This Been Tested?
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
Reviewers
Merge request reports
Activity
https://git.xfel.eu/detectors/pycalibration/-/blob/master/src/cal_tools/files.py#L305
md_group.create_dataset('dataFormatVersion', shape=(1,), data=b'1.2')
What shall the
dataFormatVersion
be in that case? Still 1.2? I guess this is a differentdataFormatVersion
compared to the RAW data one? As I see this was hard coded
I understand the problem, but I'm not happy with the solution. Notebooks should not care for such things as format versions, it re-introduces the mess of manual file writing we tried to get rid of with EXtra-data. This particular code section is unfortunately itself not a proud example of doing this.
Given this exact same problem will happen in most notebooks that do not write data en-bloc, we should use the
DataFile
API to hide it, it's what it was meant to be. I will mess around with a different approach.mentioned in merge request !752 (merged)
Closing this MR, as there is a more optimal fix available to review at https://git.xfel.eu/detectors/pycalibration/-/merge_requests/752/diffs
Edited by Karim Ahmed