optiland icon indicating copy to clipboard operation
optiland copied to clipboard

GridDistortion gives invalid results for TMA system

Open HarrisonKramer opened this issue 11 months ago • 1 comments

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:

  1. Run the example notebook Tutorial_7d_Three_Mirror_Anastigmat.ipynb
  2. Run analysis.GridDistortion(lens).view()
  3. 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

Image

Environment

  • Optiland Version: latest master branch (https://github.com/HarrisonKramer/optiland/commit/4b4fec29fb0eb34bef7599d0c1633ce59ee13f0b)
  • Python Version: 3.11

HarrisonKramer avatar Jan 29 '25 19:01 HarrisonKramer

Fixed in e6abd8dbd074655acd53e05c82bf138bf34e06a3

HarrisonKramer avatar Jun 02 '25 17:06 HarrisonKramer