edges.cal.sparams.devices.internal_switch

Functions for calculating the S-parameters of the internal switch (EDGES 2).

edges.cal.sparams.devices.internal_switch.combine_internal_switch_sparams(sparams: Sequence[SParams], temperatures: Annotated[Quantity, PhysicalType('temperature')], measured_temperature: Annotated[Quantity, PhysicalType('temperature')], combine_s12s21: bool = True) SParams[source]

Linearly interpolate internal switch S-parameters to the desired temperature.

edges.cal.sparams.devices.internal_switch.get_internal_switch_from_caldef(caldef: CalObsDefEDGES2 | InternalSwitch | Sequence[InternalSwitch], external_calkit: Calkit | None = None, internal_calkit: Calkit | None = None, measured_temperature: Annotated[Quantity, PhysicalType('temperature')] | None = None, calkit_overrides: dict[str, Any] | None = None) SParams[source]

Obtain the S-parameters of the internal switch from a caldef.

If the caldef contains multiple internal switch calkit measurements at a set of temperatures, the S-parameters will be interpolated to the measured_temperature.

Parameters:
  • caldef – The calibration definition object that points to all the required datafiles.

  • external_calkit – The calkit model for the external OSL measurements.

  • internal_calkit – The calkit model for the internal OSL measurements. If None, ideal standards are assumed.

  • measured_temperature – The temperature at which to interpolate the internal switch S-parameters.

edges.cal.sparams.devices.internal_switch.get_internal_switch_sparams(internal_osl: ~edges.cal.sparams.core.datatypes.CalkitReadings | ~collections.abc.Sequence[~edges.cal.sparams.core.datatypes.CalkitReadings], external_osl: ~edges.cal.sparams.core.datatypes.CalkitReadings | ~collections.abc.Sequence[~edges.cal.sparams.core.datatypes.CalkitReadings], external_calkit: ~edges.cal.sparams.core.network_component_models.Calkit = Calkit(open=CalkitStandard(resistance=<Quantity inf Ohm>, offset_impedance=<Quantity 50. Ohm>, offset_delay=<Quantity 29.243 ps>, offset_loss=<Quantity 2.2 GOhm / s>, capacitance_model=Polynomial(parameters=(4.943e-14, -3.101e-25, 2.317e-35, -1.597e-46), n_terms=4, _transform=IdentityTransform(), xtransform=IdentityTransform(), basis_scaler=None, data_transform=IdentityTransform(), offset=0.0, spacing=1.0), inductance_model=None), short=CalkitStandard(resistance=<Quantity 0. Ohm>, offset_impedance=<Quantity 50. Ohm>, offset_delay=<Quantity 31.785 ps>, offset_loss=<Quantity 2.36 GOhm / s>, capacitance_model=None, inductance_model=Polynomial(parameters=(2.077e-12, -1.085e-22, 2.171e-33, -1e-44), n_terms=4, _transform=IdentityTransform(), xtransform=IdentityTransform(), basis_scaler=None, data_transform=IdentityTransform(), offset=0.0, spacing=1.0)), match=CalkitStandard(resistance=<Quantity 50. Ohm>, offset_impedance=<Quantity 50. Ohm>, offset_delay=<Quantity 38. ps>, offset_loss=<Quantity 2.3 GOhm / s>, capacitance_model=None, inductance_model=None)), internal_calkit: ~edges.cal.sparams.core.network_component_models.Calkit | None = None) SParams[source]

Compute the S-parameters of the internal switch subsystem for EDGES-2.

Techically, the “internal switch” subsystem includes both the SP2T and the input SMA (see Figure 1 of Murray+2025). To compute the S-parameters of this subsystem, we de-embed the SP4T subsystem from the external measurements.

Parameters:
  • internal_osl – The internal OSL measurements of the switch. If multiple measurements are provided, the S-parameters will be averaged.

  • external_osl – The external OSL measurements of the switch. If multiple measurements are provided, the S-parameters will be averaged.

  • external_calkit – The calkit model for the external OSL measurements.

  • internal_calkit – The calkit model for the internal OSL measurements. If None, ideal standards are assumed.

Returns:

SParams – The S-parameters of the internal switch subsystem.

edges.cal.sparams.devices.internal_switch.internal_switch_model_params(**kwargs) S11ModelParams[source]

Return the default internal switch S-parameters for EDGES-2.