class skrf.networkSet.NetworkSet(ntwk_set, name=None)[source]

A set of Networks.

This class allows functions on sets of Networks, such as mean or standard deviation, to be calculated conveniently. The results are returned in Network objects, so that they may be plotted and saved in like Network objects.

This class also provides methods which can be used to plot uncertainty bounds for a set of Network.

The names of the NetworkSet properties are generated dynamically upon initialization, and thus documentation for individual properties and methods is not available. However, the properties do follow the convention:

>>> my_network_set.function_name_network_property_name

For example, the complex average (mean) Network for a NetworkSet is:

>>> my_network_set.mean_s

This accesses the property ‘s’, for each element in the set, and then calculates the ‘mean’ of the resultant set. The order of operations is important.

Results are returned as Network objects, so they may be plotted or saved in the same way as for Network objects:

>>> my_network_set.mean_s.plot_s_mag()
>>> my_network_set.mean_s.write_touchstone('mean_response')

If you are calculating functions that return scalar variables, then the result is accessible through the Network property .s_re. For example:

>>> std_s_deg = my_network_set.std_s_deg

This result would be plotted by:

>>> std_s_deg.plot_s_re()

The operators, properties, and methods of NetworkSet object are dynamically generated by private methods

  • __add_a_operator()
  • __add_a_func_on_property()
  • __add_a_element_wise_method()
  • __add_a_plot_uncertainty()

thus, documentation on the individual methods and properties are not available.


mean_s_db the mean magnitude in dB.
std_s_db the mean magnitude in dB.


__init__ Initializer for NetworkSet
animate animate a property of the networkset
copy copies each network of the network set.
cov covariance matrix
datetime_index Create a datetime index from networks names
element_wise_method calls a given method of each element and returns the result as a new NetworkSet if the output is a Network.
filter filter networkset based on a string in
from_dir Create a NetworkSet from a directory containing Networks
from_s_dict Create a NetworkSet from a dictionary of s-parameters
from_zip creates a NetworkSet from a zipfile of touchstones.
interpolate_from_network Interpolate a Network from a NetworkSet, as a multi-file N-port network.
ntwk_attr_2_df Converts an attributes of the Networks within a NetworkSet to a Pandas DataFrame
plot_logsigma plots the uncertainty for the set in units of log-sigma.
plot_minmax_bounds_component plots mean value of the NetworkSet with +- uncertainty bounds in an Network’s attribute.
plot_minmax_bounds_s_db this just calls
plot_minmax_bounds_s_db10 this just calls
plot_minmax_bounds_s_time_db this just calls
plot_uncertainty_bounds_component plots mean value of the NetworkSet with +- uncertainty bounds in an Network’s attribute.
plot_uncertainty_bounds_s Plots complex uncertainty bounds plot on smith chart.
plot_uncertainty_bounds_s_db this just calls
plot_uncertainty_bounds_s_time_db this just calls
plot_uncertainty_decomposition plots the total and component-wise uncertainty
rand return n random samples from this NetworkSet
scalar_mat scalar ndarray representing param data vs freq and element idx
set_wise_function calls a function on a specific property of the networks in this NetworkSet.
signature Visualization of a NetworkSet.
sort sort this network set.
to_dict Returns a dictionary representation of the NetworkSet
to_s_dict Converts a NetworkSet to a dictionary of s-parameters
uncertainty_ntwk_triplet returns a 3-tuple of Network objects which contain the mean, upper_bound, and lower_bound for the given Network attribute.
write Write the NetworkSet to disk using write()
write_spreadsheet Write contents of network to a spreadsheet, for your boss to use.