Navigation: Scripting Reference Manual > Functions & Subroutines > GetDiffractPhaseOffsetPerLine

 

GetDiffractPhaseOffsetPerLine

 

Contact Us: fredsupport@photonengr.com

 

Description

Gets the grating line offset being used with the continuous phase addition method for diffraction gratings.

 

 

Syntax

phaseOffset = GetDiffractPhaseOffsetPerLine( surfNode )

 

 

Parameters

phaseOffset (Double)

Value, in grating line pairs, of the offset between the surface center and the zero phase point in the grating.  Can be non-integer values.

 

surfNode As Long

Surface node ID on which the grating is applied.

 

 

Example

The following script example queries a surface with a grating for its phaseFlag.  If phase is being added continuously across grating lines (phaseFlag = True), the phase offset per line is printed to the output window.  If phase is being added modulo 2p across grating lines (phaseFlag = False), the phase flag status is changed and the offset is specified.

 

Dim surfNode As Long

Dim phaseFlag As Boolean

 

'surface with the grating applied

surfNode = FindFullName( "Geometry.Grating.Surface" )

 

'check phase addition flag, modify and print information

phaseFlag = GetDiffractAddPhasePerLine( surfNode )

If phaseFlag Then

          Print "Grating uses continuous phase addition method.  Offset is: " & GetDiffractPhaseOffsetPerLine( surfNode )

Else

          Print "Grating uses modulo 2pi phase addition method."

          Print "Modifying phase method and offset."

          SetDiffractAddPhasePerLine surfNode, True

          SetDiffractPhaseOffsetPerLine surfNode, 5

End If

 

 

See Also

Diffraction Grating Script Commands

Diffraction Gratings

SetDiffractPhaseOffsetPerLine

 

 

 

 

 

Copyright © Photon Engineering, LLC