Skip to content

Add scaler card device for i09#2073

Open
oliwenmandiamond wants to merge 17 commits into
mainfrom
scalar_card
Open

Add scaler card device for i09#2073
oliwenmandiamond wants to merge 17 commits into
mainfrom
scalar_card

Conversation

@oliwenmandiamond

Copy link
Copy Markdown
Contributor

Add i09 scaler card devices for i09. GDA equivalent devices are EpicsScalerSimple.

Instructions to reviewer on how to test:

  1. Check tests pass
  2. Check dodal connect

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@oliwenmandiamond oliwenmandiamond requested a review from a team as a code owner May 27, 2026 14:26
@oliwenmandiamond

Copy link
Copy Markdown
Contributor Author

Note: Unfortunately cannot check dodal connect at the moment due to devices being disconnected.

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (50b24b2) to head (bfdb489).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2073    +/-   ##
========================================
  Coverage   99.13%   99.14%            
========================================
  Files         340      343     +3     
  Lines       13255    13365   +110     
========================================
+ Hits        13141    13251   +110     
  Misses        114      114            

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Relm-Arrowny

Copy link
Copy Markdown
Contributor

I'm not 100% sure what the best course of action is, but it looks like the this is Struck Scaler we use around MMG. We may want to extract the scaler card out of there while we are at it.

I worked on this a while back and have a few changes I like to add. Eventually, I want to create a StruckScaler class that includes all channels. Since triggering once captures all channels for "free," it makes sense to expose them. I have a specific use case where four detectors run on the same scaler card with current amplier, so we only want to trigger once per collection/autoscaling and collect everything.

P.S. If your scaler is connected to a current amplifier, you can just add the amplifier and use the scaler card there and it will handle the auto-scaling as well as count covertion back to voltage or even photon count.

@oliwenmandiamond oliwenmandiamond self-assigned this May 28, 2026
@oliwenmandiamond

Copy link
Copy Markdown
Contributor Author

I'm not 100% sure what the best course of action is, but it looks like the this is Struck Scaler we use around MMG. We may want to extract the scaler card out of there while we are at it.

I worked on this a while back and have a few changes I like to add. Eventually, I want to create a StruckScaler class that includes all channels. Since triggering once captures all channels for "free," it makes sense to expose them. I have a specific use case where four detectors run on the same scaler card with current amplier, so we only want to trigger once per collection/autoscaling and collect everything.

P.S. If your scaler is connected to a current amplifier, you can just add the amplifier and use the scaler card there and it will handle the auto-scaling as well as count covertion back to voltage or even photon count.

After speaking with beamline staff, it is fine to have a single scaler card device with the channels being just signals and all being read. I will simplify this tomorrow.

@oliwenmandiamond

Copy link
Copy Markdown
Contributor Author

@Relm-Arrowny I've redone this if you want to have another look

@Relm-Arrowny Relm-Arrowny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things to check.

Comment thread src/dodal/devices/beamlines/i09/scaler.py
Comment thread src/dodal/devices/beamlines/i09/scaler.py Outdated
Comment thread src/dodal/devices/detector/roi_stats_detector.py Outdated
Comment thread tests/devices/beamlines/i09/test_scaler.py
@oliwenmandiamond

oliwenmandiamond commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Some devices are still down, but as shown here scaler1 and 2 connect

$ dodal connect i09
Attempting connection to i09 (using dodal.beamlines.i09)
26 devices connected:
        dual_energy_source
        dual_fast_shutter
        fsi1
        fsj1
        ienergy
        ienergy_order
        iid
        iidenergy
        intensity_protection
        jenergy
        jgap
        jid
        jidcontroller
        jidenergy
        jphase
        jpolarisation
        lakeshore
        psi1
        psi2
        psj1
        psj2
        psk1
        scaler1
        scaler2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants