Replies: 2 comments
-
|
Hi @JoachimBT, Thanks for considering to contribute your solutions to ZOSPy! We are currently quite busy because we want to release ZOSPy v2 soon. We'll come back to you after the release! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @JoachimBT, It took a while before I had time to respond. Thanks for your patience, and thanks again for your proposal! Using a context manager looks like a proper way to manage OpticStudio tools. Regarding the location where your tool implementation could be added: ZOSPy currently only wraps the system layout export tools. These are available through @LucVV I'd like to hear your opinion about this. Do you think this can be contributed as an analysis, is a new |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In one of the examples here, you already use the NSCRayTrace()-Tool:
ZOSPy/examples/Retinal illumination in pseudophakic eyes with and without Negative Dysphotopsia/retinal_illumination.ipynb
Line 178 in 398cbb6
From a different repository, I was using this function to wrap RayTracing into a single function:
https://github.com/clazzoni/zemaxzcriptz/blob/master/zosPython.py#L151
I thought it would be cool to have everything in this library here. I rewrote it a bit, instead of including a try-catch routine for errors and to make sure the NSCRayTrace-Tool is properly closed afterwards, I am using a context manager and adding type hints:
I integrated it in a way, that I can load these small helper functions on top of the ZOSPy library.
If I wanted to add this officially, I would not know where to put this,
zospy/analysis, or rather intozospy/functions/nce.py, or somewhere else?I have some other functions I use in non-sequential mode, especially to read and analyze detector data.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions