Finds an optimised value for the TiltAxisOffset property (the lateral displacement between optical axis and tilt axis of the stage).
The script measures the offset averaging $Samples values, then image shifts to the new values, measures again, until the change is below $ThresholdOffset.
This code can be shared and adapted under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License (https://creativecommons.org/licenses/by-nc-sa/4.0/)