mwavepy.networkSet.NetworkSet

class mwavepy.networkSet.NetworkSet(ntwk_set)

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 ititialization, 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 accessable 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.

Attributes

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

Methods

__init__ Initializer for NetworkSet
element_wise_method calls a given method of each element and returns the result as
plot_uncertainty_bounds_component plots mean value of the NetworkSet with +- uncertainty bounds
plot_uncertainty_bounds_s_db this just calls
set_wise_function calls a function on a specific property of the networks in
uncertainty_ntwk_triplet returns a 3-tuple of Network objects which contain the

Previous topic

mwavepy.networkSet.NetworkSet.uncertainty_ntwk_triplet

Next topic

mwavepy.networkSet.NetworkSet.inv

This Page