mjhoptics / ray-optics

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

Unable to initiate qtgui #88

Open chuckedfromspace opened 2 years ago

chuckedfromspace commented 2 years ago

Hi,

I tried to start rayoptics from the command line but the program froze and shut down by itself (without displaying any UI elements). In the "rayoptics.log" I got the following warning: .virtualenvs\rayoptics\lib\site-packages\scipy\optimize_zeros_py.py:348: RuntimeWarning: Tolerance of -2.0827775648601943e-07 reached. warnings.warn(msg, RuntimeWarning). Is this the cause of the problem?

I'm using rayoptics under Win10, Python 3.9.

Thank you in advance for any advices on how to fix the issue.

Best regards, Zhiyao

mjhoptics commented 2 years ago

Hello Zhiyao, I'm sorry you're having issues running rayoptics. What is the rayoptics version you are using? The current version is 0.8.1. Are you able to run it in a scripting environment?

I don't think the message in the log file is related. It looks to be a warning from the iterator used to trace chief rays thru the aperture stop center.

I haven't run rayoptics on Windows in a long time. I'll try to set it up in a Windows environment here and see if I can reproduce the problem. This will take a few days. Regards, Mike

chuckedfromspace commented 2 years ago

Hi Mike,

Thank you for the quick response! I have the following versions running under Python 3.9.7 (installed via pip install rayoptics): rayoptics=0.8.1 pyqt5=5.12.3 pyqt5-sip=12.10.1

It runs without any issue in a scripting environment. I was also able to call up the GUI by running "rayopticsapp.py" (from the qtgui folder locally). Since I can use the UI this way, you could consider closing the issue unless you'd like to look into the command line problem. Also let me know if there is anything else I could try to figure out the problem.

Bests, Zhiyao

mjhoptics commented 2 years ago

Zhiyao, Thank you for the helpful report. Your description triggers a vague recollection that I had the same problem and got it to work as you did. I'll change the doc to avoid using the shortcut on Windows. I think a separate issue should be logged to get the Windows shortcut working. Mike