Using a Lua Script to Configure Graphs

View the Lua script to set up the graphs for the input reflection coefficient and circular components of the far field.

The step-by-step instructions to create this script is beyond the scope of the Feko Getting Started Guide, but it is recommended to view the script and to compare it with setting up Graph 1 and Graph 2 from Example 3.

app = pf.GetApplication()
-- Graph 1
graph1 = app.CartesianGraphs:Add()
excitationTrace = graph1.Traces:Add(app.Models[1].Configurations[1].Excitations[1])
excitationTrace.Quantity.ValuesScaledToDB = true
graph1.Footer.Text = ""
graph1.Legend.Position = pf.Enums.GraphLegendPositionEnum.OverlayBottomRight

-- Graph 2
graph2 = app.CartesianGraphs:Add()
farFieldTraceLHC = graph2.Traces:Add(app.Models[1].Configurations[1].FarFields[1])
farFieldTraceLHC.Quantity.Type = pf.Enums.FarFieldQuantityTypeEnum.Gain
farFieldTraceLHC.Quantity.Component = pf.Enums.FarFieldQuantityComponentEnum.LHC
farFieldTraceLHC.Quantity.ValuesScaledToDB = true

farFieldTraceRHC = farFieldTraceLHC:Duplicate()
farFieldTraceRHC.Quantity.Type = pf.Enums.FarFieldQuantityTypeEnum.Gain
farFieldTraceRHC.Quantity.Component = pf.Enums.FarFieldQuantityComponentEnum.RHC
farFieldTraceRHC.Label = "FarField2"
farFieldTraceRHC.Quantity.ValuesScaledToDB = true
graph2.Footer.Text = ""
graph2.Legend.Position = pf.Enums.GraphLegendPositionEnum.OverlayBottomRight
Note: For more information regarding scripts and the application programming interface (API), see the .