-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyses Interface Broken #9
Comments
Similar to your other issue, could you check which Python.Net version you are on? I think it should work with the newest version of the API and Python.Net 2.5.2, but will check somewhere this week to be sure. |
I am using Python.Net 3.0 or greater. I had a hard time getting the older versions to install using python 3.9, 3.10 or 3.11. Pip kept trying to build wheels from scratch. Python.Net 3.0 installed right away, and I noticed that some of the issues in your code are fairly minor fixes. However, the verbatim example code from the ZOS API reference also do not run on my system. They have some similar errors where |
This issue is caused by an issue with Python.NET 3.0 and greater. All / most Analysis objects implement their own specific interface (in this case For the time being, I would advise to use Python.NET 2.5.2, which indeed does not work (well) with Python 3.9+. The latest supported version is Python 3.8. Edit: we are currently running OpticStudio 23R1, and this problem only occurs when using Python.NET 3.0+. |
Thanks! I tried again with Python 3.8 and got pythonnet 2.5.2 installed. Your example notebook now runs without errors. Thanks for the nice package. Sorry to bother you with redundant issue threads! By the way, are you interested in the contribution of further examples? I primarily model spectrometers in Zemax. It might be nice to add a spectrometer example to your collection of ophthalmological examples. It would demonstrate a few more features such as diffraction gratings, paraxial surfaces, coordinate breaks, and possibly others. |
Happy to hear it works now! Lets hope this issue gets sorted in the future. About the examples: Sure, if you could send a pull request, we will evaluate it! |
In example notebook
Escudero-Sanz eye model\Escudero-Sanz eye model.ipynb
the psf analysis code fails for a few different reasons.Running this line:
Gives this error:
In the ZOS API reference, I do not see a
Settings
attribute to theIA
class. Perhaps this code does not work with the most recent release of ZOS API?Python example 23 from the ZOS API Reference contains the following similar code for running analyses:
The text was updated successfully, but these errors were encountered: