Created
May 10, 2021 14:21
-
-
Save Omnistic/efcb02f11c3e1764d1f7e623404b19e3 to your computer and use it in GitHub Desktop.
ZOS-API: Save Polarization Pupil Map results to a text file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Polarization Pupil Map analysis | |
MyPolarizationPupilMap = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.PolarizationPupilMap) | |
# Check the implementation status of this analysis feature in the ZOSAPI | |
print('Does Polarization Pupil Map have fully-implemented settings?', MyPolarizationPupilMap.HasAnalysisSpecificSettings) | |
# This means the settings needs to be accessed through IAS_.ModifySettings (see Example 17 in the ZOSAPI Syntax Help) | |
# Retrieve Polarization Pupil Map results | |
MyPolarizationResults = MyPolarizationPupilMap.GetResults() | |
# Save results as text file | |
MyFileName = 'PolarizationPupilMapResults.txt' | |
if MyPolarizationResults.GetTextFile(TheApplication.SamplesDir + '\\' + MyFileName): | |
print('Text file created successfully') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment