AnsweredAssumed Answered

Collect Simulation data with python script

Question asked by Confused on Dec 6, 2011
Latest reply on Dec 7, 2011 by Confused
Hello

I am new to both EMPro and Python and I have a problem

I want to collect s-parameter data from a simulation (after the entire simulation is finished) to decide if the lenght of a electrical conductor should be longer or short for the next simulation. This shall make a bigger script to make a number of simulations until the s-parameter has reached a value which is inside limit.
I now how to control everything exept to get the simulation data from a script.
I have look at the script in the example "Microstrip_patch_par" and in that script I see how to set the parameters for next simulation

From the python help I have found the following
empro.toolkit.output.sParametersRaw(ProjectID, simId)

The problem is that I can not get this to work when I am using the below function in a script(only this line in the script)
data=empro.toolkit.output.sParametersRaw("H:\EMPro\LowPassFilterTest.ep", "testing sweep1")#, Hight1=4 mm, Hight2=10 mm " )
This gives me an error
Python Error: : line 1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Agilent\EMPro2009\bin\Win64.NET2005\empro\toolkit\sparam.py", line 26, in sParametersRaw
sim = result_tree.ProjectResultTree(projectId)[simId]
File "s:\hped\builds\sr\amv210-64\rday\opt\build\projects\empro\install\empro\opt\win32\bin\Win64.NET2005\empro\toolkit\result_tree.py", line 20, in __getitem__
KeyError: 'testing sweep1, Hight1=4 mm, Hight2=10 mm'

So now to the questions
1 How do I find out about the project ID (is it the same as the folder name)
2 Am I using the correct function ? (I want to collect the S-parameter data, And I want to see the magnitude of S21 at frequency f)
3 Is there anyone out there which has an example of a working script where data is collected from a finished simulation ?
4 Shall projectID be the entire path (e.g. "C:\myEMProfolder\myproject")

I am Using
EM Pro 2009 (210.300) 64-bit

Best regards
Confused  

Outcomes