edges.cal.sparams.core.network_component_models¶
Functions for working with reflection coefficients.
Most of the functions in this module follow the formalism/notation of
Monsalve et al., 2016, “One-Port Direct/Reverse Method for Characterizing VNA Calibration Standards”, IEEE Transactions on Microwave Theory and Techniques, vol. 64, issue 8, pp. 2631-2639, https://arxiv.org/pdf/1606.02446.pdf
They represent basic relations between physical parameters of circuits, as measured with internal standards.
- class edges.cal.sparams.core.network_component_models.Calkit(open: CalkitStandard, short: CalkitStandard, match: CalkitStandard)[source]¶
A class holding all calkit standards.
This is not a class to merely hold Calkit data, but instead to hold electrical engineering definitions of calkit standard models.
- at_freqs(freqs: Annotated[Quantity, PhysicalType('frequency')]) CalkitReadings[source]¶
Get the reflection coefficients of each standard at given frequencies.
- class edges.cal.sparams.core.network_component_models.CalkitStandard(*, resistance, offset_impedance=<Quantity 50. Ohm>, offset_delay=<Quantity 30. ps>, offset_loss=<Quantity 2.2 GOhm / s>, capacitance_model: ~collections.abc.Callable | None = None, inductance_model: ~collections.abc.Callable | None = None)[source]¶
Class representing a calkit standard.
The standard could be open, short or load/match. See the Appendix of Monsalve et al. 2016 for details.
For all parameters, ‘offset’ refers to the small transmission line section of the standard (not an offset in the parameter).
- Parameters:
resistance (float | astropy.units.quantity.Quantity) – The resistance of the standard termination, either assumed or measured.
offset_impedance (float | astropy.units.quantity.Quantity) – Impedance of the transmission line, in Ohms.
offset_delay (float | astropy.units.quantity.Quantity) – One-way delay of the transmission line, in picoseconds.
offset_loss (float | astropy.units.quantity.Quantity) – One-way loss of the transmission line, unitless.
- gl(freq: Annotated[Quantity, PhysicalType('frequency')]) ndarray[source]¶
Obtain the product gamma*length.
gamma is the propagation constant of the transmission line (offset) and l is its length. See Eq. 21 of Monsalve et al. 2016.
- lossy_characteristic_impedance(freq: Annotated[Quantity, PhysicalType('frequency')]) Annotated[Quantity, Unit('Ohm')][source]¶
Obtain the lossy characteristic impedance of the transmission line (offset).
See Eq. 20 of Monsalve et al., 2016
- classmethod match(resistance=<Quantity 50. Ohm>, **kwargs) Self[source]¶
Create a ‘match’ calkit standard.
See
CalkitStandardfor all possible parameters.
- offset_gamma(freq: Annotated[Quantity, PhysicalType('frequency')]) Annotated[Quantity, PhysicalType('dimensionless')][source]¶
Obtain reflection coefficient of the offset.
Eq. 19 of M16.
- classmethod open(resistance=<Quantity inf Ohm>, **kwargs) Self[source]¶
Create an ‘open’ calkit standard, with resistance=inf.
See
CalkitStandardfor all parameters available.
- reflection_coefficient(freqs: Annotated[Quantity, PhysicalType('frequency')]) ReflectionCoefficient[source]¶
Obtain the combined reflection coefficient of the standard.
See Eq. 18 of M16.
Note that, despite looking different to Alan’s implementation, this is exactly the same as his agilent() function EXCEPT that he doesn’t seem to use the loss / capacitance models.
- classmethod short(resistance=<Quantity 0. Ohm>, **kwargs) Self[source]¶
Create a ‘short’ calkit standard, with resistance=0.
See
CalkitStandardfor all parameters available.
- termination_gamma(freq: Annotated[Quantity, PhysicalType('frequency')]) Annotated[Quantity, PhysicalType('dimensionless')][source]¶
Reflection coefficient of the termination.
Eq. 19 of M16.
- class edges.cal.sparams.core.network_component_models.CoaxialCable(*, conductivities: dict[str, ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('electrical conductivity')]] = {'brass': <Quantity 17284000. S / m>, 'copper': <Quantity 59600000. S / m>, 'silver plated copper': <Quantity 59600000. S / m>, 'stainless steel': <Quantity 1430400. S / m>, 'tinned copper': <Quantity 47680000. S / m>}, outer_radius: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('length')], inner_radius: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('length')], outer_material, inner_material, relative_dielectric, outer_conductivity: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('electrical conductivity')] = NOTHING, inner_conductivity: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('electrical conductivity')] = NOTHING, relative_conductance_interior=0.0002, length: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('length')] = None, eps0: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, Unit("F / m")] = <<class 'astropy.constants.codata2018.EMCODATA2018'> name='Vacuum electric permittivity' value=8.8541878128e-12 uncertainty=1.3e-21 unit='F / m' reference='CODATA 2018'>)[source]¶
Properties of a coaxial cable.
These properties are those used in the cabl2 function in edges.c.
- Parameters:
outer_radius` – The outer diameter of the cable. Equivalent to b in cabl2.
inner_radius (astropy.units.quantity.Quantity) – The inner diameter of the cable. Equivalent to a in cabl2.
dielectric – The dielectric constant of the cable. Equivalent to diel in cabl2.
outer_material (str) – The material that forms the outer conductor of the cable.
inner_material (str) – The material that forms the inner conductor of the cable.
outer_conductivity (astropy.units.quantity.Quantity) – The conductivity of the outer conductor. Used to get the skin depth. Only required if the material is not in the known materials.
inner_conductivity (astropy.units.quantity.Quantity) – The conductivity of the inner conductor. Used to get the skin depth. Only required if the material is not in the known materials.
- as_transmission_line(freqs: Annotated[Quantity, PhysicalType('frequency')], length: Annotated[Quantity, PhysicalType('length')] | None = None) TransmissionLine[source]¶
Return a TransmissionLine object for the cable.
- property capacitance_per_metre: Annotated[Quantity, PhysicalType('electrical conductivity')]¶
Get the capacitance per metre of the cable.
See https://en.wikipedia.org/wiki/Coaxial_cable#Physical_parameters
- characteristic_impedance(freq: Annotated[Quantity, PhysicalType('frequency')], length: Annotated[Quantity, PhysicalType('length')] | None = None) Annotated[Quantity, Unit('Ohm')][source]¶
Get the characteristic impedance of the cable at a given frequency.
See https://en.wikipedia.org/wiki/Coaxial_cable#Derived_electrical_parameters
- conductance_per_metre(freq: Annotated[Quantity, PhysicalType('frequency')]) Annotated[Quantity, Unit('m / Ohm')][source]¶
Get the conductance per metre of the cable.
- property inductance_per_metre: Quantity, PhysicalType({'electromagnetic field strength', 'permeability'})]¶
Get the inductance per metre of the cable.
See https://en.wikipedia.org/wiki/Inductance#Inductance_of_a_coaxial_cable.
This is equivalent to Alan’s “L” in cabl2.
- inner_skin_depth(freq: Annotated[Quantity, PhysicalType('frequency')]) Annotated[Quantity, PhysicalType('length')][source]¶
Get the skin depth of the inner material at a given frequency.
- outer_skin_depth(freq: Annotated[Quantity, PhysicalType('frequency')]) Annotated[Quantity, PhysicalType('length')][source]¶
Get the skin depth of the outer material at a given frequency.
- propagation_constant(freq: Annotated[Quantity, PhysicalType('frequency')], length: Annotated[Quantity, PhysicalType('length')] | None = None) Annotated[Quantity, Unit('1 / m')][source]¶
Get the propagation constant of the cable at a given frequency.
- resistance_per_metre(freq: Annotated[Quantity, PhysicalType('frequency')]) Annotated[Quantity, Unit('Ohm / m')][source]¶
Get the resistance per metre of the cable.
- class edges.cal.sparams.core.network_component_models.TransmissionLine(freqs: Annotated[Quantity, PhysicalType('frequency')], resistance, inductance, conductance, capacitance, length: Annotated[Quantity, PhysicalType('length')] = None)[source]¶
A transmission line.
- property angular_freq: Annotated[Quantity, PhysicalType('frequency')]¶
The angular frequencies at which to evaluate the transmission line.
- property characteristic_impedance: Quantity, PhysicalType({'electrical impedance', 'electrical reactance', 'electrical resistance'})]¶
Calculate the characteristic impedance of a transmission line.
The characteristic impedance Z 0 {displaystyle Z_{0}} of a transmission line is the ratio of the amplitude of a single voltage wave to its current wave.
- input_impedance(load_impedance: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType({'electrical impedance', 'electrical reactance', 'electrical resistance'})] = <Quantity 50. Ohm>, line_length: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('length')] | None = None)[source]¶
Calculate the “input impedance” of a transmission line.
https://en.wikipedia.org/wiki/Transmission_line#Input_impedance_of_transmission_line
- Parameters:
freq (tp.FreqType) – Frequency of the signal.
- property propagation_constant: Annotated[Quantity, Unit('1 / m')]¶
Calculate the propagation constant of a transmission line.
https://en.wikipedia.org/wiki/Transmission_line#General_case_of_a_line_with_losses
- reflection_coefficient(load_impedance: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType({'electrical impedance', 'electrical reactance', 'electrical resistance'})] = <Quantity 50. Ohm>)[source]¶
Calculate the reflection coefficient of a transmission line.
This is the reflections coefficient measured at the load end of a transmission line.
- https://en.wikipedia.org/wiki/Transmission_line
#Input_impedance_of_transmission_line
- scattering_parameters(load_impedance: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType({'electrical impedance', 'electrical reactance', 'electrical resistance'})] = <Quantity 50. Ohm>, line_length: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, PhysicalType('length')] | None = None) SParams[source]¶
Calculate the S11 parameter of a transmission line.
This is the reflection coefficient of the transmission line in the case of matched loads at each termination.
https://en.wikipedia.org/wiki/Transmission_line#Scattering_parameters
- class edges.cal.sparams.core.network_component_models.TwoPortNetwork(x)[source]¶
A matrix-representation of a two-port network.
This is a matrix representation of a two-port network, defined in terms of voltages and currents at ports (in contrast to the SMatrix representation which is in terms of reflected waves).
This class allows for the simple conversion between representations of two-port network matrices. The internal representation is the ABCD representation (https://en.wikipedia.org/wiki/Two-port_network#ABCD-parameters).
- property A¶
Return the A parameter.
- property B¶
Return the B parameter.
- property C¶
Return the C parameter.
- property D¶
Return the D parameter.
- property admittance_matrix¶
Alias of ymatrix.
- as_sparams(freqs: Annotated[Quantity, PhysicalType('frequency')], source_impedance: float, load_impedance: float | None = None) SParams[source]¶
Convert the TwoPortNetwork to an SParams instance.
- classmethod from_abcd(abcd, inverse: bool = False)[source]¶
Create a TwoPortNetwork from an ABCD representation.
- classmethod from_hmatrix(z: ndarray[tuple[Any, ...], dtype[_ScalarT]]) Self[source]¶
Create a TwoPortNetwork from a H-matrix.
- classmethod from_smatrix(s: SParams, z0: ndarray[tuple[Any, ...], dtype[_ScalarT]]) Self[source]¶
Compute the network from scattering parameters.
- classmethod from_transmission_line(line: TransmissionLine, length: Annotated[Quantity, PhysicalType('length')]) Self[source]¶
Get a two-port network representation of a transmission line.
- classmethod from_ymatrix(z: ndarray[tuple[Any, ...], dtype[_ScalarT]]) Self[source]¶
Create a TwoPortNetwork from a Y-matrix.
- classmethod from_zmatrix(z: ndarray[tuple[Any, ...], dtype[_ScalarT]]) Self[source]¶
Create a TwoPortNetwork from a Z-matrix.
- property hmatrix¶
Return the H-matrix (hybrid parameters) of the network.
- property hybrid_matrix¶
Alias of hmatrix.
- property impedance_matrix¶
Alias of zmatrix.
- property ymatrix¶
Return the Y-matrix (admittance parameters) of the network.
This is the inverse of the z-matrix.
- property zmatrix¶
Return the Z-matrix (impedance parameters) of the network.
- edges.cal.sparams.core.network_component_models.get_calkit(base: Calkit | str, resistance_of_match: Quantity, PhysicalType({'electrical impedance', 'electrical reactance', 'electrical resistance'})] | None = None, open: dict | None = None, short: dict | None = None, match: dict | None = None)[source]¶
Get a calkit based on a provided base calkit, with given updates.
- Parameters:
base – The base calkit to use, eg. AGILENT_85033E
resistance_of_match – The resistance of the match, overwrites default from the base.
open – Dictionary of parameters to overwrite the open standard.
short – Dictionary of parameters to overwrite the short standard.
match – Dictionary of parameters to overwrite the match standard.