Skip to content
Snippets Groups Projects

Draft: use as_single_value for temperature

Merged Karim Ahmed requested to merge feat/epix_temp_expected_tolerance into master
2 unresolved threads

This MR is related to https://git.xfel.eu/detectors/pycalibration/-/issues/62

Description

Adding a tolerance for backTemp value which is used as a condition for constant. This will help in using as_single_Value and avoid any unexpected and hidden issues.

How Has This Been Tested?

Relevant Documents (optional)

Types of changes

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

Checklist:

  • To confirm that the shape change for backTemp is expected

Screenshot_from_2022-09-01_09-59-09

Screenshot_from_2022-09-01_09-59-02

Reviewers

@duarten @kluyvert

Edited by Nuno Duarte

Merge request reports

Checking pipeline status.

Merged by Karim AhmedKarim Ahmed 2 years ago (Sep 7, 2022 8:56am 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
  • Nuno Duarte marked the checklist item To confirm that the shape change for backTemp is expected as completed

    marked the checklist item To confirm that the shape change for backTemp is expected as completed

  • Nuno Duarte marked the checklist item To confirm that the shape change for backTemp is expected as incomplete

    marked the checklist item To confirm that the shape change for backTemp is expected as incomplete

    • I wouldn't say the shape change in backTemp is expected, because I don't know what triggered it. But in both the Correction and the Dark Characterization NBs, we just use np.mean() to calculate the average temperature during the run, so the code works for both shapes

    • Maybe before yes, but as I am trying to use as_single_value this can return different results. A value or an array.

    • Yes, I see. At some point there were changes in the shape of some output ePix100 output variables, I have no idea why, it was actually before I joined. I've had similar trouble getting the sensor size from the .h5 files, which changed from [768,708,1] to [768,708] at some point. I think there's not much to do besides going around this. One idea would be to use .item() after as_single_value, which gives the same result in both cases:

      Screenshot_from_2022-09-06_11-59-28

    • Please register or sign in to reply
  • merged

  • hmmm, this MR was not supposed to be merged. I would assume the button was clicked by mistake.

    What is interesting, is that I don't see the changes in master.

    Edited by Karim Ahmed
    • I've had my share of misclicks, but I think I stayed out of the merge request button on this one. I have no idea what happened.

    • No worries. I will open another MR now with the last changes. Thank you for your previous suggestion on using item()

    • Please register or sign in to reply
Please register or sign in to reply
Loading