Repository navigation
ViSR: plot types, final poll and scan status on top of the Enz Locum UI - #238
Merged
tomkane-dls merged 6 commits intoOct 20, 2026
Merged
Conversation
The poll that should fetch a scan's last points once it finished never ran: it was conditional on the poll interval still being set, but the previous run of the effect had already cleared it. So the final image was whatever the last regular poll got, up to half a second before the scan ended. It now runs whenever a scan stops running. /binned answers 503 with Retry-After while the data file is behind the catalog. That was logged as a polling error; it is now treated as "not ready yet": during a scan the next poll simply tries again, and the final poll, which nothing follows, retries after the time the server asks for (up to 10 times). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
A quiet line at the bottom right of the plots says where the plotted scan is: "Scanning…", then "Scan complete", which fades out after a few seconds. While the final poll waits on a 503 it says the last points are loading, and if they never arrive, or the scan failed, it says so in the warning or error colour and stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
…dges Cells no point had landed in yet were drawn black, the same as a measured low value, so a scan in progress looked like dark data. They are now faint diagonal stripes, one in the colour of the page behind the plots and one a shade darker on a light page or lighter on a dark one, so they recede in either theme. Each cell is drawn as 4x4 pixels to carry the pattern. A run without diodes shows its diode plots as all stripes, the camera's shape. A flat image (a single point, or all values equal) was scaled to black, since its range is zero; it is now drawn at full brightness. The plots were drawn in pixel numbers, without axes. They now get /binned's bin edges as axes, so each cell sits between its own edges in scan coordinates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
…n or footprints A Plot Type choice under Data Source picks the drawing, with a tooltip on what each shows. Setpoint grid is /binned's grid as before; the others come from Tiled's /render, drawn over the scan's extent at 200 px on its longer side: a step-sized rectangle at each recorded position (Readbacks), a beam-sized Gaussian on each point, or each point's beam footprint with overlaps split between neighbours. Both data sources work in every drawing. Where /render drew nothing, or covered a pixel only partly, it fades into the empty-cell stripes, so gaps the beam left stay visible. Gaussian and footprints use the beam size the run records. No run records one yet, so /render falls back to one scan step, and a note under the plots says so, with the size used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
The drawing is now two choices of one line each. Positions: Setpoints (the scan's grid, each cell the mean of the points read back in it) or Readbacks (each point where the motors read back). Plot Type: Rectangles, Gaussian or Footprints. Gaussian and footprints only make sense at the readback positions, so on the setpoint grid they are greyed out and the grid's cells show as rectangles; the shape picked for readbacks is kept meanwhile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
The empty cells' 2-pixel stripes were hard to tell from dark data in the dark theme. They are now the page's background crossed by thin diagonal lines, lighter than a dark background and darker than a light one. For lines that thin, the setpoint grid is drawn at least 240 pixels on its longer side (and at least 4 per cell), with the axes split to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR
tomkane-dls
approved these changes
Oct 20, 2026
tomkane-dls
left a comment
Contributor
There was a problem hiding this comment.
Nice new features. I will merge this into my branch and we can continue more specific discussion on there in one location, and i think we should definitely get Emily and Douglas' input before merging this onto main. If we get the enz locum working fully today we can deploy off an alpha tag for the demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #235 with the spectroscopy plot features from the ViSR sprint (#227):
/render, for the camera and the diodes.Needs the next dls-tiled release, with DiamondLightSource/dls-tiled#24 (diodes in
/binned), DiamondLightSource/dls-tiled#25 (diodes in/render) and DiamondLightSource/dls-tiled#27 (the final poll gets fresh data). On the deployed 0.3.0 the camera works in every plot type, but the diodes don't.To test:
pnpm testinapps/visr; then run a scan and switch Data Source, Positions and Plot Type during and after it.🤖 Generated with Claude Code
https://claude.ai/code/session_01BsMDFhupHcBFbVJPK8QAvR