fix: Update find_xtal.py post-scan collection position logic (#10) #11

Merged
perl_d merged 3 commits from find-xtal-center-fallback into main 2026-07-31 10:49:59 +02:00
3 Commits
Author SHA1 Message Date
duan_jandClaude Fable 5 2969af8764 fix: drop spots_indexed from no-crystal guard
Build and Publish / release (push) Successful in 13s
CI / test (3.12) (push) Successful in 22s
CI / test (3.11) (push) Successful in 24s
CI / test (3.13) (push) Successful in 21s
CI / lint (push) Successful in 24s
CI / lint (pull_request) Successful in 16s
CI / test (3.12) (pull_request) Successful in 22s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.13) (pull_request) Successful in 24s
Indexing was removed from the crystal score (w_indexed=0.00), so it must
not act as a hard veto either: a crystal that diffracts but fails to
index should still be targeted, not routed to grid centre. Guard now
checks max spots_low_res only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:59:38 +02:00
duan_jandClaude Fable 5 0dcfe15b7c style: ruff format
CI / lint (push) Successful in 18s
CI / lint (pull_request) Successful in 17s
CI / test (3.11) (push) Successful in 24s
CI / test (3.12) (push) Successful in 26s
CI / test (3.11) (pull_request) Successful in 21s
CI / test (3.13) (push) Successful in 22s
CI / test (3.13) (pull_request) Successful in 23s
CI / test (3.12) (pull_request) Successful in 26s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:52:57 +02:00
duan_jandClaude Fable 5 e4e4a44868 WIP: return grid centre when no crystal in raster scan (#10)
CI / lint (push) Failing after 15s
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / lint (pull_request) Failing after 22s
CI / test (3.11) (pull_request) Skipped
CI / test (3.12) (pull_request) Skipped
CI / test (3.13) (pull_request) Skipped
raster_highest_score always returns the argmax cell, which lands on
noise when the loop has no crystal. Add a grid-wide weakness guard:
when max(spots_low_res) < min_low_res_spots OR max(spots_indexed) <
min_spots_indexed, return a CenterOfMassModel at the geometric grid
centre instead of collecting at a noisy cell. Thresholds are tunable
parameters (defaults 10.0 and 1).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:47:36 +02:00