Description This subroutine sets the parameters for a volume hologram efficiency specification. 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 primary efficiency specification. For more information, refer to the gratings help topic.
Syntax SetDiffractEfficiencyVolHOE grat, nAve, dN, a, dA, thick, order0, order1, wavl
Parameters grat As Long Node number of the surface whose grating efficiency specification is being modified.
nAve As Double Average refractive index of the emulsion. nAve must obey the following rules: •nAve >= 0.0 •nAve - dN >= 1.0
dN As Double Amplitude variation of the refractive index. dN must obey the following rules: •dN >= 0.0 •dN <= 0.1*nAve •nAve - dN >= 1.0
a As Double Absorption coefficient of the material (system units-1). a must obey the following rules: •a <= 0.1*(2*PI*nAve/wavel)
dA As Double Amplitude variation of the absorption coefficient (system units-1). dA must obey the following rules: •dA >= 0.0 •dA <= 0.1*(2*PI*nAve/wavel) •dA <= a
thick As Double Hologram emulsion thickness (system units). The emulsion thickness must obey the following rules: •thick >= 0.0 •thick >= 0.1*wavel
order0 As String Meaning of the 0th diffraction order. Options are:
order1 As String Meaning of the 1st diffraction order. Options are:
wavl As Double This parameter is used to check that the parameters of the volume hoe efficiency are valid and lie within the allowed ranges.
Examples The example below demonstrates how to retrieve the volume hologram efficiency parameters from the primary efficiency table, modify the refractive index amplitude variation and then set the updated parameters back to the primary efficiency table.
Sub main
Dim grat As Long grat = FindFullName( "Geometry.Elem 1.Surf 2" )
Dim nAve As Double, dN As Double, a As Double, dA As Double, thick As Double Dim order1 As String, order2 As String Dim wavl As Double GetDiffractEfficiencyVolHOE( grat, nAve, dN, a, dA, thick, order1, order2, wavl )
Print "Grating settings:" Print "Node: " & Chr(9) & GetFullName( grat ) Print "N avg: " & Chr(9) & nAve Print "delta N: " & Chr(9) & dN Print "Absorption: " & Chr(9) & a Print "delta A: " & Chr(9) & dA Print "Thickness: " & Chr(9) & thick Print "Order 1: " & Chr(9) & order1 Print "Order 2: " & Chr(9) & order2 Print "Wavl: " & Chr(9) & wavl
'Change dN dN = dN + 0.005 SetDiffractEfficiencyVolHOE( grat, nAve, dN, a, dA, thick, order1, order2, wavl ) Update
End Sub
See Also Diffraction Grating Script Commands
|