Files
leonarski_fandClaude Opus 5 8db75bf8e7 grid scan: the viewer's Grid mode is settable, not only startable
Grid was a mode with no settings. It could be selected and run, but the raster it scored
was whatever the file happened to record, what counted as a crystal was fixed at the
compile-time defaults, and the settings a Grid run actually uses - the cell, spot finding,
indexing - were built inside the MX page and therefore invisible in the mode that uses them.

The unit cell, goniometer, spot-finding and indexing sections now sit outside the page
stack and are shown for MX and Grid alike, the way the azimuthal section already was.
That is not four convenient extras: a raster is scored out of the spots, indexes every
cell by default, and is normally run against a known cell on a fixed target - and the
goniometer section is where the grid geometry itself is stated. Bragg integration, scaling
and the reference dataset stay on the MX page, because a raster integrates, scales and
merges nothing. None of them is duplicated; a second control for one setting is a pair of
controls that can disagree.

The Grid page carries the analysis: the two score thresholds, the minimum cells per
crystal, the decisive single-cell score, an optional cap and whether each cell is indexed.
Every default is read from GridScanAnalysisSettings rather than written out again, so this
panel and the web one cannot drift apart on what a default is; a test pins the numbers so
that moving one is a decision rather than a side effect. No cap is spelled as an unticked
box and not as a count that happens to mean "all". The settings ride to the run on the
experiment, which now survives the panel's round trip through the reader.

The grid geometry could already be edited but not trusted. A step of zero was quietly
replaced by a default, which is the worst answer available: the map is reshaped, every
crystal is reported somewhere else on the sample, and nothing looks wrong. It is now
refused - no grid is set, the summary says which field is at fault, and the run is refused
with it. The summary also says where the grid came from, the fields are highlighted when
they are not the file's, and images that do not fill the last row are called out. The
baseline for "not the file's" is taken when a file is opened, because datasetLoaded fires
again after every edit and by then the file's grid is indistinguishable from one typed
over it.

Two defects found while verifying this. A raster is stored with a stationary omega beside
its grid, since NXmx cannot say "no rotation" - and the panel read a goniometer of any kind
as outranking the grid, so the first grid-scan run to come back carrying that placeholder
axis flipped the panel to Rotation, and the next edit dropped the raster and got the
following run refused. A goniometer that does not scan no longer outranks a grid. And a
grid whose fields cannot make one is a half-finished edit, not a dataset that stopped being
a raster, so it no longer throws the mode away under the user mid-edit.

The Grid refusal now means what it says: no grid scan in the file AND none set in the
panel. A file that records no raster - an older one, a foreign one - can be given one and
analysed, which was the point.

Verified headlessly on a stored raster: the Grid page shows the file's 13 x 15 grid and the
analysis settings at their defaults, a run finds one crystal and draws it on the map, and
the same run with the protein score threshold at 0.95 finds none - so the settings reach
the analysis rather than merely being drawn. On a rotation dataset the mode is refused,
accepted once a grid is entered, and refused again with a zero step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
2026-09-08 14:46:33 +02:00
..
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00
2026-08-25 08:21:39 +02:00
2026-08-25 08:21:39 +02:00
2026-06-02 11:49:24 +02:00
2025-05-12 14:17:24 +02:00
2026-08-25 08:21:39 +02:00
2026-06-02 11:49:24 +02:00
2026-09-02 21:17:31 +02:00
2026-09-02 21:17:31 +02:00