skrf.network.Network.subnetwork

Network.subnetwork(ports, offby=1)[source]

Return a subnetwork of a the Network from a list of port numbers.

A subnetwork is Network which S-parameters corresponds to selected ports, with all non-selected ports considered matched.

The resulting subNetwork is given a new Network.name property from the initial name and adding the kept ports indices (ex: ‘device’ -> ‘device13’). Such name should make easier the use of functions such as n_twoports_2_nport.

Parameters:
  • ports (list of int) – List of ports to keep in the resultant Network. Indices are the Python indices (starts at 0)

  • offby (int) – starting value for s-parameters indexes in the sub-Network name parameter. A value of 1, assumes that a s21 = ntwk.s[:,1,0]. Default is 1.

Returns:

subntw – Resulting subnetwork of the Network from the given ports

Return type:

Network object