Visualization#

This section lists modules for creating and editing data outside AEDT.

Plot fields and data outside AEDT#

PyAEDT supports external report capabilities available with installed third-party packages like numpy, pandas, matplotlib, and pyvista.

solutions.SolutionData

Contains information from the GetSolutionDataPerVariation() method.

solutions.FieldPlot

Provides for creating and editing field plots.

solutions.FfdSolutionData

Provides antenna array far-field data.

ModelPlotter is a class that benefits of pyvista package and allows to generate models and 3D plots.

ModelPlotter

Manages the data to be plotted with pyvista.

The following methods allows to read and check touchstone files.

read_touchstone

Load the contents of a Touchstone file into an NPort.

check_touchstone_files

Check passivity and causality for all Touchstone files included in the folder.

Using the above methods you are getting an object of a class TouchstoneData. The class TouchstoneData is based on scikit-rf, Additional methods are added to provide easy access to touchstone curves.

TouchstoneData.get_insertion_loss_index

Get all insertion losses.

TouchstoneData.plot_insertion_losses

Plot all insertion losses.

TouchstoneData.plot

Plot a list of curves.

TouchstoneData.plot_return_losses

Plot all return losses.

TouchstoneData.get_mixed_mode_touchstone_data

Transform network from single ended parameters to generalized mixed mode parameters.

TouchstoneData.get_return_loss_index

Get the list of all the Returnloss from a list of exctitations.

TouchstoneData.get_insertion_loss_index_from_prefix

Get the list of all the Insertion Losses from prefix.

TouchstoneData.get_next_xtalk_index

Get the list of all the Near End XTalk a list of excitation.

TouchstoneData.get_fext_xtalk_index_from_prefix

Get the list of all the Far End XTalk from a list of exctitations and a prefix that will be used to retrieve driver and receivers names.

TouchstoneData.plot_next_xtalk_losses

Plot all next crosstalk curves.

TouchstoneData.plot_fext_xtalk_losses

Plot all fext crosstalk curves.

TouchstoneData.get_worst_curve

Analyze a solution data object with multiple curves and find the worst curve.

Here an example on how to use TouchstoneData class.

from pyaedt.generic.touchstone_parser import TouchstoneData

ts1 = TouchstoneData(touchstone_file=os.path.join(test_T44_dir, "port_order_1234.s8p"))
assert ts1.get_mixed_mode_touchstone_data()
ts2 = TouchstoneData(touchstone_file=os.path.join(test_T44_dir, "port_order_1324.s8p"))
assert ts2.get_mixed_mode_touchstone_data(port_ordering="1324")

assert ts1.plot_insertion_losses(plot=False)
assert ts1.get_worst_curve(curve_list=ts1.get_return_loss_index(), plot=False)
...