Skip to main content

Dear Zemax- community,

I have a question regarding simulating gaussian beams in a multi-configuration and would be thankful if you could answer me. 

 

In my setup I have 532 and 1064 nm light coming out of separate fibers and being combined. Then the bichromatic beam is split 50:50 and made to interfere at one point (to create an optical lattice). As the Rayleigh range is on the order of the propagation length, standard ray-tracing won't do and I need either Paraxial Gaussian Beam Analysis or Physical Optics Analysis. I want to simulate the 4 different paths as different configurations. Ultimately I want to optimize the lenses to have each beam be focused on the same location 

 

My problem is now that for both of these, I need to enter the beam-parameters in the settings. In the Multi-configuration window however, the only (seemingly) relevant operand changes the aperture for standard ray-tracing. How do I change the beam size in a Multi-Parameter setting for either Physical Optics or Paraxial Gaussian Beam? After all the beams come out of the fiber with different waist.

 

If the way to do this is via scripting, then what line would allow me to refer to the beam settings? I looked in the documentation and couldn't find anything.

Hi gneplyakh,

 

I’m not sure I understand the problem completely, but I’d suggest scripting with the ZOSAPI. The Physical Optics Propagation (POP) analysis is fully built-into the ZOSAPI (the Paraxial Gaussian Beam isn’t, it can still be called with the ZOSAPI but it might be a hassle to adjust the settings).

Here’s a code snippet that shows how to set the X/Y Waist for POP in the ZOSAPI with Python:

# Open a POP analysis
MyPOP = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.PhysicalOpticsPropagation)

# Retrieve the POP analysis settings
MyPOPSettings = MyPOP.GetSettings()

# ======= This part only serves to dislpay parameters and can be omitted in the final code ======= #
# Initialize parameter counter
ii = 0

# Retrieve first parameter name
parameter = MyPOPSettings.GetParameterName(ii)

# Print parameters until first empty parameter name occurence
while parameter != "":
# Display parameter number and name
print("Parameter number: {0} | Parameter name: {1}".format(ii, parameter))

# Increase parameter counter
ii += 1

# Read next parameter name
parameter = MyPOPSettings.GetParameterName(ii)

# ================================================================================================ #

# Parameter numbers of X/Y Waist
X_Waist_Set = 0
Y_Waist_Set = 1

# New X/Y Waist
X_Waist = 1.23
Y_Waist = 4.56

# Adjust beam X/Y Waist
MyPOPSettings.SetParameterValue(X_Waist_Set, X_Waist)
MyPOPSettings.SetParameterValue(Y_Waist_Set, Y_Waist)

# Apply settings and run POP
MyPOP.ApplyAndWaitForCompletion()

# This is the part where you get whatever result is relevant to you
# MyPOP.GetResults()

# Close the POP analysis
MyPOP.Close()
POP settings after running the code above (and not closing the POP window).

While most settings of POP can be read from the Syntax Help File, some parameters are hidden behind parameter numbers. This is the purpose of the (settings) methods: GetParameterName, GetParameterValue, and SetParameterValue. I’ve added a small piece of code that shows the parameters available and their corresponding numbers. You don’t need that piece of code in the end, but here’s what it shows:

Parameter number: 0 | Parameter name: Waist X
Parameter number: 1 | Parameter name: Waist Y
Parameter number: 2 | Parameter name: Decenter X
Parameter number: 3 | Parameter name: Decenter Y
Parameter number: 4 | Parameter name: Aperture X
Parameter number: 5 | Parameter name: Aperture Y
Parameter number: 6 | Parameter name: Order X
Parameter number: 7 | Parameter name: Order Y

So when you call the SetParameterValue with paramIdx as 0/1 you are setting the beam X/Y Waist respectively.

Let me know if that makes sense or if you need further explanation.

Take care,

 

David


Dear David,

Thank you very much for your reply! This was exactly what I was looking for! 

With kind regards,

Gleb


Reply