Page tree
Skip to end of metadata
Go to start of metadata


How do I repair a Touchstone S Data file that causes problems when being imported?


A Touchstone file (also known as a SnP file) is an ASCII text file used for documenting the n-port network parameter data of active and passive devices. This data can include S Parameters and Noise data. Both these data sets are used to describe devices operating under linear conditions.

Many S-data files do not adhere to the Touchstone standard an therefore cause problems when being imported into the AWR Design Environment. These files can be created by Vector Network Analyzers or circuit analysis programs. Many can be imported, but when the text contains subtle errors unexpected results occur, for example the wrong number of ports maybe assigned to the data.

To repair these non-standard files, AWR has created a utility SdataConversion which can read and carry out several health checks and then repair the data.

Using the utility:

The conversion process is straight forward. Use the button to navigate to the data file for conversion

As the file loads the data is scanned and assessed for conformance to the Touchstone standard. Temporary files are created. Please be aware that this can take some time with large files; a 9 port file with 972 frequency points will take about 15 seconds to scan to test as 158,436 data tokens need to be sorted and packed

Having loaded the file the comment section of the file is displayed. Use the text window if extra comments are needed. The "File Info" menu option will open a window to display the major statistics of the input data file.

The Status bar will be updated and an output filename will be offered.

If this output filename is acceptable then click on the "Process File" button. If the conversion process is successful the information window will be displayed.

If required this process can be repeated using other data files.

Known issues with S-Data files that this utility addresses:

  1. Redundant Data Added: Additional information can be added to the file. This includes derived terms such as the Common Mode Rejection Ratio (CMRR). Some VNAs can add this derived data to the file on export. Beware all derived data can be calculated from the s-data anyway, so the addition of such information is only for the benefit of the VNA when the data is re-imported to VNAs that support this capability, and not the end user!

  2. "CR" and "LF" characters: Some VNAs provide UNIX standard text files. These are difficult to read using Notepad when the user wishes to inspect the data for other defects.

  3. Wrong data format: The data set should conform to the pattern defined in the Touchstone documentation. The multi-port multi-frequency data has a fixed standard layout. Please refer to the Touchstone documentation for a definitive description of the S-Data standard.

  4. No specification: There should be a line that specifies impedance level, frequency units (Hz, MHz, GHz etc) and data style (mag/angle - real/imaginary ). If this is not set up correctly in the data file, you will get error message No frequency range defined in the Status window. A typical specification line looks similar to the following:

    # MHZ S MA R 50

  5. Illegal format of text lines: Only three formats are allowed with the lines of text. The acceptable formats are Pure Data, Comment, and Data specification.

    Pure data: first significant character in the line of text has to be a number

    Comment: first significant character "!"

    Data specification: first significant character "#"