Obtaining Data Angular Range via Scripting

Download the FRED script: Obtaining-Angular-Range-via-Script.frs

Introduction

This script provides the user with numerical values for the upper and lower bounds of the polar intensity data collected at a user‐selected Directional Analysis Entity (DAE) Analysis Surface. This is done by looping through the data array and determining the maximum and minimum angles for which there are intensity values above the cut‐off set by the user. This script uses a number of FRED’s auxiliary ARN functions and subroutines to access the required information.

Explanation


Fig 1. Example of polar intensity plot shown in the visualization view

After calculating the polar intensity on a DAE Analysis Surface we can obtain the data in graphical form (Fig 1) with supplemental information outputted to the Output Window (Fig 2)


Fig 2. Example data written to the Output Window after calculation of polar intensity

However, it might be convenient to be able to quickly access the angular limits of this data without having to save the numerical data to a file and investigate. This script automates this investigation.

The script traces the rays and stores the data in an ARN (“Analysis Results Node”). Using the ARNGetDataAsDoubleArray subroutine the data becomes available as a 2d array of data equivalent to the image shown on the right side of Fig 3. The number of cells and angular resolution of each cell in this data array is determined by the Divisions parameter of the DAE

The script then loops through the cells and determines the lower and upper cell values for the data. The cell‐centered angular values for these bounds are written to the Output Window.

Fig 3. Example script output written to the Output Window

Still need help? Contact Us Contact Us