Script icon

Plot Phase Difference | WaveFarer

Compute the phase difference between two plots.

The Plot Phase Difference script allows users to select two plots from an existing graph and compute the angular difference between them. It is a fully featured script with an interactive user interface.

Use Case

Inconsistencies may exist between the measurement setup and user-defined antenna in WaveFarer. This script can be used as a part of one import verification method, which compares the phase difference between the two receivers of the physical prototype to that of the WaveFarer simulation. Users can reference the User-Defined Antennas tutorial for an example.

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


Execute the macro using the following steps:

  1. Download the Plot Phase Difference 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. In the upper portion of the editor, specify the existing graph and two plots by choosing from the drop-down menus.
  2. In the lower portion of the editor, specify the destination for the phase difference by choosing from the drop-down menus.
  3. Click OK to close the editor.

The script will access the data associated with the two plots, subtract them, and generate a new plot as specified in the destination fields. A special tag, [graph-axis-title], will be evaluated during script execution and serves as a convenient way to reuse the x-axis title from the source graph.

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