RF Glossary

Touchstone SNP File Format

Touchstone (.s1p .s2p .s3p .s4p) is the standard file format for S-parameter data. Options line, port ordering, data formats (DB/MA/RI), and how to read and write SNP files.

What Is a Touchstone File?

Touchstone (also written as Touchstone®, originally from EEsof/Agilent) is the de-facto standard plain-text file format for storing frequency-domain N-port S-parameter data. The file extension indicates port count: .s1p, .s2p, .s3p, .s4p … .s50p. Almost every VNA, EM simulator, and RF EDA tool can read and write Touchstone files.

File Structure

  ! Comment lines start with !
  # [freq unit] [parameter type] [data format] R [reference impedance]

  Examples:
  # GHz S DB R 50       → GHz, S-parameters, dB+angle, 50 Ω reference
  # MHz S MA R 50       → MHz, magnitude+angle, 50 Ω
  # Hz  S RI R 50       → Hz, real+imaginary, 50 Ω

Options Line Details

FieldOptionsDefault
Frequency unitHz, kHz, MHz, GHz, THzGHz
Parameter typeS, Y, Z, H, GS
Data formatDB (dB+angle°), MA (mag+angle°), RI (real+imag)MA
R impedanceAny positive real (Ω)50

Data Format for a .s2p File (DB format)

  freq  S11_dB  S11_ang  S21_dB  S21_ang  S12_dB  S12_ang  S22_dB  S22_ang

  Example row:
  1.0000  -0.5  170.2   -12.3  -45.6   -35.1   -48.2   -0.8   165.4

  (Freq = 1 GHz, S11 = −0.5 dB at 170.2°, S21 = −12.3 dB at −45.6°, etc.)

Port Ordering for Multi-Port Files

For N-port files (N > 2), each frequency block has multiple rows. The Touchstone 1.0 convention is row-major order:

  .s4p: 4 rows per frequency point
  Row 1: freq  S11  S21  S31  S41
  Row 2:        S12  S22  S32  S42
  Row 3:        S13  S23  S33  S43
  Row 4:        S14  S24  S34  S44

  Touchstone 2.0 (.ts): supports mixed-mode, more ports, keywords

Common Issues with SNP Files

IssueSymptomFix
Wrong format in options linePhase wrapped 180°Check MA vs DB vs RI
Wrong port countOnly S11 availableSave from VNA as .s2p not .s1p
Wrong reference impedanceS11 offset from expectedRenormalize to 50 Ω
Mismatched frequency pointsCannot overlay filesFrequency resample before compare
Non-physical data (|S21|>0dB passive)Calibration errorRecalibrate VNA

Touchstone 2.0 Extensions

Touchstone 2.0 (IEEE P370) adds: keyword-based header, support for noise parameters, mixed-mode (differential/common-mode) parameters, and variable reference impedances per port. Most modern VNAs export Touchstone 1.0; some export 2.0 for differential measurements.

RF View SNP Support: RF View reads .s1p, .s2p, .s3p, and .s4p in all data formats (DB/MA/RI). The Batch Converter converts between formats, remaps ports, crops frequency ranges, resamples to new frequency grids, and exports to CSV — all without a PC.

Related Topics

← Back to RF Glossary  ·  RF View Home