So my problem is roughly that I want to do my own tolerance analysis and retrieve the RMS Spot Radius value as my criterion. But after changing certain values, as the Thickness and Tilt X, the programme does not seem to register this. The Value is not changing and i just get the same value over and over again. Can someone explain how to effectively change these parameters in Optic Studio, so I can retrieve the actual RMS Spot Radius Value?
I’m just assigning these parameters to my own values (f.e. from -10 to 10 with step 0.2) in a loop. Here a snippet of it:
surf36 = TheSystem.LDE.GetSurfaceAt(36)
mir1_thickness = surf36.ThicknessCell.DoubleValue
mir1_tiltX = surf36.GetCellAt(14).DoubleValue
for indexTilt, stepTilt in enumerate(np.arange(-10, 10, 5)):
mir1_tiltX = round(stepTilt, 2)
spotdata_analysis = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.StandardSpot)
spot_settings = spotdata_analysis.GetSettings()
spot_settings.Wavelength.SetWavelengthNumber(0)
spotdata_analysis.ApplyAndWaitForCompletion()
spot_results = spotdata_analysis.GetResults()
rmsSpotRadius_mir1tilt = spot_results.SpotData.GetRMSSpotSizeFor(1, 1)
Also, I would like to know if there is another way to determine the RMS spot radius than using my approach:
spotdata_analysis = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.StandardSpot)
spot_settings = spotdata_analysis.GetSettings() spot_settings.Wavelength.SetWavelengthNumber(0) spotdata_analysis.ApplyAndWaitForCompletion()
spot_results = spotdata_analysis.GetResults()
rmsSpotRadius = spot_results.SpotData.GetRMSSpotSizeFor(1, 1)
Because I’d love to avoid to open so many windows just to retrieve the value. I’m using that in a loop.
Thanks in advance for all answers!
Best answer by David.Nguyen
View original