Skip to content
Snippets Groups Projects

[Jungfrau][Correct] Account for missing fixed gain constants when burst mode in dynamic gain

Merged Karim Ahmed requested to merge feat/force_fixed_gain_constants_old_data into master
1 unresolved thread

Description

MID started recorrecting data from October in burst mode. These data were corrected before with dynamic gain constants and no fixed dark constants were taken.

This MR accounts for this by expanding https://git.xfel.eu/calibration/planning/-/issues/196 to force fixed gain constants for burst mode in dynamic gain. Then in case of no available constants check for dynamic gain constants. These constants will be accepted only if they don't have more than 3-day time difference with the RAW data.

  • New functions: jungfrau_cal_mdata and force_fixed_gain_constants
  • Try retrieving fixed gain constants, try retrieving dynamic gain constants if no fixed constants
  • Dont accept dynamic gain constants older than 3 days

How Has This Been Tested?

  • TBD

Relevant Documents (optional)

This is an example of what will happen if the alternative retrieval for dynamic gain constants leads to constants with a time difference greater than 3 days.

Alt Text

This is one of the failed JF runs at MID. As shown, no fixed constants retrieved, so a dynamic constants were retrieved instead and the time difference validated

Alt Text

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

Reviewers

@schmidtp @mramilli @kluyvert

Edited by Karim Ahmed

Merge request reports

Checking pipeline status.

Merged by Karim AhmedKarim Ahmed 1 year ago (Nov 23, 2023 12:03pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
274 322 "\n",
275 323 "# load constants arrays after storing fragment YAML file\n",
276 324 "# and validating constants availability.\n",
277 "const_data = jf_cal.ndarray_map(metadata=jf_metadata)"
325 "const_data = jf_cal.ndarray_map(metadata=jf_metadata)\n",
326 "\n",
327 "# For plotting\n",
328 "da_to_pdu = {}\n",
329 "for mod_info in jf_cal.physical_detector_units.values():\n",
330 " da_to_pdu[mod_info[\"karabo_da\"]] = mod_info[\"physical_name\"]"
  • Thanks, LGTM

  • Author Owner

    Thank you for the review!

  • merged

  • Karim Ahmed mentioned in commit dee3590a

    mentioned in commit dee3590a

  • Please register or sign in to reply
    Loading