Navigation: Scripting Reference Manual > Functions & Subroutines > GetDiffractEfficiencyTableSecondary

 

GetDiffractEfficiencyTableSecondary

 

Contact Us: fredsupport@photonengr.com

 

Description

Retrieves the simple diffraction efficiency table from a surface with a grating property.  Gratings have a primary and secondary efficiency specification that allows an accounting of which side of the grating a ray is incident from.  This script command retrieves the secondary efficiency specification.  For more information, refer to the gratings help topic.

 

Syntax

GetDiffractEfficiencyTableSecondary n, efficiencies

 

Parameters

n As Long

Node number of the surface whose grating efficiency table is being retrieved.

 

efficiencies() As Double

Array that is populated with the diffraction efficiency data.

 

Remarks

The following example retrieves the simple diffraction efficiency table from a grating surface and reports the efficiency data array to the output window.

 

Sub Main

 

    'Node of the grating surface

    Dim gratingSurf As Long

    gratingSurf = FindFullName( "Geometry.Elem 1.Surf 1" )

 

    'Retrieve the efficiency table

    Dim efficiencies() As Double

    GetDiffractEfficiencyTableSecondary( gratingSurf, efficiencies )

 

    'Print the efficiency data to the output window

    Print "Retrieved secondary efficiency table:"

    Dim ind1 As Long, ind2 As Long

    For ind1 = 0 To UBound( efficiencies, 1 )

        For ind2 = 0 To UBound( efficiencies, 2 )

            Print efficiencies( ind1, ind2 );

        Next

        Print ""

    Next

 

End Sub

 

See Also

Diffraction Grating Script Commands

Diffraction Gratings

 

 

 

 

 

Copyright © Photon Engineering, LLC