Skip to content

[Jungfrau][Correct] Force fixed gain for JF data in burst mode

Karim Ahmed requested to merge feat/get_fixed_gain_constant_for_burst into master

Description

This MR addresses this issue https://git.xfel.eu/calibration/planning/-/issues/196

JF corrections in burst mode are only supported when no gain switching occurs. For safety reasons, fixed high gain mode (fixg0) is not allowed in operations, hence operators put the detector into dynamic gain under the assumption detector illumination is low enough that all (relevant) pixels remain in high gain automatically.

Unfortunately it is easy to forget in this situation to take darks both in fixed gain and dynamic gain, as conceptually the intention is to have fixed high gain. This has caused very old offsets to be used in the past for corrections, leading to poor data quality. For consistency however, the first dark run taken is always in dynamic gain no matter whether dynamic or fixed gain was actually configured in the MDL. Hence, we can use the run taken and injected with fixed gain as the dark run for dynamic gain in burst mode.

For transparency, the gain_mode is read anyway even if it is a burst mode data. And a message is displayed before overwriting the gain_mode value to 1 if data is taken in dynamic gain

How Has This Been Tested?

  • TBD

!Note: Burst mode reference data tests will fail as the tested burst mode runs are in dynamic gain and now different constants will be retrieved.

Relevant Documents (optional)

Types of changes

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

Checklist:

Reviewers

@kluyvert @hammerd

Edited by Karim Ahmed

Merge request reports