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):
MyWavefrontMap = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.WavefrontMap)
MyWavefrontMapSettings = MyWavefrontMap.GetSettings()
MyWavefrontMapSettings.Field.SetFieldNumber(2)
MyWavefrontMap.ApplyAndWaitForCompletion()
MyWavefrontMapResults = MyWavefrontMap.GetResults()
MyWavefrontMapGrid = MyWavefrontMapResults.GetDataGrid(0).Values
MyWavefrontMapArray = reshape(MyWavefrontMapGrid, MyWavefrontMapGrid.GetLength(0), MyWavefrontMapGrid.GetLength(1))
plt.figure()
plt.imshow(MyWavefrontMapArray)
plt.show()
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