mjhoptics / ray-optics

geometric ray tracing for optical systems
BSD 3-Clause "New" or "Revised" License
263 stars 54 forks source link

Finite source field point #22

Closed bdsmith147 closed 3 years ago

bdsmith147 commented 3 years ago

Hello, I've been really impressed with this package. I'm wondering if there is a way to have a field source point that located a finite distance from the first lens. I sense that it must be related to the 'NA' key of the PupilSpec class, but I keep getting errors from that: osp.pupil = PupilSpec(osp, key=['object', 'NA'], value=0.2)

Any thoughts would be greatly appreciated.

mjhoptics commented 3 years ago

Hello @bdsmith147, The object distance must be set properly as well. sm.gaps[0].thi = 500.0 for an object distance of 500. Otherwise, it should work. If there's still a problem, please post the script you are trying to use. Thanks!