skrf.network.Network.renumber

Network.renumber(from_ports, to_ports)[source]

renumbers ports of a Network

Parameters:
  • from_ports (list-like) –
  • to_ports (list-like) –

Examples

To flip the ports of a 2-port network ‘foo’: >>> foo.renumber( [0,1], [1,0] )

To rotate the ports of a 3-port network ‘bar’ so that port 0 becomes port 1: >>> bar.renumber( [0,1,2], [1,2,0] )

To swap the first and last ports of a network ‘duck’: >>> duck.renumber( [0,-1], [-1,0] )