Skip to content
Snippets Groups Projects

Reset calibration_metadata.yml before saving the initial calibration metadata

Merged Karim Ahmed requested to merge fix/saving_malformed_calibration_metadata_yml into master

There was a reported issue for multiple dark processing that the second dark request for AGIPD fails.

I faced the same issue last days while testing for our next deployment for LPD, DSSC and AGIPD.

Description

When there is a dark request we create a new calibration_metadata.yml file. At the end of DSSC, LPD and AGIPD dark processing a key for modules-mapping is added by Overallmodules_darks_summary notebook.

After reprocessing again the same run using the same out-folder the calibration_metadata.yml file is not created properly.

https://git.xfel.eu/detectors/pycalibration/-/blob/master/src/xfel_calibrate/calibrate.py#L659

I don't really understand why this issue happening even though we are using "w" while create the yml file.

https://git.xfel.eu/detectors/pycalibration/-/blob/master/src/cal_tools/tools.py#L794

This is just a fix to reset the file and save the empty initialized dict before saving the metadata from calibrate.py. Until I understand more why this happens.

How Has This Been Tested?

Relevant Documents (optional)

I have added the malformed yml files. Line 84 is the line with the issue.

calibration_metadata_dssc.yml

calibration_metadata_lpd.yml

Types of changes

Checklist:

  • Add a comment pointing to this discussion before merging

Reviewers

@kluyvert @schmidtp

Edited by Karim Ahmed

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading