Navigation: Scripting Reference Manual > Functions & Subroutines > SetDiffractEfficiencyFileSecondary

 

SetDiffractEfficiencyFileSecondary

 

Contact Us: fredsupport@photonengr.com

 

Description

This command specifies the diffraction efficiency file to be used for a grating surface whose efficiency table type is "Full efficiency table".  If the target grating surface has a simple efficiency table definition, calling this subroutine on that surface will change the efficiency table type to "Full efficiency table" and set the source file.  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 modifies the secondary efficiency specification.  For more information, refer to the gratings help topic.

 

 

Syntax

SetDiffractEfficiencyFileSecondary gratNode, efficiencyFile

 

 

Parameters

gratNode As Long

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

 

efficiencyFile As String

Full path name to the file which is being loaded into the efficiency table.

 

 

Example

The following example specifies the path to a grating efficiency file and instructs a grating surface node to use the contents of the file in its efficiency table.

 

Sub Main

 

    Dim fName As String

    fName = GetDocDir() & "\test_1order_1.0_azi0-360.txt"

 

    Dim gratNode As Long

    gratNode = FindFullName( "Geometry.Plane-NewGrating.Surface" )

 

    SetDiffractEfficiencyFileSecondary gratNode, fName

 

End Sub

 

 

See Also

Diffraction Grating Script Commands

Diffraction Gratings

 

 

 

 

 

Copyright © Photon Engineering, LLC