Script icon

Plot Received Power Versus Parameter | WaveFarer

Compare received power versus either distance or angle in a graph.

The Plot Received Power vs Parameter script allows users to select a simulation containing a parameter sweep and generate a graph of received power versus the swept parameter's values. It is a fully featured script with an interactive user interface.

Use Cases

The following examples are just a few of the instances in which a plot of either received power versus distance or received power versus angle is of interest:

The script can be applied to any simulation that meets the following conditions:

Workflow

Execute the macro using the following steps:

  1. Download the Plot Received Power vs Parameter script.
  2. Right-click on the Scripts branch of the Project Tree, then select Import Scripts.
  3. Right-click on the imported script in the Project Tree, then select Execute.

Once the script is executed, a window opens allowing users to specify which result to plot.

  1. Specify the desired result by choosing from the drop-down menus.
  2. Click OK.

The projects in the editor's drop-down menu match those listed in the Results browser. If the desired project is not availabe through the script, it can be added in the Results browser.

The script will access the swept parameter's name and insert it between brackets in the next window. The editor allows users to specify the parameter's units from the drop-down menu, as well as select which transmitters and receivers to plot.

  1. Specify if the simulation's parameter sweep units using the drop-down menu.
  2. Check at least one transmitter and at least one receiver.
  3. Click OK.

The last window will open allowing users to specify where to graph the data.

  1. Select whether to create a graph or use an existing one using the Graph drop-down menu.
  2. If desired, change the Plot Name, Graph Title, and axis labels.
  3. Click OK to close the editor.

Two special tags, [simulationId] and [parameterName], will be evaluated during script execution. They can be used in any of WaveFarer's fields.

The script loads received power for each value in the parameter sweep and adds it to a Graph to the Project Tree.

  1. Double-click on the graph in the Project Tree to view the new plot.