Navigation: Scripting Reference Manual > Functions & Subroutines > GetSourcePosApodSuperGaussian

 

GetSourcePosApodSuperGaussian

 

Contact Us: fredsupport@photonengr.com

 

Description

This function retrieves the width and offset parameters from a source with the Super Gaussian position apodization function applied.

 

 

Syntax

success = GetSourcePosApodSuperGaussian( src, wX, wY, x0, y0 )

 

 

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 position apodization parameters are being retrieved.

 

wX As Double

Retrieved 1/e2 semi-width of the apodization function in the X direction.

 

wY As Double

Retrieved 1/e2 semi-width of the apodization function in the Y direction.

 

x0 As Double

Offset of the apodization function center in the X direction relative to the source's local origin.

 

y0 As Double

Offset of the apodization function center in the Y direction relative to the source's local origin.

 

 

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

GetSourceDirApodSuperGaussian

GetSourcePosApodSuperGaussianExponent

GetSourcePosApodSuperGaussianMode

SetSourceDirApodSuperGaussian

SetSourcePosApodSuperGaussian

 

 

 

 

 

Copyright © Photon Engineering, LLC