skrf.network.Network.port_names

property Network.port_names: list[str] | None

Names of the ports, or None if the ports are not named.

Named ports can be indexed by name. The names are read from and written to touchstone files.

Length of the port_names list should match the number of ports in the network, this is checked on assigment. The names are dropped when an operation changes the number of ports without being able to tell what the new ports are.

Returns:

port_names – names of the ports

Return type:

list of str, or None

Examples

>>> ntwk = rf.Network(f=[1], s=np.zeros((1, 2, 2)), port_names=['in', 'out'])
>>> ntwk['in', 'out']  # same as ntwk.s21