feat: ship the grid-scan decision to AareDB (GridScanDecision on RasterPayloadModel) #29

Merged
perl_d merged 3 commits from feat/gridscan-decision into main 2026-09-03 12:27:25 +02:00
Owner

Builds on the jfjoch_gridscan_union module: the decision the DAQ takes should be DISPLAYED by AareDB, never recomputed there (two implementations of one analysis drift apart until the UI contradicts the beamline).

  • GridScanResult.contour_cells - the (nx, ny) cells of the chosen 50 % blob, populated from the blob mask in analyse. Lets a consumer draw the decision's own footprint over the sample image as vectors, no map recomputation.
  • models/gridscan_decision.py - GridScanDecision {contract: 1, algorithm, algorithm_version, thresholds, result} wrapping the analysis result verbatim; the Thresholds dump means every stored decision states its own tuning. Pictures stay excluded from serialization (they ride the image pipeline).
  • RasterPayloadModel.decision: GridScanDecision | None = None - optional, so DAQs that have not adopted it remain valid.
  • jfjoch-client floor -> >=1.0.0rc166: the embedded ScanResult defines the per-image field contract, and rc166 adds ice (hex ice-ring ratio - the channel Thresholds.ice_ring reads) + latt_count, and rotation_bravais on the scan.
  • Tests: decision round-trip on a synthetic scan (contour present + centre inside it, jpegs excluded, thresholds echoed), payload field optional. Full suite: 224 passed.

AareDB side (storage column, ingest, viewer rendering of the stored decision) is prepared against this branch. Rollout: this release -> AareDB -> AareDAQ fills decision after analyse().

Generated with Claude Code

https://claude.ai/code/session_01HiGzkkuiZXei894cnJfgSg

Builds on the jfjoch_gridscan_union module: the decision the DAQ takes should be DISPLAYED by AareDB, never recomputed there (two implementations of one analysis drift apart until the UI contradicts the beamline). - `GridScanResult.contour_cells` - the (nx, ny) cells of the chosen 50 % blob, populated from the blob mask in `analyse`. Lets a consumer draw the decision's own footprint over the sample image as vectors, no map recomputation. - `models/gridscan_decision.py` - `GridScanDecision {contract: 1, algorithm, algorithm_version, thresholds, result}` wrapping the analysis result verbatim; the Thresholds dump means every stored decision states its own tuning. Pictures stay excluded from serialization (they ride the image pipeline). - `RasterPayloadModel.decision: GridScanDecision | None = None` - optional, so DAQs that have not adopted it remain valid. - jfjoch-client floor -> `>=1.0.0rc166`: the embedded ScanResult defines the per-image field contract, and rc166 adds `ice` (hex ice-ring ratio - the channel `Thresholds.ice_ring` reads) + `latt_count`, and `rotation_bravais` on the scan. - Tests: decision round-trip on a synthetic scan (contour present + centre inside it, jpegs excluded, thresholds echoed), payload field optional. Full suite: 224 passed. AareDB side (storage column, ingest, viewer rendering of the stored decision) is prepared against this branch. Rollout: this release -> AareDB -> AareDAQ fills `decision` after `analyse()`. Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HiGzkkuiZXei894cnJfgSg
gotthard_g added 1 commit 2026-09-03 11:10:07 +02:00
feat(models): ship the grid-scan decision to AareDB
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / lint (pull_request) Failing after 1m46s
CI / test (3.11) (pull_request) Skipped
CI / test (3.12) (pull_request) Skipped
CI / test (3.13) (pull_request) Skipped
626f1f0500
GridScanResult gains contour_cells -- the (nx, ny) cells of the chosen
50 % blob, so consumers can draw the decision's own footprint over the
sample image without recomputing the map. New GridScanDecision wraps
the result verbatim with provenance (algorithm, version, the Thresholds
used) and rides on RasterPayloadModel.decision (optional -- DAQs that
have not adopted it stay valid). jfjoch-client floor moves to
1.0.0rc166: the embedded ScanResult defines the field contract, and
rc166 adds per-image ice + latt_count and rotation_bravais.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HiGzkkuiZXei894cnJfgSg
gotthard_g changed title from probe to feat: ship the grid-scan decision to AareDB (GridScanDecision on RasterPayloadModel) 2026-09-03 11:10:07 +02:00
perl_d added 1 commit 2026-09-03 12:16:41 +02:00
style: ruff format and fix
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / lint (pull_request) Failing after 1m34s
CI / test (3.11) (pull_request) Skipped
CI / test (3.12) (pull_request) Skipped
CI / test (3.13) (pull_request) Skipped
113a388e50
perl_d added 1 commit 2026-09-03 12:21:36 +02:00
fix: type checking in tests
CI / lint (pull_request) Successful in 2m49s
CI / test (3.11) (pull_request) Successful in 1m26s
CI / test (3.13) (pull_request) Successful in 2m7s
CI / test (3.12) (pull_request) Successful in 2m38s
CI / lint (push) Canceled after 13s
CI / test (3.11) (push) Canceled after 0s
CI / test (3.12) (push) Canceled after 0s
CI / test (3.13) (push) Canceled after 0s
Build and Publish / release (push) Successful in 14s
a400ffc3be
perl_d merged commit a400ffc3be into main 2026-09-03 12:27:25 +02:00
Sign in to join this conversation.