-
Notifications
You must be signed in to change notification settings - Fork 64
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
zGetDetectorViewer not reading ZRD files or filter strings #78
Comments
Dear @crubster , I feel sorry to say that right now I'm not in a position to help as I don't have a Zemax key anymore. I'm trying to get one, but I don't know for sure when I will get. Without the ability to run tests with Zemax, I'm really uncomfortable to change the code. I'm really sorry. |
Hi @indranilsinharoy , No worries, I made some quick and dirty changes myself that seems to have fixed it. Sorry to hear about the loss of your access to zemax- hope you get it back soon because pyZDDE is a great tool! |
Hi @crubster, |
I went into zfileutils and modified readDetectorViewerTextFile. I'm pretty new to github so I'll submit a pull request after I'm a bit clearer about what's going on but for now I'll just paste the modified function here (docstring removed for readability): ` def readDetectorViewerTextFile(pyz, textFileName, displayData=False):
` |
@crubster Thanks a lot. |
zGetDetector Viewer returns
ValueError: could not convert string to float: W2
(where W2 is a filter string from the detector .CFG file.Looking through readDetectorViewerTextFile in zfileutils (around line 678) it looks like the function doesn't account for the fact that the text file outputted by the detector is changed when a ray database and a filter string are included in the detector config (see attached files after the "Smoothing" line, meaning that it attempts to read the filter string as the detector X position, causing the value error.
Edit: I'm using Zemax 13 in case you need a version number
detectorViewerFile.txt
detectorViewerFile with ZRD and dfilter.txt
The text was updated successfully, but these errors were encountered: