Description Returns the standard deviation of the data in a 2D ARN whose data type is Double.
Syntax dSD = ARNComputeStandardDev( arn )
Parameters dSD (Double) Return value corresponding to the standard deviation of the 2D ARN data.
arn As long Node number of the ARN whose standard deviation is being computed.
Example The following example performs a raytrace, calculates an irradiance distribution and then reports the integrated power and standard deviation of the data using multiple methods.
Sub Main
ARNDeleteAllNodes TraceCreate
Dim ana As Long, arn As Long, aInc As Double, bInc As Double Dim cellStats As T_ARN_2D_CELL_STATS
'Calculate irradiance and retriev ana = FindFullName( "Analysis Surface(s).Analysis - high res" ) IrradianceToARN(ana, "Irradiance", arn) ARNGet2DPixelSize( arn, aInc, bInc ) ARNCompute2DCellStatistics( arn, cellStats )
'Report quantitative information from ARN Print "" Print "Power" & Chr(9) & ARNComputeTotalPower (arn ) Print "Integral" & Chr(9) & ARNComputeIntegral( arn ) Print "Sum / Pixel Area" & Chr(9) & ARNComputeSum( arn ) * (aInc * bInc) 'pixel area Print "sigma1" & Chr(9) & ARNComputeStandardDev( arn ) Print "sigma2" & Chr(9) & Sqr(cellStats.AvgSqCellVal - cellStats.AvgCellVal^2)
End Sub
See Also
|