rugnux: remove the beam-centre ladder (--beam-center-search)

The ladder stepped the beam centre a pixel at a time after a rotation first pass that indexed fewer
than half the validation frames. A battery with it switched off changed no output, so it goes: the
option, its usage text, ProcessConfig::beam_center_search_pxl, the once-per-run flag that kept
probes, walks and later passes from re-running it, and the docs. The background centre
measurement, the beam-centre check that indexes at the measured centre, the merge-judged arms and
the post-refinement of the centre are unchanged. rugnux now rejects --beam-center-search as an
unknown option.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-10-07 12:35:40 +02:00
1 parent 8c7c222e7d
commit 082f77eaa8
8 files changed
+22 -244

No files matched your search

+3 -18
View File
@@ -143,7 +143,6 @@ for it. The steps, in the order they run:
| `--estimate-beam-center` | only when asked | replaces the file's before indexing, where measured precisely enough |
| Second first pass at the measured centre | rotation | adopts the measured centre in the cases listed below |
| Both centres judged on the merge | rotation, two-pass | adopts the measured centre where its first pass merges better |
| `--beam-center-search` | rotation, after a first pass that indexes under half the validation frames | steps the centre a pixel at a time |
| Post-refinement (§7.5) | rotation, two-pass | refines the centre from the integrated reflections, within 15 px |
On most runs the measured centre is reported, the second first pass finds the same lattice at both
@@ -257,9 +256,9 @@ are `Beam centre check: running the first pass again at the measured centre …`
Over the validation battery about one rotation run in ten runs this second arm, and about one in ten
ends on the measured centre by one of the routes above.
**After a first pass that failed.** A rotation sweep leaves two further things the input often cannot
settle, both decided on the same count the rest of the first pass uses — the right answer indexes and
the wrong one does not.
**After a first pass that failed.** A rotation sweep leaves one further thing the input often cannot
settle, decided on the same count the rest of the first pass uses — the right answer indexes and the
wrong one does not.
* **The rotation-axis sign.** A miniCBF header names the axis but gives no direction, and an NXmx
vector is only meaningful together with the detector mounting. So after a poor first pass the
@@ -269,19 +268,6 @@ the wrong one does not.
**axis**, not the angles, because prediction reads the axis too. It runs before the second first
pass above and before the long-axis rescue, since with the sign wrong every candidate lattice is
wrong.
* **The beam-centre search (`--beam-center-search[=N|off]`, on by default, N = 12 px).** Where the
first pass, after the second first pass above, still indexes fewer than half the validation frames,
the centre is stepped a pixel at a time out to N px along **both** detector axes, each rung with its
own spots, and the first rung that indexes a majority and beats the starting count is adopted
(`Beam centre from indexing: …`). Both directions are searched deliberately: an error *across* the
spindle collapses the indexed fraction and announces itself, while an error *along* it leaves the
transform's peaks sharp, holds nearly every frame indexed and lets the lattice fit commit to an axis
harmonic. A rung whose primitive volume is an integer or $\sqrt{3}$ multiple of the starting cell's is
refused for that reason. The search is skipped where the background measurement places the centre
further away than both N px and three σ, since no rung could reach it, and it stops after two rings
where no rung has reached a third of the majority. The step is a flat pixel: derived from the $J_0$
law it would have to use the cell the *failed* pass returned, which can be a small spurious sub-cell
and asks for a step that jumps the lobe being looked for.
**Post-refinement.** On a two-pass rotation run, whatever centre the first pass ends on is refined
together with the distance, cell, orientation and axis by the post-refinement of §7.5, and the second
@@ -350,7 +336,6 @@ why, is in the run log only.
`--beam-center-check=off` to hold a typed centre until post-refinement.
- `--beam-center-check=off` skips the background measurement and the second first pass, and removes the
measured centre from the post-refinement bound.
- `--beam-center-search=off` or `=N` turns off or resizes the search after a failed pass.
- `--estimate-beam-center` measures and commits the centre before indexing; `--no-fit-spindle` keeps the
spindle direction from the file in that estimate.
- `--detect-beam-stop=off` removes the projection the background measurement is read from.
-1
View File
@@ -284,7 +284,6 @@ Geometry:
| Option | Description |
| --- | --- |
| `--beam-center-check[=off]` | Measure the beam centre from the isotropy of the scattered background on **every** run, report how far the file's value is from it (against how right this geometry needs it to be), and on rotation data index a **second first pass** at the measured centre. The fit reads the projection `--detect-beam-stop` already builds, so it costs no extra frames. **On by default**; `=off` disables it, and with it the measured centre's part in the post-refinement bound. The measured centre is adopted where the file's centre indexes nothing and the measured one indexes a majority; where the two return cells related by an integer volume factor (2 to 4) and the measured centre's cell, larger or smaller, carries materially more of the pooled validation spots against its own chance level; and, on a two-pass run, where the first pass is run at both centres and the measured one merges better — done where the two give the same cell in different metric symmetries, where they agree only once less of each frame is read, and where they agree but lie further apart than the geometry absorbs and the file's centre merges inconsistently in the lowest-resolution shell. Otherwise the file's centre is kept. Still runs when `--beam-x`/`--beam-y` are given. See [§1.4](CPU_DATA_ANALYSIS_IMAGE.md) |
| `--beam-center-search[=N\|off]` | After a rotation first pass that indexes fewer than half the validation frames, step the centre a pixel at a time out to N px along **each** detector axis, re-finding the spots at every rung, and keep the first rung that indexes a majority. **On by default** (12 px); `=off` disables. It runs only after a pass that has already failed, so a run that indexes never pays for it. Both detector directions are searched: a centre error *across* the spindle collapses the indexed fraction and announces itself, while one *along* it holds the frame count up and quietly returns an axis harmonic, so a rung whose cell is an integer or √3 volume multiple of the starting one is refused. Skipped where the background places the centre further away than N px |
| `--estimate-beam-center` | Measure the beam centre before indexing and use it in place of the file's: from the symmetry of the spot positions where the sweep reaches half a turn, from the scattered background otherwise. Adopted only where its sigma is within the larger of 1 px and what this geometry needs, and the move is over three sigma; otherwise the file's value is kept. Ignored with `--beam-x`/`--beam-y`. Off by default |
| `--no-fit-spindle` | With `--estimate-beam-center`, keep the rotation axis given in the file instead of fitting its skew about the beam |
+1 -1
View File
@@ -33,7 +33,7 @@ shortest accepted axis lowered from 10 to 5 Å, for small-molecule cells. The fi
second time at the beam centre the pre-scan measured; the file's centre is kept unless it indexes
nothing, gives an axis harmonic of the measured centre's lattice, or loses to it when both first passes
are merged ([§1.4](CPU_DATA_ANALYSIS_IMAGE.md)). A failed pass triggers the discrete rescues — the
rotation-axis sign, the beam-centre search — before anything is given up on.
rotation-axis sign, the first-pass depth ladder, the long-axis rescue — before anything is given up on.
**First integration pass.** At the geometry in the file, every frame of the first half of the sweep
(`--prepass-fraction`) is predicted