Electronic Design Automation

Touchstone Data Format

/ˈtuhch-stohn ˈday-tuh ˈfor-mat/
Originally introduced by EEsof for its CAD tools, this plain ASCII file standard stores the frequency-dependent network parameters of an n-port device, most commonly the S-parameters measured on a vector network analyzer. Files carry a .sNp extension where N is the port count, so a one-port reflection sweep is a .s1p file and a two-port device is a .s2p file. A single leading option line (beginning with #) declares the frequency unit, parameter type, the magnitude-angle, decibel-angle, or real-imaginary data convention, and the reference impedance; every subsequent row lists a frequency point followed by the parameter pairs. The format is the universal interchange medium between VNAs, EM solvers, and circuit simulators, and the 2009 Touchstone 2.0 revision added explicit bracketed keywords for port count, per-port reference impedance, and noise data.
Category: Electronic Design Automation
Extension: .s1p, .s2p, .sNp, .ts
Default reference: 50 Ω

How a Touchstone File Encodes Network Data

A Touchstone file is deliberately human-readable: it is whitespace-delimited ASCII with optional comment lines starting with an exclamation mark. Three line types make up the structure. Comment lines carry header text such as the instrument name, calibration date, and DUT description. The single option line, beginning with a hash, defines how the numbers should be interpreted. Data lines then list one frequency per record, followed by the network-parameter pairs in either magnitude/angle (MA), decibel/angle (DB), or real/imaginary (RI) form. Because the convention is global rather than per-column, mixing MA and RI within one file is not allowed; a converter must rewrite the entire data block to change format.

The most error-prone detail is two-port column ordering. A .s2p row lists S11, then S21, then S12, then S22, so the forward transmission term S21 appears before the reverse term S12. This single anomaly exists only for two-port files; three-port and larger files revert to strict row-major matrix order (S11 S12 S13, then the second row, and so on), with one matrix row per physical text line. Touchstone 1.1 carries no internal record of the port count, so a parser must infer it from the .sNp extension. The data file formats used across the industry, including CITIfile and the newer Touchstone 2.0, were partly motivated by removing this ambiguity.

Option Line and Data Conversion

The option line takes the form: # [freq unit] [parameter] [format] R [Zref]. Any omitted field falls back to its default, but the fields must appear in the fixed order unit, parameter, format, reference, so a parser keys on position rather than on the value it encounters. Angle data are always in degrees, never radians. When data are stored as decibels and angle, the recorded value is 20·log10 of the linear magnitude, so a reflection coefficient with a return loss of 15 dB is stored as a magnitude entry of -15 dB (S11 in dB is negative for a passive port), while the phase travels in the paired angle column.

Option line syntax:
# <freq_unit> <param> <format> R <Zref>   e.g. # GHz S RI R 50

Decibel-angle format (DB):
magdB = 20 × log10|Sij|,  θ in degrees

Real-imaginary ↔ magnitude-angle:
Sij = a + jb  →  |Sij| = √(a² + b²),  θ = atan2(b, a) × 180/π

.s2p row order (fixed):
f  S11  S21  S12  S22

Defaults when the option line is absent: GHz, S, MA, R 50. For an n-port (n ≥ 3) file the matrix is written row-major, one row per text line, n² pairs per frequency.

Touchstone 1.1 vs. 2.0 and Related Formats

AttributeTouchstone 1.1Touchstone 2.0CITIfile
File extension.sNp.ts (or .sNp).cti / .citi
Port count sourceInferred from extension[Number of Ports] keywordNAME / VAR blocks
Reference impedanceSingle R value, all portsPer-port [Reference] listConstant per package
Data conventionsMA, DB, RIMA, DB, RIMAG/ANG, RE/IM, dB
Noise parameters2-port only, appended blockFormal [Noise Data] sectionSupported via data blocks
Matrix layout markerNone[Matrix Format] full/lower/upperImplicit by segment
Standardized byEEsof (de facto)IBIS Open Forum, 2009HP / Agilent
Common Questions

Frequently Asked Questions

What does the option line in a Touchstone file mean?

The line begins with # and declares four global settings: frequency unit (Hz, kHz, MHz, GHz), parameter type (S, Y, Z, H, G), data format (MA, DB, or RI), and the keyword R with the reference impedance in ohms. For example, # MHz S MA R 50 means S-parameters in linear magnitude and degrees, in MHz, normalized to 50 Ω. If no option line is present, parsers assume # GHz S MA R 50.

How are the columns ordered in a .s2p versus a .s3p file?

A .s2p row is f, S11, S21, S12, S22, so S21 precedes S12, a frequent parsing pitfall. For three ports and up the data are row-major (S11 S12 S13, then row two, and so on) with one matrix row per text line. Touchstone 1.1 has no port-count marker, so the reader must trust the .sNp extension; Touchstone 2.0 adds a [Number of Ports] keyword.

What is the difference between Touchstone 1.1 and Touchstone 2.0?

Version 1.1 is the legacy format: simple # option line, no version tag, port count taken from the extension, single 50 Ω reference. Version 2.0 (IBIS Open Forum, 2009) adds bracketed keywords such as [Version] 2.0, [Number of Ports], [Reference] for per-port impedance, and [Matrix Format], plus formal noise-parameter support. A compliant 2.0 reader still parses 1.1 files.

Can a Touchstone file hold Y- or Z-parameters instead of S-parameters?

Yes. The second field of the option line selects the parameter type: S for scattering, Y for admittance, Z for impedance, H for hybrid, or G for inverse hybrid. The most common choice for high-frequency measured data is S, because scattering parameters are what a VNA measures directly and they remain well-defined at frequencies where open and short terminations are impractical.

Measured Data You Can Trust

Need Verified S-Parameters for Your Design?

RF Essentials delivers every millimeter-wave waveguide component, amplifier, and frequency converter with calibrated Touchstone files ready to drop into your simulator. Talk to our engineering team about your design.

Get in Touch