Description Toggles the flag determining whether phase is added modulo 2p or continuously across grating lines. By default, a grating adds phase modulo 2p.
Syntax SetDiffractAddPhasePerLine surfNode, phaseFlag
Parameters surfNode As Long Surface node ID on which the grating is applied.
phaseFlag As Boolean If True, add phase continuously across grating lines. If False, add phase modulo 2p across grating lines.
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
|