Skip to content

Bin the RGB diodes beside the camera in /binned - #24

Merged
hyperrealist merged 1 commit into
DiamondLightSource:mainfrom
hyperrealist:diode-channels
Oct 19, 2026
Merged

hyperrealist merged 1 commit into
DiamondLightSource:mainfrom
hyperrealist:diode-channels

Conversation

@hyperrealist

Copy link
Copy Markdown
Contributor

/binned also returns the RGB diodes, as DiodesRed/DiodesGreen/DiodesBlue on the camera's bins, so the UI can switch between camera and diodes (DiamondLightSource/atlas#235). It's additive: RedTotal/GreenTotal/BlueTotal are unchanged, and a run without diodes answers null for them.

The diodes are read from primary/spectroscopy_diodes-<colour> or primary/<colour> (fly scans, the PandA's per-frame means), else from the step scan's event table primary/internal/spectroscopy_diodes-<colour>. They don't take part in reconciling lengths, so a lagging PandA never holds the camera images back.

Testing

  • tox, with new tests for fly, step (a real event table), lagging diodes, the scan grid and runs without diodes.
  • Copies of b01-1 runs cb4c7fc4 (fly) and dbc25a90 (step) in a local server: the diode images match numpy's binning on the same edges. A recent run without diodes answers null.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.49%. Comparing base (a2093f6) to head (d0d252d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   95.35%   95.49%   +0.13%     
==========================================
  Files           5        5              
  Lines         775      799      +24     
==========================================
+ Hits          739      763      +24     
  Misses         36       36              

☔ 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.

/binned answers DiodesRed/DiodesGreen/DiodesBlue next to the camera's
RedTotal/GreenTotal/BlueTotal, on the same bins, or null for a run without
diodes. They are read from primary/spectroscopy_diodes-<colour> or
primary/<colour> (fly scans: the PandA's per-frame means), else from the
step scan's event table, primary/internal/spectroscopy_diodes-<colour>.

The diodes take no part in reconciling lengths: a second PandA lagging behind
never holds the camera images back, and its image keeps the points it has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
@hyperrealist
hyperrealist merged commit 2207428 into DiamondLightSource:main Oct 19, 2026
8 checks passed
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.

1 participant