edges.io.vna

IO routines for VNA readings (S11, S12, S22 etc).

class edges.io.vna.SParams(freq: Annotated[Quantity, PhysicalType('frequency')], s11: ndarray | None = None, s12: ndarray | None = None, s21: ndarray | None = None, s22: ndarray | None = None)[source]

A class for holding S-parameters.

All parameters are optional other than freq. The class is simply a flexible container for S-parameter measurements.

Parameters:
  • freq (astropy.units.quantity.Quantity) – The frequency vector.

  • s11 (numpy.ndarray | None) – The S11 parameter, same length as freq.

  • s12 (numpy.ndarray | None) – The S12 parameter, same length as freq.

  • s21 (numpy.ndarray | None) – The S21 parameter, same length as freq.

  • s22 (numpy.ndarray | None) – The S22 parameter, same length as freq.

classmethod from_s1p_file(path: str | ~pathlib.Path, f_low: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('frequency')] = <Quantity 0. MHz>, f_high: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('frequency')] = <Quantity inf MHz>) Self[source]

Read an S1P file.

classmethod from_table(table: QTable)[source]

Create an SParams object from a table.

to_dict() dict[str, ndarray][source]

Convert to a dictionary.

to_table() QTable[source]

Convert to a table.

edges.io.vna.read_s1p(path: str | ~pathlib.Path, f_low: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('frequency')] = <Quantity 0. MHz>, f_high: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('frequency')] = <Quantity inf MHz>) QTable[source]

Read a file in either s1p or s2p format, recorded by a VNA.

Parameters:
  • path – The path to the file.

  • f_low – Minimum frequency to keep

  • f_high – Maximum frequency to keep