The command line tool nporttool enables to perform a subset of the functions provided by the nport python package.
The following are the functions supported by nporttool:
nporttool automatically detects the input file format. Using the -f option, it is possible to specify the format of the output file. The default output format is Touchstone. Do not specify the extension of the output file, it is added automatically.
Warning
nporttool will overwrite any existing file without warning!
Example: convert the Touchstone file microstrip.s2p to CITI format and save the result to microstrip.citi:
nporttool -f citi microstrip.s2p microstrip
It is possible to recombine some ports of the n-port described by the S-parameters. The argument to the -r option is a a list of integers and pairs of integers. An integer specifies the number of the port that needs to be kept as-is. If the integer is negative, the port’s polarity is reversed. A pair of integers specifies a pair of ports that is to be recombined into one port. The second port number in this pair acts as the ground reference to the first port.
Example: recombine the six ports in example.s6p to four ports:
nporttool -c "(1,3),(2,4),5,-6" example.s6p recombined
The four ports of recombined.s4p are defined so that:
If any of the input file’s ports are not in the list, these ports will be left out, practically appearing as open-circuited.