Description This subroutine retrieves the mode parameters from a source with the Super Gaussian position apodization function applied.
Syntax GetSourcePosApodSuperGaussianMode( src, n, m, mtype )
Parameters src As Long Node number of the source whose Super Gaussian position apodization parameters are being retrieved.
n As Long Retrieved Super Gaussian mode index (X mode for Hermite, Radial mode for Laguerre)
m As Long Retrieved Super Gaussian mode index (Y mode for Hermite, Azimuthal mode for Laguerre)
mType As Long Retrieved mode type. Returned integer values have the following meaning: 0 Hermite 1 Laguerre 2 Laguerre Cosine 3 Laguerre Sine
Example The following example demonstrates how Super Gaussian position and direction apodization parameters can be retrieved from a source node and reported in the output window.
Sub Main
Dim src As Long src = FindFullName( "Optical Sources.Apodized Source" )
Print "" Print "
'Retrieve Super-Gaussian position apodization Dim p_wx As Double, p_wy As Double, p_x0 As Double, p_y0 As Double Dim p_eX As Double, p_eY As Double Dim p_n As Long, p_m As Long, p_mtype As Long If IsSourcePosApodSuperGaussian( src ) Then
'Retrieve Super-Gaussian position apodization specifications GetSourcePosApodSuperGaussian( src, p_wx, p_wy, p_x0, p_y0 ) GetSourcePosApodSuperGaussianExponents( src, p_eX, p_eY ) GetSourcePosApodSuperGaussianMode( src, p_n, p_m, p_mtype )
'Report the retrieved information Print "" Print "Super-Gaussian position apodization settings:" Print "Wx" & Chr(9) & p_wx Print "Wy" & Chr(9) & p_wy Print "X0" & Chr(9) & p_x0 Print "Y0" & Chr(9) & p_y0 Print "Exp X" & Chr(9) & p_eX Print "Exp Y" & Chr(9) & p_eY Print "Mode N" & Chr(9) & p_n Print "Mode M" & Chr(9) & p_m Print "Mode Type"; Select Case p_mtype Case 0 Print "Hermite" Case 1 Print "Laguerre" Case 2 Print "Laguerre Cosine" Case 3 Print "Laguerre Sine" End Select
Else Print "Source does not use Super Gaussian position apodization." End If
'Retrieve Super-Gaussian direction apodization Dim d_eX As Double, d_eY As Double, d_xAng As Double, d_yAng As Double Dim d_xType As String, d_yType As String If IsSourceDirApodSuperGaussian( src ) Then
'Retrieve Super-Gaussian direction apodization specifications GetSourceDirApodSuperGaussian( src, d_eX, d_eY, d_xType, d_yType, d_xAng, d_yAng )
'Report the retrieved information Print "" Print "Super-Gaussian direction apodization settings:" Print "X Angle" & Chr(9) & d_xAng Print "Y Angle" & Chr(9) & d_yAng Print "Exp X" & Chr(9) & d_eX Print "Exp Y" & Chr(9) & d_eY Print "X Angle Type" & Chr(9) & d_xType Print "Y Angle Type" & Chr(9) & d_yType
Else Print "Source does not use Super Gaussian direction apodization." End If
End Sub
See Also Detailed Source Scripting Commands GetSourcePosApodSuperGaussianExponent
|