skrf.network.Network.port_tuples

property Network.port_tuples: list[tuple[int, int]]

Returns a list of tuples, for each port index pair.

A convenience function for the common task for iterating over all s-parameters index pairs.

This just calls:

[(y,x) for x in range(self.nports) for y in range(self.nports)]
Returns:

ports_ind – list of all port index tuples.

Return type:

list of tuples

Examples

>>> ntwk = skrf.data.ring_slot
>>> for (idx_i, idx_j) in ntwk.port_tuples: print(idx_i, idx_j)