touchstone.parser Documentation

PyPI Version CI Status License

touchstone.parser is a clean, modular, enterprise-ready Python library for parsing Touchstone (.sNp) files — the industry-standard format for RF and microwave S-parameter data.

It provides strongly typed classes, query-friendly APIs, and seamless integration into simulation and analysis workflows.

Key Features

  • Parse ``.sNp`` files into strongly typed Python classes

  • Multi-port support — 1-port through N-port networks

  • All data formats — Real/Imaginary (RI), Magnitude/Angle (MA), Decibel/Angle (DB)

  • All frequency units — Hz, kHz, MHz, GHz with automatic normalization

  • All parameter types — S, Y, Z, H, G

  • RF calculations — insertion loss, return loss, VSWR out of the box

  • Export utilities — CSV export and Touchstone writer for round-trip fidelity

  • Minimal dependencies — powered by numpy for fast array operations