Skip to content

ViSR sprint: server-side improvements - #19

Draft
hyperrealist wants to merge 2 commits into
DiamondLightSource:mainfrom
hyperrealist:visr-sprint
Draft

hyperrealist wants to merge 2 commits into
DiamondLightSource:mainfrom
hyperrealist:visr-sprint

Conversation

@hyperrealist

@hyperrealist hyperrealist commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Server-side work for the ViSR sprint, collected in one draft. Each feature is its own commit with its tests, so it can be reviewed, dropped or split out on its own. The UI side is DiamondLightSource/atlas#227.

  • Scan grid for any size, down to a single point (4efd64b): 2×2 scans, line scans and single points get their own grid instead of the 10×10 fallback. An axis with one setpoint takes the other axis's step as its cell width.
  • Points without a position left out, instead of a 500 (831578f): an x-only run (y all NaN) now gets a 422 saying the y positions are missing.

Testing: tox; each round is also checked against the ViSR UI running locally on the live b01-1 Tiled, and on the beamline from a test build before this leaves draft.

🤖 Generated with Claude Code

The grid needed at least 3 setpoints on each axis, on the assumption that
ViSR's plot needs three points per axis; it doesn't (2x2 and 1x1 images
render), so 2x2 scans, line scans and single points fell back to the default
10x10 binning for no reason. Any grid size is now used. An axis with a single
setpoint has no step of its own, so its cell takes the other axis's step (1
for a single point).

Offsets still need a row to wrap before they are taken, so a fly scan along
a single line keeps the default binning: on one row, an offset can't be told
from a frame gained or lost at the start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fy4Rv41HcbMRMkxzmCCJga
@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.22%. Comparing base (c1dcb1e) to head (831578f).

Files with missing lines Patch % Lines
src/dls_tiled/visr.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   95.16%   95.22%   +0.05%     
==========================================
  Files           5        5              
  Lines         766      775       +9     
==========================================
+ Hits          729      738       +9     
  Misses         37       37              

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

A run whose recorded positions include NaN (an x-only scan, where y is
filled with NaN) made numpy's default binning fail to find a range, so
/binned and /render answered 500. Points with no x or y position are now
left out before binning; if that leaves none of a run's points, the answer
is a 422 saying which positions are missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
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