Repository navigation
Add: Data from diodes, readback/setpoint, plot tools, scan update - #235
Merged
Merged
Conversation
…a, and allow switching
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
hyperrealist
approved these changes
Oct 19, 2026
hyperrealist
left a comment
Collaborator
There was a problem hiding this comment.
This should work as is, and it is interoperable with the now deployed dls-tiled 0.4.0. But please review #238 and merge it to this branch first before you merge this.
claude:
What was checked, and small notes (most addressed in #238)
Checked
- Merged with current
main(incl. the tomography threshold change), it merges cleanly and type-checks, tests, lints and builds. - Against dls-tiled 0.4.0 (deployed on b01-1),
/binnedreturnsDiodesRed/DiodesGreen/DiodesBluefor runs with diodes andnullfor runs without, which this handles.
Notes
- The
coveragecheck fails: ViSR coverage drops 1.08% → 1.03% because the new code has no tests. #238 adds tests for it. DiodesRed/DiodesGreen/DiodesBlueare typednumber[][], but arenullfor a run without diodes. It works at runtime (toRgbNdtfalls back to the placeholder), but the type should allownull. Fixed in #238.- With Diodes selected, a run without diodes shows the small black placeholder, which reads as dark data. #238 draws it as empty cells instead.
- The MSW mocks have no
Diodes*data, so the Diodes view is empty in mock mode. SliceViewernow keeps its own copy ofenum Plane, which has to stay in the same order asplane.tsx.
ViSR: plot types, final poll and scan status on top of the Enz Locum UI
tomkane-dls
marked this pull request as ready for review
October 20, 2026 09:11
EmsArnold
reviewed
Nov 4, 2026
EmsArnold
reviewed
Nov 4, 2026
EmsArnold
reviewed
Nov 4, 2026
EmsArnold
reviewed
Nov 4, 2026
EmsArnold
reviewed
Nov 4, 2026
EmsArnold
reviewed
Nov 4, 2026
EmsArnold
reviewed
Nov 4, 2026
EmsArnold
reviewed
Nov 4, 2026
ViSR: create shared state hook, apply to all controls
Contributor
Author
|
I've merged in a PR that repurposes abigail's code allowing sliceviewer's controls to persist across tabs, and applying it to the new controls here, as it was tightly coupled with whats on this one |
Make the Positions and Plot Type help text user-facing (no "spec" or "setpoint grid" jargon), add tooltips to the Data Source options, and say "beam footprint" rather than "beamline footprint" in the beam size warning. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collaborator
|
@EmsArnold could you take another look at the tooltips? |
Contributor
Contributor
Author
EmsArnold
approved these changes
Nov 5, 2026
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.


No description provided.