quartiq / rayopt

Python optics and lens design, raytracing
GNU Lesser General Public License v3.0
254 stars 50 forks source link

Assertion error in brent solver #26

Closed dibyendumajumdar closed 4 years ago

dibyendumajumdar commented 4 years ago

Hi, I am not sure why I am getting an assertion failure with this example:

https://nbviewer.jupyter.org/github/cameragossip/cameragossip.github.io/blob/master/lensdesigns/Nikkor-400-f2.8-FL-ED-JP2019-152887.ipynb

Also is an aperture stop mandatory? I have an example without aperture stop that is also failing similarly.

Note that there is no error if I limit the field to 0 i.e. on-axis.

Thanks and Regards Dibyendu

dibyendumajumdar commented 4 years ago

I guess that not having an aperture is fine ... the other lens is this one: https://nbviewer.jupyter.org/github/cameragossip/cameragossip.github.io/blob/master/lensdesigns/Nikkor-180mm-f2.8ED-Matsui-US4338001.ipynb

jordens commented 4 years ago

It fails to trace the chief ray. You need to divide the object angle by two.

dibyendumajumdar commented 4 years ago

Ah yes, my bad, thank you