Knowledge article banner image.

Analyze Codebook: CDF of EIRP

Bulk-process numerous beam states.

The Analyze Codebook: CDF of EIRP script plots the cumulative distribution function (CDF) of the max hold for an antenna array with numerous beam states. Each beam state specified in a text file is defined by a set of port magnitude and phase values. This capability supports bulk processing of a codebook by allowing users to analyze tens or hundreds of individual array states.

In addition to the functionality documented below, the Analyze Codebook: CDF of EIRP script also serves as a starting point for a customized workflow. XF's scripting API offers access to all result types, allowing script extensions that support bulk processing of power density and total radiated power, for example. Script adaptations also support various codebook file formats, including multiple steady-state frequencies and beam pairs. Users in need of assistance with customizing this script should contact Remcom technical support.


In order for the script to function properly, users must set up a project and create an FDTD simulation:

Users must also create a superposition simulation:

Adding multiple superpositions or entering port magnitude and phase values is unnecessary when creating the superposition simulation. The script accesses the specified superposition and determines the port magnitude and phase values as it reads each beam state from the codebook.

Lastly, users must create a comma-separated values (CSV) codebook file that contains magnitude and phase values for each port selected when creating the superposition simulation. The order in which they are listed in the superposition editor must match their order in the CSV file.

Each line of the codebook file corresponds to one beam state.

\begin{equation*} P_{av,1},\angle_1,P_{av,2},\angle_2,P_{av,3},\angle_3,...,P_{av,n},\angle_n \end{equation*}


Lines in the codebook file that start with the character !, #, or / are treated as comments and ignored.


After meeting the prerequisites, users can run the macro by following these steps:

  1. Download the Analyze Codebook CDF of EIRP.xmacro
  2. Right-click on Scripts in the Project Tree and select Import Scripts.

Once the script is available, select a result.

  1. Open the Results browser.
  2. In the lower portion of the Results browser, select a steady-state far zone result from the superposition simulation.
  3. In the Scripts branch of the Project Tree, right-click on Analyze Codebook CDF of EIRP and choose Execute.

In the window that opens, select a target graph.

  1. Use the Frequency drop-down arrow to choose the steady-state frequency.
  2. Below the Codebook field, click the browse button to choose the desired CSV file.
  3. Use the Target Graph drop-down menu to specify where to add the CDF of EIRP plot.
  4. Click OK.

The script loads the far zone sensor, reads the CSV codebook file, sets the port values for each beam state, determines the max hold for all the beam states, and adds a plot of the CDF of the max hold to the specified graph.