Description This function retrieves the Super Gaussian direction apodization function parameters from a source node.
Syntax success = GetSourceDirApodSuperGaussian( src, expX, expY, xType, yType, xAngle, yAngle )
Parameters success (Boolean) Returned value indicating whether the parameters were successfully retrieved from the source.
src As Long Node number of the source whose Super Gaussian direction apodization parameters are being retrieved.
expX As Double Super Gaussian exponent in the X axis.
expY As Double Super Gaussian exponent in the Y axis.
xType As String Type string indicating the interpretation of XAngle. Valid type strings are: "Full width at half power" "Half width at half power" "Full width at 1/e amplitude point" "Half width at 1/e amplitude point" "Full width at 1/e^2 power point" "Half width at 1/e^2 power point" "Full width at 1% power point" "Half width at 1% power point" "Variance power full width (second moment)" "Variance power half width (second moment)"
yType As String Type string indicating the interpretation of YAngle. Valid type strings are: "Full width at half power" "Half width at half power" "Full width at 1/e amplitude point" "Half width at 1/e amplitude point" "Full width at 1/e^2 power point" "Half width at 1/e^2 power point" "Full width at 1% power point" "Half width at 1% power point" "Variance power full width (second moment)" "Variance power half width (second moment)"
xAngle As Double Divergence angle in degrees along the X axis, whose meaning is given by the xType parameter.
yAngle As Double Divergence angle in degrees along the Y axis, whose meaning is given by the yType parameter.
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
|