Questions that occured to me while coding a PR #378
-
|
Hi @HarrisonKramer , I'm close to marking my PR ready for review. During testing, I encountered two things that I'm not sure of, but that do not directly (have to) affect the PR:
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @rjmoerland, Thanks a lot for the detailed notes and for testing these cases thoroughly. Very helpful observations. On f2(), you’re right. This is just the effective focal length, and I honestly don’t recall why we used For flip(), I agree it’s inconsistent that paraxial lenses change sign while physical ones don’t. That wasn’t intentional, so I’m fine with adjusting that if it doesn’t break existing behavior. For negative image positions, yes, that’s currently intended but could be made clearer in the docs. On the image surface material, we can add a note or warning. I remember there were some nuances here that we checked against commercial tools, e.g., ZOS. I believe it was during the validation & verification of the FFT PSF. If we have solid references or a clearer understanding now, I’m open to updating it. It is not a "law" that it must exactly match commercial tools, especially if we have different conventions and it's documented well. And on the stop issue, I agree. If there’s no stop, most (if not all) calculations should fail. Thanks again. These are really solid catches. Best, |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the detailed response!
I've investigated a little further, and am nearly ready to open a PR with what I think is a fix for the cases I can think of. I'll follow up there and tag you.
I'll check and open a PR if it can be changed without repercussions
Good to know, absolutely OK if it was intended.
Unfortunately I have very little experience with the commercial tools, maybe we can discuss what we expect to happen somewhere else (sorry I let the discourse invite expire 😅 )?
I'll open a PR 👍 |
Beta Was this translation helpful? Give feedback.
-
|
For reference:
|
Beta Was this translation helpful? Give feedback.


Hi @rjmoerland,
Thanks a lot for the detailed notes and for testing these cases thoroughly. Very helpful observations.
On f2(), you’re right. This is just the effective focal length, and I honestly don’t recall why we used
abs()there. EFFL can indeed be negative, so that can be removed, especially if all tests still pass. I vaguely remember changing this, but don't recall why. We can investigate if really needed.For flip(), I agree it’s inconsistent that paraxial lenses change sign while physical ones don’t. That wasn’t intentional, so I’m fine with adjusting that if it doesn’t break existing behavior.
For negative image positions, yes, that’s currently intended but could be made cleare…