More than four pairs of network data per line in Touchstone
PetePupalaikis opened this issue · 0 comments
PetePupalaikis commented
customer complained that the Touchstone files are output with all network data for a given frequency on one line.
The Touchstone spec says:
Data Lines Following the option line is the data set. Data sets contain the data for the network parameters (S-parameter, Z-parameter, etc.) specified by the option line. Network data for 1-port and 2-port networks is contained on one data line, while data for 3-port and above are arranged on multiple data lines in a matrix format. Each set of network data is preceded by a frequency value (i.e. the first entry in the first (or only) data line of a data set is a frequency value), and the network data itself is formatted as pairs of values (magnitude-angle, dB-angle or real-imaginary).
There are three general rules for formatting data lines and data sets:
1. No more than four pairs of network data are allowed per data line.
2. Individual entries in a data lines are separated by whitespace
3. A data line is terminated by a newline character (CR or CR/LF combination).
4. All data sets must be arranged in increasing order of frequency.
so the bug is confirmed.