ipkiss3.io.touchstone.export_touchstone_smatrix(smatrix1dsweep, filename, reference=50.0, param_format='MA', n_digits=17)

Exports an S matrix frequency / wavelength sweep to a touchstone file.

More information on the touchstone file format can be found in this document.

smatrix1dsweep: SMatrix1DSweep

stores the SMatrices from a sweep

filename: str

filename to which to export. The standard TouchStone extension .snp with n the total number of port modes will automatically be appended if not specified by the user. (e.g. s6p if there are 3 ports and each has 2 modes)

reference: float (default 50.)

Reference in ohms. Used as a system reference for the S matrix data.

param_format: str

Format of the output MA: magnitude and angle (in degrees) in the counter-clockwise directions RI: real and imaginary part

n_digits: int (default 17)

Number of significant digits in the output Touchstone file. The default value is chosen such that when IEEE 754 double-precision number is converted to a decimal string and back the original and converted value must match (see https://en.wikipedia.org/wiki/Double-precision_floating-point_format)

filename: str

The exported full file path including extension