xzos / PyZDDE

Zemax/ OpticStudio Extension using Python
MIT License
159 stars 67 forks source link

Problem getting RMS Field Map Data out as a Text File #84

Open seanmbills opened 6 years ago

seanmbills commented 6 years ago

Indranil,

First of all, thank you very much for this amazing Python package, as it seems to work incredibly well so far. I have, however, been experiencing an issue that doesn't really make any sense to me. I'm currently using Zemax version 18.4 and am experiencing issues when I attempt to use the zGetTextFile method to create a .txt output file of all of the data associated with the RMS Field Map analysis. The code is as follows:

dir = os.path.dirname(os.path.realpath(__file__)) txtFileRFM = dir + "\rfmOutput.txt" rmsFile = ln.zGetTextFile(textFileName=txtFileRFM, analysisType='Rfm', flag=0, timeout=None)

The part that's confusing me the most is that this exact same method works perfectly fine when attempting to access the Wavefront map data by passing in analysisType="Wfm". For some reason, however, when trying to access the RMS Field Map data, the zGetTextFile method keeps returning -1 as the output and thus my file with the RMS data never actually gets created anywhere.

Look forward to hearing from you soon.

seanmbills commented 6 years ago

Having a similar issue when attempting to use the Footprint Diagram buttoncode ("Foo"), the Vignetting Plot button code ("Vig"), the Field Curvature/Distortion button code ("Fcd"), and the Ray Fan Aberration button code ("Ray").

aj-nielsen commented 5 years ago

I realize this thread is a year old, but I'm having similar issues with the Geometric Image Analysis button code ("Ima"). Every single time I run the ln.zGetTextFile function, OpticStudio stops responding, and (probably as a result) no text file is exported. (Oddly, the other buttoncodes mentioned in the second post work fine for me - was there a fix applied that somehow was not applied to the Geometric Image Analysis?)

andibarg commented 4 years ago

I have the same issue now with the buttoncode 'Sim' for image simulation. However, all the ones mentioned above work for me now, including 'Ima' mentioned in the last post.