-
Notifications
You must be signed in to change notification settings - Fork 32
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
Misalignments of elliptical mirror #2952
Comments
Also, note that the elliptical mirror is set to horizontal or vertical focusing by changing the normal vector. In the first mirror, "auto-compute vector" is set to "horizontal" whereas in the second mirror, it is set to "vertical". "Orientation of reflection plane" is set to "horizontal" in both cases. I tried to set up the mirrors by using the same normal vector and switching "Orientation of reflection plane" to vertical for the second mirror, but this didn't seem to give the expected results with the correct focus in both planes at 37.5 m. |
One thing I know is the "Orientation of reflection plane" only affects the separate srwl_opt_setup_surf_height_2d() call (which is turned off unless the file is given to the height profile. It doesn't affect the SRWLOptMirEl() which is generated separately. So setting that value will have no effect. I don't know if it is helpful, but the WPG software creates the SRWLOptMirEl() with roll and yaw errors: https://github.com/samoylv/WPG/blob/develop/wpg/optical_elements.py#L329 For roll, it adjusts the _nvy (horizontal mirror) or _nvx (vertical mirror) value to rotate the results. The yaw value affects the _x (horizontal mirror) or _y (vertical mirror) multiplied by some value "distance" which isn't document. WPG doesn't allow giving an error to the tilt: _tvy (horizontal mirror) or _tvx (vertical mirror) is always set to 0. |
Thanks, @moellep. This WPG reference looks like it will be useful to understand the mirror rotations. I've been implementing rotations by applying a rotation matrix to the (_nvx,_nvy,_nvz) normal vector. However, I don't see any misalignments in Mirror_elliptical (unless yaw is non-zero, as you say). Can you comment on this misalignment issue, @ochubar ? |
I see this potentially related issue, but it's written in Russian... |
I am working with misalignments and rotations of mirrors and I find something confusing regarding misaligning an elliptical mirror. My simulation for a KB mirror system is here:
https://www.sirepo.com/srw#/beamline/PmyIQM72
The first mirror M1 is horizontally focusing and the second mirror M2 is vertically focusing.
Consider M2. I expect that horizontally misaligning M2 will produce a horizontal offset at the watch-point, and indeed it does.
See the first image below for the result of misaligning by 50microns.
However, I do not expect a vertical misalignment of M2 to create a vertical offset, since it is a cynlindrical mirror. Removing one mirror at a time confirms that the first focuses horizontally and the second vertically.
Adding a 50micron vertical misalignment to M2 does create a vertical offset as seen in the second attached image.
I created a similar simulation in Shadow and confirmed that only one direction of misalignment would produce offsets.
Am I thinking about this wrong, or is this a bug?
We found this issue by running python scripts with our machine learning calculations, so I don't think it's just Sirepo. But I'm confused and a suggestion or bug fix would be appreciated.
The text was updated successfully, but these errors were encountered: