Skip to content

fix: Convert digits and boolean to float and the rest to string

Karim Ahmed requested to merge fix/single_photon_True_considered_zero into master

Description

The issue:

http://max-exfl-cal001.desy.de:8008//gpfs/exfel/exp/FXE/202421/p008116/usr/Reports/r0009/FXE_XAD_G2XES_correct_008116_r0009_240605_032542_535463.pdf

Screenshot_from_2024-06-06_10-56-07

With these conditions, constants with 1 single photons should have been retrieved. But a CC with 0 single photon was retrieved.

  • The hotfix in place is to avoid removing the single photons to boolean in the first place.

On the side I am wondering why are we converting all conditions values to a str in the first place. I think we should properly serialize the condition values instead.

  • Hence, I have added this new function to format_cond and preserve original value types as much as possible.

BTW: if the calcat_interface changes are legit, I will need to update calcat_interface2 and the extra code for the CalibrationDataAPI

How Has This Been Tested?

Relevant Documents (optional)

gh2_single_photon_true.pdf

This report shows that the correct CCV were retrieved.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

Reviewers

@schmidtp @kluyvert

Edited by Karim Ahmed

Merge request reports