Hi Marta,
I really don’t know PyZDDE, so I cannot say. However, the ZOS-API fully supports the wavefront map. In fact, a year ago, I wrote a Python code snipet to display the wavefront map and print the RMS wavefront error for another user. The code is available as a Gist, and here’s the relevant part (you’d have to add this code to a template generated in OpticStudio by pressing: Programming..Python..Standalone Application/Interactive Extension, this template contains the reshape function defined below):
# Create a Wavefront Map analysis
MyWavefrontMap = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.WavefrontMap)
# Retrieve Wavefront Map settings
MyWavefrontMapSettings = MyWavefrontMap.GetSettings()
# Change to field number 2
MyWavefrontMapSettings.Field.SetFieldNumber(2)
# Apply new settings
MyWavefrontMap.ApplyAndWaitForCompletion()
# Retrieve Wavefront Map results
MyWavefrontMapResults = MyWavefrontMap.GetResults()
MyWavefrontMapGrid = MyWavefrontMapResults.GetDataGrid(0).Values
MyWavefrontMapArray = reshape(MyWavefrontMapGrid, MyWavefrontMapGrid.GetLength(0), MyWavefrontMapGrid.GetLength(1))
# Plot results
plt.figure()
plt.imshow(MyWavefrontMapArray)
plt.show()
# (additional) Retrieve RMS wavefront error from a Merit Function operand
RMS_WaveFront = TheSystem.MFE.GetOperandValue(ZOSAPI.Editors.MFE.MeritOperandType.ZERN, -4, 2, 2, 1, 0, 0, 0, 0)
print(RMS_WaveFront)
I hope this helps. Take care,
David