skrf.networkSet.NetworkSet.interpolate_from_network
- NetworkSet.interpolate_from_network(ntw_param, x, interp_kind='linear')[source]
Interpolate a Network from a NetworkSet, as a multi-file N-port network.
Assumes that the NetworkSet contains N-port networks with same number of ports N and same number of frequency points.
These networks differ from an given array parameter interp_param, which is used to interpolate the returned Network. Length of interp_param should be equal to the length of the NetworkSet.
- Parameters:
ntw_param ((N,) array_like) – A 1-D array of real values. The length of ntw_param must be equal to the length of the NetworkSet
x (real) – Point to evaluate the interpolated network at
interp_kind (str) – Specifies the kind of interpolation as a string: ‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’. See
scipy.interpolate.interp1d
for detailed description. Default is ‘linear’.
- Returns:
ntw – Network interpolated at x
- Return type:
class:~skrf.network.Network
Example
Assuming that ns is a NetworkSet containing 3 Networks (length=3) :
>>> param_x = [1, 2, 3] # a parameter associated to each Network >>> x0 = 1.5 # parameter value to interpolate for >>> interp_ntwk = ns.interpolate_from_network(param_x, x0)