skrf.networkSet.func_on_networks
- skrf.networkSet.func_on_networks(ntwk_list, func, attribute='s', name=None, *args, **kwargs)[source]
Applies a function to some attribute of a list of networks.
Returns the result in the form of a Network. This means information that may not be s-parameters is stored in the s-matrix of the returned Network.
- Parameters:
ntwk_list (list of
Network
objects) – list of Networks on which to apply func tofunc (function) – function to operate on ntwk_list s-matrices
attribute (string) – attribute of Network’s in ntwk_list for func to act on
*args (arguments and keyword arguments) – passed to func
**kwargs (arguments and keyword arguments) – passed to func
- Returns:
ntwk – Network with s-matrix the result of func, operating on ntwk_list’s s-matrices
- Return type:
Examples
averaging can be implemented with func_on_networks by
>>> func_on_networks(ntwk_list, mean)