Navigation: Scripting Reference Manual > Functions & Subroutines > ARNCreate2DComplexFromComplex3D

 

ARNCreate2DComplexFromComplex3D

 

Contact Us: fredsupport@photonengr.com

 

Description

This function slices a given 2D complex field component from a 3D complex field result.  This function would be used, for example, to extract the X field component from an ARN containing the results of a vector field calculation.

 

 

Syntax

subARN = ARNCreate2DComplexFromComplex3D( arnNode, arrayInd )

 

 

Parameters

subARN (Long)

Node number of the new ARN containing the 2D complex data subset of the original 3D dataset.

 

arnNode As Long

Node number of the ARN whose data is being extracted to form the 2D ARN.  When arnNode contains the results of a vector field calculation,

 

arrayInd As Long

Specifies the array index which will be extracted from the 3D complex field result.  For a vector field calculation, 0 corresponds to the X field component, 1 corresponds to the Y field component and 2 corresponds to the Z field component.

 

 

Example

The following example creates several Analysis Results Nodes and manipulates their data by either taking a Log or performing an FFT.

 

Sub Main

 

    ARNDeleteAllNodes()

    DeleteRays()

    TraceCreate()

 

    Dim anaNode As Long

    anaNode = FindFullName( "Analysis Surface(s).DetectorAna" )

 

    Dim rayCnt As Long

    Dim arnNode As Long

    rayCnt = IrradianceToARN( anaNode, "Detector Irradiance", arnNode )

 

    'Log10 relative

    Dim newARN As Long

    newARN = ARNCreateCopy( arnNode, "Detector Irradiance Rel." )

    ARNLog10WithRelativeFloor( newARN, 2, False, True )

    ARNDisplayInChart( newARN, "" )

 

    'Log10 absolute

    newARN = ARNCreateCopy( arnNode, "Detector Irradiance Abs." )

    ARNLog10WithAbsoluteFloor( newARN, 66000, True, True )

    ARNDisplayInChart( newARN, "" )

 

    'FFT

    anaNode = FindFullName( "Analysis Surface(s).FFTAna" )

    IrradianceToARN( anaNode, "Detector Irradiance", arnNode )

    newARN = ARNCreate2DComplexFromDouble( arnNode )

    ARNFFT2D( newARN )

    ARNDisplayInChart( newARN, "" )

 

    'Vector Field

    Dim xFld As Long, yFld As Long, zFld As Long

    VectorFieldToARN( anaNode, "Detector Vector Field", arnNode )

    xFld = ARNCreate2DComplexFromComplex3D( arnNode, 0 )

    yFld = ARNCreate2DComplexFromComplex3D( arnNode, 1 )

    zFld = ARNCreate2DComplexFromComplex3D( arnNode, 2 )

    ARNFFT2D( xFld )

    ARNFFT2D( yFld )

    ARNFFT2D( zFld )

    ARNDisplayInChart( xFld, "" )

    ARNDisplayInChart( yFld, "" )

    ARNDisplayInChart( zFld, "" )

 

End Sub

 

See Also

ARN Script Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC