Navigation: Scripting Reference Manual > Functions & Subroutines > SetDiffractEfficiencyVolHOESecondary

 

SetDiffractEfficiencyVolHOESecondary

 

Contact Us: fredsupport@photonengr.com

 

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 secondary efficiency specification.  For more information, refer to the gratings help topic.

 

Syntax

SetDiffractEfficiencyVolHOESecondary 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.

 

dN As Double

Amplitude variation of the refractive index.

 

a As Double

Absorption coefficient of the material (system units-1).

 

dA As Double

Amplitude variation of the absorption coefficient (system units-1).

 

thick As Double

Hologram emulsion thickness (system units).

 

order0 As String

Meaning of the 0th diffraction order. Options are:

Value

Meaning

none

No component is propagated along the 0th order direction.  Order0 can only be set to none if order1 is also none.

signal

The 0th order contains the response wave of the grating.  Order1 can be either none or reference.

reference

The 0th order contains the reference wave of the grating.  Order 1 can be either none or signal.

 

order1 As String

Meaning of the 1st diffraction order. Options are:

Value

Meaning

none

No component is propagated along the 1st order direction.  The value of order0 can be set to none, signal, or reference.

signal

The 1st order contains the response wave of the grating.  The value of order0 must be set to reference.

reference

The 1st order contains the reference wave of the grating.  The value of order0 must be set to signal.

 

wavl As Double

Mean wavelength (microns) at which the hologram was recorded.

 

Examples

The example below demonstrates how to retrieve the volume hologram efficiency parameters from the secondary efficiency table, modify the refractive index amplitude variation and then set the updated parameters back to the secondary 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

    GetDiffractEfficiencyVolHOESecondary( 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

    SetDiffractEfficiencyVolHOESecondary( grat, nAve, dN, a, dA, thick, order1, order2, wavl )

    Update

 

End Sub

 

See Also

Diffraction Grating Script Commands

Diffraction Gratings

 

 

 

 

 

Copyright © Photon Engineering, LLC