Data Formats

Comments (Touchstone)

/kom-ents tuch-stohn/
Human-readable annotations in Touchstone S-parameter files (.s1p, .s2p, .snp) preceded by an exclamation mark (!) that document measurement conditions, device information, calibration details, and port definitions without affecting the numerical S-parameter data parsed by simulation tools. Comments appear on any line starting with ! and are ignored by all compliant parsers. Best practice includes documenting the device under test, VNA model and calibration method, frequency range, port assignments, DC bias conditions, temperature, and measurement date. Touchstone 2.0 (IEEE 370-2020) formalized comment syntax and added structured keywords for machine-readable metadata alongside human-readable comments.
Category: Data Formats
Syntax: ! (exclamation mark)
Standard: IEEE 370-2020

Understanding Touchstone Comments

Touchstone files are the universal exchange format for measured and simulated S-parameter data in RF engineering. Every vector network analyzer exports Touchstone, every simulation tool imports it, and component manufacturers distribute device models as .s2p files. The comment system provides a standardized way to embed documentation directly in the data file, ensuring that critical measurement metadata travels with the data rather than being lost in separate documentation.

A well-commented Touchstone file is self-documenting: an engineer receiving the file years later can immediately understand what was measured, how it was measured, and under what conditions. This is particularly important for transistor S-parameters, where the data is completely different at different bias points, and for connector/cable measurements where the calibration reference plane determines what the data represents. Without comments, an unlabeled .s2p file with 201 frequency points is essentially meaningless, as there is no way to determine whether it represents a filter, an amplifier, a transmission line, or noise.

Touchstone File Structure

Comment Lines:
! Any text after exclamation mark is ignored by parsers
! Device: BFP740 SiGe HBT, Lot 2024-Q3
! Bias: Vce=2.0V, Ic=10mA

Option Line (NOT a comment):
# GHz S MA R 50
(frequency unit, parameter type, format, reference Z)

Data Lines:
freq |S11| ∠S11 |S21| ∠S21 |S12| ∠S12 |S22| ∠S22

The # option line defines: frequency unit (Hz/kHz/MHz/GHz), parameter type (S/Y/Z/H/G), format (MA=mag-angle, DB=dB-angle, RI=real-imaginary), and reference impedance. All data after the option line is numerical S-parameter data. Comments can appear before, between, or after data lines.

Touchstone Version Comparison

FeatureTouchstone 1.0Touchstone 2.0 (IEEE 370)
Comment character! (exclamation)! (exclamation)
Structured keywordsNone[Version], [Number of Ports], etc.
Max portsUnlimited (convention)Formally defined for N ports
Mixed-mode S-paramsNot supported[Mixed-Mode Order] keyword
Noise dataAfter S-data block[Noise Data] keyword
File extension.s1p, .s2p, .snp.ts (recommended), .snp (compatible)
Reference impedanceSingle value (R 50)Per-port [Reference] keyword
Common Questions

Frequently Asked Questions

What is the comment syntax in Touchstone files?

Any line beginning with ! is a comment, ignored by parsers. In Touchstone 2.0, comments can appear between structured keywords. The # option line is NOT a comment; it defines frequency unit, parameter type, format, and reference impedance. Place comments on separate lines for maximum tool compatibility.

What information should be included in Touchstone comments?

Best practice: device ID (part number, serial, lot), VNA model and firmware, calibration type (SOLT/TRL), frequency range and point count, port assignments, DC bias (Vds/Ids or Vce/Ic for active devices), temperature, date, operator, and any de-embedding or port extension applied. Different bias conditions produce entirely different datasets.

Are Touchstone comments compatible across all RF tools?

The ! syntax is universally supported by ADS, AWR, HFSS, CST, Sonnet, Qucs, and scikit-rf. Limitations: some older parsers require comments on separate lines, some limit line length to 80 to 256 characters, and legacy tools may not handle inline comments after data. Touchstone 2.0 adds structured keywords for machine-readable metadata.

RF Measurement Services

Request a Quote

Need S-parameter characterization, de-embedding fixtures, or custom Touchstone model generation? Contact our engineering team.

Get in Touch