optiland
optiland copied to clipboard
GridDistortion gives invalid results for TMA system
Describe the bug
When trying to view the grid distortion of the system in example Tutorial_7d_Three_Mirror_Anastigmat.ipynb by calling analysis.GridDistortion(lens).view(), the output image results in image scale on the order of 1e11, which is clearly invalid. This bug was identified by @drpaprika.
To Reproduce Steps to reproduce the behavior:
- Run the example notebook
Tutorial_7d_Three_Mirror_Anastigmat.ipynb - Run
analysis.GridDistortion(lens).view() - Note the invalid grid distortion plot and axis limits.
Expected behavior The grid distortion plot should be on a reasonable scale (on scale of millimeters) and real ray points (blue) should roughly match the nominal (orange) grid lines.
Screenshots
Environment
- Optiland Version: latest
masterbranch (https://github.com/HarrisonKramer/optiland/commit/4b4fec29fb0eb34bef7599d0c1633ce59ee13f0b) - Python Version:
3.11
Fixed in e6abd8dbd074655acd53e05c82bf138bf34e06a3