Xtracting S11 data via python
-
wrote on 27 Nov 2018, 20:30 last edited by
Hi everybody,
I am trying to extract S11 data of an EdgeSource sensor from a broadband simulation via python, however I found only the way how to extract frequency data.
How can I access the S11 data as well? Part of my code issimEM_results = sim.Results()
S11_axis = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Data.AxisS11_data = ???
Basically I am looking for equivalent to SEMCAD X 14.8.6 XNumPy.AsArray() function.
Thanks,
Spuky
-
Hi everybody,
I am trying to extract S11 data of an EdgeSource sensor from a broadband simulation via python, however I found only the way how to extract frequency data.
How can I access the S11 data as well? Part of my code issimEM_results = sim.Results()
S11_axis = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Data.AxisS11_data = ???
Basically I am looking for equivalent to SEMCAD X 14.8.6 XNumPy.AsArray() function.
Thanks,
Spuky
@spuky basically, you need to:
- load the data object (i.e. read data from disk and push it through the postprocessing pipeline)
S11 = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Update()
- get the data you need from the data object
S11_axis = S11.Data.Axis S11_data = S11.Data.GetComponent(0)
Note that, once you have executed step 1, you can easily explore what the data object contains by using auto-completion in the Console environement: just type "S11" followed by a dot (.) in the Console and you can navigate its data structure.
-
wrote on 28 Nov 2018, 09:24 last edited by
Hello Sylvain,
Thank you for your quick answer however when I do
S11 = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Update()
The S11 is True (Boolean) and it does not contain any Data.
Regards,
Spuky
-
Note: I would even recommend to raise an exception if the pipeline fails to update, before continuing with the data processing. This makes the scripts easier to maintain in the long run:
S11 = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"] assert S11.Update(), 'Failed to update pipeline' S11_data = S11.Data.GetComponent(0)