Skip to content

Improved scan status - #249

Draft
tomkane-dls wants to merge 11 commits into
mainfrom
improved-scan-status
Draft

tomkane-dls wants to merge 11 commits into
mainfrom
improved-scan-status

Conversation

@tomkane-dls

Copy link
Copy Markdown
Contributor

in progress/untested
to be reviewed/merged after PR #235

aims

  • move scanstatus out of spectroscopy so it can be used for tomography
  • move it to the header of the drawer
  • adds scan type (fly/step etc.)
  • adds time elapsed (accurate time remaining probably needs backend changes)
  • show real errors from blueapi on fails
  • differentiate aborts from failed scans

Closes issue #245

tomkane-dls and others added 11 commits October 16, 2026 12:26
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
ViSR: plot types, final poll and scan status on top of the Enz Locum UI
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.

2 participants