Skip to content
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

Manual usage of add_aperture_offset_error_to() can lead to wrong tracking #53

Open
roman-martin opened this issue Aug 27, 2020 · 0 comments

Comments

@roman-martin
Copy link

roman-martin commented Aug 27, 2020

If errors are applied manually via the apply_*_error_to functions, the order is important, especially for arex/arey (add_aperture_offset_error_to).

The way that errors are applied is as following: we have an element and immediately before it and immediately after its aperture we squeeze in the transformation and back transformation elements, e.g. XYShift and SRotation.
Example: starting with
-------element--elemaperture------
apply dx offset ↑ and back transformation ↓:
-----↑-element--elemaperture-↓------
apply tilt ↶ and back tilt ↷:
-----↑- element--elemaperture -↓------
-----↑-↶-element--elemaperture-↷-↓------
This way the order of transformation and back transformation is automatically kept: offset→rotation→back-rotation→back-offset

Unfortunately it doesn't work with arex/arey if you try to include another transformation after them, because the initial offset is squeezed between element and aperture:
-------element--elemaperture------
apply arex aperture offset ↑ and back transformation ↓:
-------element--↑-elemaperture-↓------
apply tilt ↶ and back tilt ↷:
------- element--↑-elemaperture -↓------
-------↶-element--↑-elemaperture-↷-↓------
as you can see, the correct order of transformation is not kept, we have rotation→offset→back-rotation→back-offset in a different direction than the initial offset.

To avoid this we either need to include some kind of book keeping. Alternatively, we could misalign element and aperture separately, e.g.
-------↶-element-↷--↶-elemaperture-↷--------
which would include a lot of unnecessary transformations (that CAN be reduced later though with a merge_consecutive_drifts-style clean-up function).

Users that want to manually apply errors can avoid this problem by always applying arex/arey (add_aperture_offset_error_to) last.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant