How to get all the received power at once?
Dear all,
Recently I had a POSTFEKO file need to get all received power at once, is there any solution can help us accomplish it rather than, like below screenshot that I need to drag and drop to another 2D plot windows respectively?
Because I have 256 results, it is impossible to drag and drop each file.
BR/Teng
Answers
-
You can use a Lua automation script. I looked up the FarFieldReceivingAntennaData in the Altair_Feko_Scripting_API_Reference_Guide.pdf in the help folder for some inspiration.
Try the code below, obviously you would need to add some FOR loops, but the below is a good place to start. Example model attached.
app = pf.GetApplication() app:NewProject() app:OpenFile("Eqv_Source_Coupling1.fek") solutionConfig1 = app.Models[1].Configurations[1] solutionConfig2 = app.Models[1].Configurations[2] solutionConfig3 = app.Models[1].Configurations[3] -- Retrieve the 'FarFieldReceivingAntennaData' called 'FarFieldReceivingAntenna1' -- Note that the 'FarFieldReceivingAntennaData' is retrieved in the same way as the -- 'ReceivingAntennaData' farFieldRxAntennaData1 = solutionConfig1.ReceivingAntennas["ReceivingAntenna1"] farFieldRxAntennaData2 = solutionConfig2.ReceivingAntennas["ReceivingAntenna2"] farFieldRxAntennaData3 = solutionConfig3.ReceivingAntennas["ReceivingAntenna3"] -- Add the receiving antenna data to a Cartesian graph graph = app.CartesianGraphs:Add() receivingAntennaTrace1 = graph.Traces:Add(farFieldRxAntennaData1) receivingAntennaTrace2 = graph.Traces:Add(farFieldRxAntennaData2) receivingAntennaTrace3 = graph.Traces:Add(farFieldRxAntennaData3) mydata1 = farFieldRxAntennaData1:GetDataSet() mydata2 = farFieldRxAntennaData2:GetDataSet() mydata3 = farFieldRxAntennaData3:GetDataSet() print(mydata1[1].ActivePower) print(mydata2[1].ActivePower) print(mydata3[1].ActivePower)
0 -
Hi Mel,
Thanks for your sharing, it works!
But another question is, is there a 'recode macro' function in POSTFEKO? Just like the function in CADFEKO, so that I can easily record each step I have done, for example, how to write a code so that all my result in plot automatically in dB
BR/Teng
0 -
Hi Teng Chang
Macro recording for POSTFEKO is not available yet. It seems logical to have since CADFEKO has had it for many years already.
But development priorities elsewhere has delayed this feature. I will add your request to the development ticket.
0