From 0b9b1671ddefbfb72f40c89f107bd1cc9f15aeee Mon Sep 17 00:00:00 2001 From: Egor Sobolev Date: Mon, 27 Jan 2025 17:09:51 +0100 Subject: [PATCH 1/3] Add reference for MotorTracker(s) in docs --- docs/geometry.rst | 22 ++++++++++++++++++++++ extra_geom/motors.py | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/geometry.rst b/docs/geometry.rst index e0ee1152..861299f7 100644 --- a/docs/geometry.rst +++ b/docs/geometry.rst @@ -417,3 +417,25 @@ Generic detector may represent an unconstrained detector of your choice. .. automethod:: inspect .. automethod:: compare + + +Motor-based geometry +-------------------- + +The geometry of some motorized multimodule detectors may be updated according to motor positions by corresponding `MotorTracker`. + +.. autoclass:: extra_geom.motors.AGIPD_1MMotors + + .. automethod:: with_motor_axes + + .. automethod:: geom_at + + .. automethod:: move_geom_by + +.. autoclass:: extra_geom.motors.JF4MMotors + + .. automethod:: with_motor_axes + + .. automethod:: geom_at + + .. automethod:: move_geom_by diff --git a/extra_geom/motors.py b/extra_geom/motors.py index 3561f021..711617b4 100644 --- a/extra_geom/motors.py +++ b/extra_geom/motors.py @@ -97,8 +97,8 @@ def with_motor_axes(self, new_motor_axes): (hx, hy) - the axis of horizontal motor in laboratory coordinates (vx, vy) - the axis of vertical motor in laboratory coordinates - |x| _ | hx vx | |h| - |y| ‾ | hy vy | |v| + `|x| _ | hx vx | |h|` + `|y| ‾ | hy vy | |v|` Parameters ---------- From 674ce628cc3ba5930c44d656902ed3f9d5285a81 Mon Sep 17 00:00:00 2001 From: Egor Sobolev Date: Mon, 27 Jan 2025 17:24:58 +0100 Subject: [PATCH 2/3] Fix rst in docstrings --- extra_geom/motors.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extra_geom/motors.py b/extra_geom/motors.py index 711617b4..5a37b9b2 100644 --- a/extra_geom/motors.py +++ b/extra_geom/motors.py @@ -92,13 +92,14 @@ def with_motor_axes(self, new_motor_axes): of motor positions in the positions of detector panels. :: + (h, v) - local motor coordinates (x, y) - laboratory cooridnates (looking downstream) (hx, hy) - the axis of horizontal motor in laboratory coordinates (vx, vy) - the axis of vertical motor in laboratory coordinates - `|x| _ | hx vx | |h|` - `|y| ‾ | hy vy | |v|` + |x| _ | hx vx | |h| + |y| ‾ | hy vy | |v| Parameters ---------- From e1144aaf894aa2d087f1f51ca6c1b6e179d9ea39 Mon Sep 17 00:00:00 2001 From: Egor Sobolev Date: Mon, 27 Jan 2025 17:33:44 +0100 Subject: [PATCH 3/3] Add __init__ docstings as class description, clean comments --- docs/geometry.rst | 6 ++++-- extra_geom/motors.py | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/geometry.rst b/docs/geometry.rst index 861299f7..aa43fb83 100644 --- a/docs/geometry.rst +++ b/docs/geometry.rst @@ -424,7 +424,8 @@ Motor-based geometry The geometry of some motorized multimodule detectors may be updated according to motor positions by corresponding `MotorTracker`. -.. autoclass:: extra_geom.motors.AGIPD_1MMotors +.. autoclass:: extra_geom.motors::AGIPD_1MMotors + :class-doc-from: init .. automethod:: with_motor_axes @@ -432,7 +433,8 @@ The geometry of some motorized multimodule detectors may be updated according to .. automethod:: move_geom_by -.. autoclass:: extra_geom.motors.JF4MMotors +.. autoclass:: extra_geom.motors::JF4MMotors + :class-doc-from: init .. automethod:: with_motor_axes diff --git a/extra_geom/motors.py b/extra_geom/motors.py index 5a37b9b2..d2d6193c 100644 --- a/extra_geom/motors.py +++ b/extra_geom/motors.py @@ -213,9 +213,6 @@ class AGIPD_1MMotors(BaseMotorTracker): class JF4MMotors(BaseMotorTracker): - # Caution! The assignment of modules to motors and - # motors' axes sign are not verified yet. - # groups of modules driven by motors together # H1, H2 groups = [