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

Draft
duan_j wants to merge 1 commits from find-xtal-center-fallback into main
1 Commits
Author SHA1 Message Date
duan_jandClaude Fable 5 cad77d4cf1 WIP: return grid centre when no crystal in raster scan (#10)
CI / lint (push) Failing after 18s
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-13 13:11:08 +02:00