Skip to content
Snippets Groups Projects

[Jungfrau] New condition exposure timout

Merged Karim Ahmed requested to merge feat/new_jungfrau_exposure_timer into master
3 unresolved threads

Description

This is a draft for now as it is rebased on the under-review MR for injecting dark CCVs

This addresses new condition for Jungfrau Exposure Timout

How Has This Been Tested?

  • Reference runs

Relevant Documents (optional)

Types of changes

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

Checklist:

Reviewers

@schmidtp @mramilli

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
1035 1037 if int(cond.get("Gain mode", -1)) == 0:
1036 1038 del cond["Gain mode"]
1037 1039
1040 # Fix-up some database quirks.
1041 if int(cond.get("Exposure timer", -1)) == 0:
  • Beautiful small diff with the new API(s), thanks!

    Looking at this, it's quite clear the next step should be to use the condition data classes from the start to track control parameters, with a nice .from_data() method. But that's for the future.

    LGTM pending the underlying functionality MR.

  • Karim Ahmed added 55 commits

    added 55 commits

    • 5d8c2a82...1b2a1192 - 47 commits from branch feat/remove_calibrationDBRemote_usage
    • 11de28b3 - fix: small fixes after testing part of injecting ccvs
    • 0001ae79 - fix: handle CCVAlreadyInject case using a warning
    • cd3a8ae2 - fix: Add a partial convenient CCVAlreadyInjectedError for now in this implementation
    • fe25c2b6 - feat: second round of resolving discussions
    • 2d924bd8 - draft: adding new exposure_timer for jungfrau correct/dark notebooks
    • 097022a0 - feat: update name and datasource to check before testing
    • e1a1024d - fix: update calcat_interface and test and make sure new condition is still backward compatabile
    • e2fcce03 - fix: update test_calcat_interface

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • cd96c8ab - fix: remove redundant extra_calibration_client

    Compare with previous version

  • Karim Ahmed deleted the feat/remove_calibrationDBRemote_usage branch. This merge request now targets the master branch

    deleted the feat/remove_calibrationDBRemote_usage branch. This merge request now targets the master branch

  • Karim Ahmed marked this merge request as ready

    marked this merge request as ready

  • Philipp Schmidt changed milestone to %3.15.2

    changed milestone to %3.15.2

  • Karim Ahmed changed title from Feat/new jungfrau exposure timer to [Jungfrau] New condition exposure timout

    changed title from Feat/new jungfrau exposure timer to [Jungfrau] New condition exposure timout

  • Karim Ahmed changed the description

    changed the description

  • Karim Ahmed added 40 commits

    added 40 commits

    • cd96c8ab...9012640a - 30 commits from branch master
    • c2e75a3f - fix: small fixes after testing part of injecting ccvs
    • e033ccc3 - fix: handle CCVAlreadyInject case using a warning
    • ebdfae5a - fix: Add a partial convenient CCVAlreadyInjectedError for now in this implementation
    • 8c9c5186 - feat: second round of resolving discussions
    • 93958cf9 - draft: adding new exposure_timer for jungfrau correct/dark notebooks
    • 3afea677 - feat: update name and datasource to check before testing
    • 3f2ce112 - fix: update calcat_interface and test and make sure new condition is still backward compatabile
    • ca62ac47 - fix: update test_calcat_interface
    • 3c939a57 - fix: remove redundant extra_calibration_client
    • 962a490f - Exxposure timeout instead of Exposure timer

    Compare with previous version

  • Karim Ahmed marked this merge request as draft from 93958cf9

    marked this merge request as draft from 93958cf9

  • Karim Ahmed marked this merge request as ready

    marked this merge request as ready

  • I have updated the condition name to exposure timeout

  • Karim Ahmed added 1 commit

    added 1 commit

    • 873ff5ae - have 25 as default exposure timeout for bacward compatibility

    Compare with previous version

  • Karim Ahmed changed the description

    changed the description

  • Just to confirm again from @mramilli , the property to introduce as a new parameter is:

    • exposureTimeout
    • default value: 25 ns (which is not injected)
  • 1044 1046 if int(cond.get("Gain mode", -1)) == 0:
    1045 1047 del cond["Gain mode"]
    1046 1048
    1049 # Fix-up some database quirks.
    1050 if int(cond.get("Exposure timeout", -1)) == 25:
    • I was about to comment on this for not triggering when it's missing... until I realized naturally you'd not want to remove it in this case. As it happens, this is actually a bug in !1089 (merged)!

    • So, I copy pasted this without thinking much about it. But now when you have mentioned it. I guess we should do

      if int(cond.get("Exposure timeout", 25)) == 25

      This will avoid using -1 if exposure timeout is missing correct?

    • Quite the opposite: if Exposure timeout is not a key in the dict, it would return 25, the branch evaluates to True and it'd try to delete the key throwing an exception.

      This is rarely a problem if said parameter is part of all conditions, but it could be. So your way is the correct way.

    • Ah, an alternative would be to do cond.pop() with a default value

    • Please register or sign in to reply
  • Thank you for the review!

  • merged

  • Karim Ahmed mentioned in commit 70533b02

    mentioned in commit 70533b02

  • Thomas Kluyver mentioned in merge request !1096 (merged)

    mentioned in merge request !1096 (merged)

  • Please register or sign in to reply
    Loading