-
Notifications
You must be signed in to change notification settings - Fork 12
Add i05 sample stage #1873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add i05 sample stage #1873
Conversation
…ghtSource/dodal into add_sample_stage_for_i09
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1873 +/- ##
=======================================
Coverage 99.14% 99.15%
=======================================
Files 304 308 +4
Lines 11509 11578 +69
=======================================
+ Hits 11411 11480 +69
Misses 98 98 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ghtSource/dodal into add_sample_stage_for_i05
|
@Villtord I have added the configuration back. I have also added perp and long signals which are ported from the GDA equivalent i05 - combined_gonio.xml i05 - gonio.xml Can you please review to make sure I have done this part correctly? From what I can tell, the angle is always static at 50 degrees? Should they maybe be added as helper functions like |
…applied to all that use the rotation signal factory
Villtord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, turned out virtual axis on Nano are not used anymore, I will leave my comments anyway
|
|
||
|
|
||
| class I05Goniometer(XYZPolarAzimuthTiltStage): | ||
| """Six-axis stage with a standard xyz stage and three axis of rotation: polar, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| """Six-axis stage with a standard xyz stage and three axis of rotation: polar, | |
| """Six-physical-axis stage with a standard xyz translational stage and three axis of rotation: polar, |
| - `long`: Translation along the longitudinal direction of the rotated in-plane | ||
| coordinate frame defined by ``rotation_angle_deg``. | ||
|
|
||
| - `perp`: Translation perpendicular to `long` within the x-y plane. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `perp`: Translation perpendicular to `long` within the x-y plane. | |
| - `perp`: Translation along the rotated Y-axis. |
| - `long`: Translation along the longitudinal direction of the rotated in-plane | ||
| coordinate frame defined by ``rotation_angle_deg``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `long`: Translation along the longitudinal direction of the rotated in-plane | |
| coordinate frame defined by ``rotation_angle_deg``. | |
| - `long`: Translation along the rotated X-axis. |
| The `perp` and `long` axes are derived from the underlying x and y motors using a | ||
| fixed rotation angle (default 50 degrees). From the user's point of view, these | ||
| behave as ordinary orthogonal Cartesian translation axes aligned with physically | ||
| meaningful directions on the sample, while internally coordinating motion of the x | ||
| and y motors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The `perp` and `long` axes are derived from the underlying x and y motors using a | |
| fixed rotation angle (default 50 degrees). From the user's point of view, these | |
| behave as ordinary orthogonal Cartesian translation axes aligned with physically | |
| meaningful directions on the sample, while internally coordinating motion of the x | |
| and y motors. | |
| The `perp` and `long` axes are virtual axes derived from the underlying x and y motors using a | |
| fixed rotation angle (default 50 degrees). Rotation angle corresponds to an angle between analyser axis and X-ray beam axis. From the user's point of view, these virtual axes | |
| behave as ordinary orthogonal Cartesian translation axes aligned with the incoming X-ray beam (long) and perpendicular to it (perp), while internally coordinating motion of the x (perpendicular to analyser axis) | |
| and y (along analyser axis) motors. |
| Unlike sample-frame axes that rotate with a live rotation motor, these axes are | ||
| defined at a constant orientation set by `rotation_angle_deg`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Unlike sample-frame axes that rotate with a live rotation motor, these axes are | |
| defined at a constant orientation set by `rotation_angle_deg`. |
| angle_deg: float | SignalR[float], | ||
| clockwise_frame: bool = True, | ||
| ) -> tuple[SignalRW[float], SignalRW[float]]: | ||
| """Create virtual i/j signals representing a Cartesian coordinate frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| """Create virtual i/j signals representing a Cartesian coordinate frame | |
| """Create virtual i/j axes representing a Cartesian coordinate frame |
| """Six-axis stage with a standard xyz stage and three axis of rotation: polar, | ||
| azimuth, and defocus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| """Six-axis stage with a standard xyz stage and three axis of rotation: polar, | |
| azimuth, and defocus. | |
| """Six-physical-axis stage with a standard xyz stage, 2 axis of rotation: polar, | |
| azimuth and one extra tranlastional axis defocus. |
| Horizontal and vertical translation axes in the sample frame. | ||
| These axes are derived from the lab-frame x and y motors and rotate | ||
| with the azimuth angle, so that motion along `hor` and `vert` | ||
| remains aligned with the sample regardless of its azimuthal rotation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Horizontal and vertical translation axes in the sample frame. | |
| These axes are derived from the lab-frame x and y motors and rotate | |
| with the azimuth angle, so that motion along `hor` and `vert` | |
| remains aligned with the sample regardless of its azimuthal rotation. | |
| Horizontal and vertical virtual translation axes of the rotated sample frame. | |
| These axes are derived from X and Y axes rotated | |
| with the azimuth angle, so that motion along `hor` and `vert` | |
| remains aligned with the gravity direction regardless of its azimuthal rotation. |
| Longitudinal and perpendicular translation axes in the tilted sample | ||
| frame. These axes are derived from the lab-frame z motor and the | ||
| sample-frame `hor` axis, and rotate with the polar angle. | ||
| Motion along `long` follows the sample's longitudinal direction, | ||
| while `perp` moves perpendicular to it within the polar rotation plane. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Longitudinal and perpendicular translation axes in the tilted sample | |
| frame. These axes are derived from the lab-frame z motor and the | |
| sample-frame `hor` axis, and rotate with the polar angle. | |
| Motion along `long` follows the sample's longitudinal direction, | |
| while `perp` moves perpendicular to it within the polar rotation plane. | |
| Longitudinal and perpendicular virtual translation axes in the rotated sample | |
| frame. These axes are derived from the Z-axis and the | |
| virtual `hor` axis, and depend on the polar angle. | |
| Motion along `long` aligned with the analyser axis, | |
| while `perp` moves perpendicular to it within the polar rotation plane. |
Villtord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just a few comments.
| i_read: SignalR[float], | ||
| j_read: SignalR[float], | ||
| i_write: Movable[float], | ||
| j_write: Movable[float], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a separation of read and write if there could be just one SignalRW ?
| return float(rotation[0]), float(rotation[1]) | ||
|
|
||
|
|
||
| def rotate_clockwise( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you actually need 2 functions rotate_cw and rotate_ccw - you can rotate ccw using cw function by changing angle alpha either to (-1)alpha or to (2Pi-alpha)
Fixes #ISSUE
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}