Skip to content

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

@roman-martin

Description

@roman-martin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions