numpy.ndarray) → numpy.ndarray[source]

invert the ports of a networks s-matrix, ‘flipping’ it over left and right. in case the network is 2n-port and n > 1, ‘second’ numbering scheme is assumed to be consistent with the ** cascade operator.

-|0      n|-        0-|n      0|-n
-|1    n+1|- flip   1-|n+1    1|-n+1
...      ...  =>     ...      ...
-|n-1 2n-1|-      n-1-|2n-1 n-1|-2n-1
Parameters:a (numpy.ndarray) – scattering parameter matrix. shape should be should be 2nx2n, or fx2nx2n
Returns:a’ – flipped scattering parameter matrix, ie interchange of port 0 and port 1
Return type:numpy.ndarray


See renumber