refactor(LamNI): rename rotation-center calibration entry point, drop sample_type arg
rotation_center_calibration_start(sample_type="isolated") didn't match the xrayeye_* naming convention used by the other X-ray eye entry points, and the sample_type string enum was easy to forget (both the parameter name and its accepted values). Split into two entry points instead: lamni.xrayeye_rotation_center_calibration_isolated(keep_shutter_open=False) lamni.xrayeye_rotation_center_calibration_extended(keep_shutter_open=False) Both delegate to a shared _xrayeye_rotation_center_calibration() private helper (single copy of the KeyboardInterrupt cleanup). Updated the user docs to match; XrayEyeAlign.find_rotation_center()'s own sample_type parameter is unchanged since it's internal shared implementation, not what was being objected to. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,12 +24,10 @@ The recommended way to (re-)measure `center` for a new sample is the GUI-driven
|
||||
|
||||
**Automated rotation-center calibration**
|
||||
|
||||
`lamni.rotation_center_calibration_start(sample_type="isolated")`
|
||||
This opens the X-ray eye widget and walks through the calibration interactively. Pick the function based on what's mounted:
|
||||
|
||||
This opens the X-ray eye widget and walks through the calibration interactively. Choose `sample_type` based on what's mounted:
|
||||
|
||||
- `"isolated"` — for a sparse/isolated particle. You submit its centre position once at 0° and once at 180°; the midpoint of the two is the rotation axis' projected position (this works regardless of the axis tilt). No further confirmation step.
|
||||
- `"extended"` — for a non-isolated/textured sample where the rotation centre can be identified visually. The sample sweeps 0° → 180° → 0° with the live view left open so you can watch for the point that doesn't move, then you submit a single click at 0°. The correction is applied, a short verification sweep (0° → 45° → 0°) runs, and you're asked *"Are you happy with this alignment, or shall we do another iteration?"* — answer `n` to refine further.
|
||||
- `lamni.xrayeye_rotation_center_calibration_isolated()` — for a sparse/isolated particle. You submit its centre position once at 0° and once at 180°; the midpoint of the two is the rotation axis' projected position (this works regardless of the axis tilt). No further confirmation step.
|
||||
- `lamni.xrayeye_rotation_center_calibration_extended()` — for a non-isolated/textured sample where the rotation centre can be identified visually. The sample sweeps 0° → 180° → 0° with the live view left open so you can watch for the point that doesn't move, then you submit a single click at 0°. The correction is applied, a short verification sweep (0° → 45° → 0°) runs, and you're asked *"Are you happy with this alignment, or shall we do another iteration?"* — answer `n` to refine further.
|
||||
|
||||
At the end you're shown the computed `lsamx_center`/`lsamy_center` and asked to confirm before they're written via `dev.lsamx.update_user_parameter(...)` / `dev.lsamy.update_user_parameter(...)`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user