Navigation: Scripting Reference Manual > Functions & Subroutines > ARNLog10WithRelativeFloor

 

ARNLog10WithRelativeFloor

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine modifies the data in an ARN by taking the base 10 logarithm of the data.  A relative floor value on the logarithm is provided below which the actual logarithm of the data is not computed.  This subroutine modifies an existing Analysis Results Node by taking the Log of the dataset down to a floor N orders of magnitude below the peak.

 

 

Syntax

ARNLog10WithRelativeFloor arnNode, floorCutoff, showFloor, modifyName

 

 

Parameters

arnNode As Long

Node number of the ARN whose data is being modified.

 

floorCutoff As Double

Specifies the floor value relative to the peak, in orders of magnitude, below which the Log is not taken.

 

showFloor As Boolean

When set to True, the floor values are included in the chart data.  When set to False, cells in the dataset below the specified floor are populated with hole values (1E+308).

 

modifyName As Boolean

When set to True, the display title and name of the ARN is modified from Name to Log(Name).  When set to False, no modifications to the title or name are made.

 

 

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, "" )

 

End Sub

 

See Also

ARN Script Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC