Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Indranil Sinharoy
    @indranilsinharoy
    This message was deleted
    Indranil Sinharoy
    @indranilsinharoy
    Hi @hernandocortes . I have not used pyinstaller before. I'm not sure why pyinstaller is looking for "settings.ini". That file is not distributed. Instead, what is distributed is "settings.ini-dist". The "settings.ini" file is generated by PyZDDE the first time it is run. Will this info help? (I'm not sure because I have not used pyinstaller before). Please do let me know either way. Regarding the shaded model code ('Lsh'), what is the error/problem? I don't have the security dongle with me right now, so I couldn't test it. I will do so ASAP and find out the problem. Thanks.
    hernandocortes
    @hernandocortes
    Thanks @indranilsinharoy for your reply. it seems that the problem is with pyinstaller when I include pzydde as hidden import the setting,ini-dist is not copied to bundle. Im trying to compile my software to one exe file. regarding the shaded model, currently im using your ipzCaptureWindow() function and it is very helpful for getting those mtf graphs and laso the 3d Layout ('L3d'). but it seems that when I use the 'Lsh' code ipzCaptureWindow() always return none. even if I adjust the wait time. is there any configuration/setting i must do first?
    Indranil Sinharoy
    @indranilsinharoy
    @hernandocortes . Regarding shaded model. Unfortunately, the reason why ipzCaptureWindow() doesn't work with it is because the "Shaded model" layout window doesn't cannot export the image as a metafile (you can see that the option is grayed out in the window). I am not sure why Zemax doesn't allow exporting the window as metafile. Also, AFAIK unfortunately there are no DDE commands to ask Zemax to export a PNG/BMP version .... and there is another "unfortunately" (I'm sorry), Zemax has completely removed GetMetaFile DDE command from OpticStudio since version 14 ... so ipzCaptureWindow() will not work at all :-( ... is there anyway that you could use ipzCaptureWindowLQ? It does work well enough with OpticStudio (I mean the quality of output). Let me know.
    hernandocortes
    @hernandocortes
    can I use the ipzCatureWindowsLQ? to generate the shade model?
    However, the way the function works is different from ipzCaptureWindow(), because you will need to have that particular window open, and need to know the window number. That function is really a hack. Please check out the description in the above link on how to use the function before you decide to use it. Internally it uses ZPL macro function to capture a screenshot of a particular window. Also check out the function in pyzdde.py to understand better how the function works (and limitations of the function). The good thing is that this function will work even in the newer OpticStudio versions.
    hernandocortes
    @hernandocortes
    I see Thanks a lot!! just want to check with you is this function can be used in zemax 15?
    Indranil Sinharoy
    @indranilsinharoy
    No problem at all. Yes, the function works in zemax 15.
    hernandocortes
    @hernandocortes
    how about the ipzCaptureWindows function? is is still working on ZOS 15 or 15.5 ?Thank you so much for your support!
    Indranil Sinharoy
    @indranilsinharoy
    The ipzCaptureWindow() function internally calls Zmeax with the GetMetaFile DDE dataitem. However, AFAIK Zemax has removed the GetMetaFile DDE dataitem since Zemax 14 (please double check). Therefore, ipzCaptureWindow() will not work in ZOS 15 or 15.5. I feel bad for it too since I use the ipzCaptureWindow() function myself quite often (within the IPython notebook).
    hernandocortes
    @hernandocortes
    I see Thank you @indranilsinharoy !
    pfunk
    @pfunk
    Hi @indranilsinharoy. I'm trying to use your 'arraytrace' module but every time I try to import it I receive the error: "bad magic number in 'pyzdde.arraytrace': b'\x03\xf3\r\n'". If I remove the 'init' compiled-python file from the arraytrace folder then I can import the module and run the demos, but the code can not trace any rays. Any suggestions? I'm running 64-bit python 3.5.2 and Zemax 15.5. Thanks!
    Indranil Sinharoy
    @indranilsinharoy
    @pfunk I'm sorry for responding so late. I haven't been in the chat room. Are you still facing the problem? I will try to find out what's going on.
    pfunk
    @pfunk
    Yep I'm still facing the problem. Thank you very much for looking into it!
    mattjcliffe
    @mattjcliffe
    Haya, does anyone know a nice way for me to read a rectangular detector / or a DDR file in python for easy numpy manipulation
    eseguraca.6
    @eseguraca6
    Hi,
    I am a beginner in ZEMAX, and would like to use the python API
    how can I create an optical setup from scripting rather than modifying existing settings on the zmx file
    TinaWuUW
    @TinaWuUW

    Hi!

    Thank you for publishing this extension. I am wondering if there is a helper function available to grab the ray database viewer information as I cannot seem to find it on the documentation.

    Thank you in advance for your response!

    TinaWuUW
    @TinaWuUW
    If anyone is interested, the ray database viewer can be obtained using the zfileutils class by calling readZRDFile!
    Ke
    @kewang2015_twitter
    I've been using PYZDDE for some time. It's great, very convenient. I am still a beginner. Could someone tell me how I can save the data from an NSC detector into txt file? Thanks.
    TinaWuUW
    @TinaWuUW
    by executing the following function calls, I was able to get the detector viewer file:
    • zPushLens (updates detector with the new setting)
    • zNSCTrace (export the ray tracing DB)
    • set the file name using zSetDetectorViewerSettings
    • zGetDetectorViewer (saves the detector viewer data into text file)
    Maximilian Hoffmann
    @MaximilianHoffmann
    Does anyone know a possibility to match a glass string to a known nd and nud from pyzdde?
    Henrique-Aroeira
    @Henrique-Aroeira
    hey! I've begun using pyzdde recently and I'm loving it!
    But I have an issue: first, I can't find the function(or equivalent) of zDDEBusy from mzdde
    I needed to wait for zemax to finish updating the fft through focus mtf so I could save it and only then push another parameter into the LDE
    Henrique-Aroeira
    @Henrique-Aroeira
    But it is not waiting for the update to end and is pushing new data relentlessly until the loop ends