Skip to content

Draw the RGB diodes in /render too - #25

Merged
hyperrealist merged 1 commit into
DiamondLightSource:mainfrom
hyperrealist:render-diodes
Oct 19, 2026
Merged

hyperrealist merged 1 commit into
DiamondLightSource:mainfrom
hyperrealist:render-diodes

Conversation

@hyperrealist

Copy link
Copy Markdown
Contributor

/render now draws DiodesRed/DiodesGreen/DiodesBlue beside the camera's channels in every kind (null for a run without diodes), so the ViSR plot types other than the setpoint grid can show the diodes. format=png accepts them as channel too.

Also fixes a 500 in /binned and /render when a run has points without a position and its diodes are behind the camera.

To test: /api/v1/render/<uid>?kind=rectangles on a run with diodes returns channels.DiodesRed; on one without, it is null.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR

/render's JSON now has DiodesRed/DiodesGreen/DiodesBlue beside the camera's
channels, drawn the same way in every kind, and null for a run without
diodes; format=png takes them as a channel (404 for a run without them).
Where the diodes are behind the camera they draw nothing, and grid cells
leave out points without a finite value instead of averaging in NaN.

Dropping points without a position failed with a 500 when a diode channel
was shorter than the positions; it now masks such a channel by its length,
as the slice mask already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: 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.55%. Comparing base (2207428) to head (107b836).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   95.49%   95.55%   +0.06%     
==========================================
  Files           5        5              
  Lines         799      810      +11     
==========================================
+ Hits          763      774      +11     
  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.

@hyperrealist
hyperrealist merged commit 20a6cc3 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