Skip to main content
Question

POP analysis

  • May 20, 2024
  • 1 reply
  • 59 views

nc9289

Following the suggestion about using Python with POP from (last message) : 

 

I am trying the following (sharing a code snippet) : 

# Open file
TheSystem.LoadFile('locally stored file', True)
my_pop=TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.PhysicalOpticsPropagation)

print(my_pop.HasAnalysisSpecificSettings)
# Access the settings interface for the Physical Optics Propagation analysis
my_pop_settings = my_pop.GetSettings()

settings = my_pop.GetSettings().__implementation__
settings.GetParameterName(1)

settings.BeamType = ZOSAPI.Analysis.PhysicalOptics.POPBeamTypes.GaussianWaist

settings.SetParameterValue(0, 2.5)

I don’t get any error, however  SetParameterValue(0, 2.5), doesn’t reflect the change made to 2.5 for Waist X. 

Can you please help me spot the error here?

 

 

1 reply

nc9289
  • Author
  • Infrared
  • 5 replies
  • May 20, 2024

I have spotted the error, forgot to add - my_pop.ApplyAndWaitForCompletion() at the end 😁


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings