diff --git a/piel/experimental/models/cables.py b/piel/experimental/models/cables.py index ee9f9c53..4f3802d4 100644 --- a/piel/experimental/models/cables.py +++ b/piel/experimental/models/cables.py @@ -16,7 +16,7 @@ def generic_banana( name="OUT", domain="DC", connector="Male", - ) + ), ] return DCCable( @@ -26,9 +26,9 @@ def generic_banana( ) - def rg164( length_m: float, + name: str = "RG164", **kwargs, ) -> CoaxialCable: geometry = CoaxialCableGeometryType( @@ -45,13 +45,14 @@ def rg164( name="OUT", domain="RF", connector="SMA", - ) + ), ] return CoaxialCable( - name="RG164", + name=name, geometry=geometry, ports=ports, + model="RG164", **kwargs, ) @@ -75,7 +76,7 @@ def generic_sma( name="OUT", domain="RF", connector="SMA", - ) + ), ] return CoaxialCable( diff --git a/piel/experimental/models/multimeter.py b/piel/experimental/models/multimeter.py index 415d8dee..e458aa67 100644 --- a/piel/experimental/models/multimeter.py +++ b/piel/experimental/models/multimeter.py @@ -31,4 +31,6 @@ def DMM6500(**kwargs) -> Multimeter: ), ] - return Multimeter(name="DMM6500", ports=ports, manufacturer="Keithley", **kwargs) + return Multimeter( + name="DMM6500", ports=ports, manufacturer="Keithley", model="DMM6500", **kwargs + ) diff --git a/piel/experimental/models/oscilloscope.py b/piel/experimental/models/oscilloscope.py index 4b99e67d..63527957 100644 --- a/piel/experimental/models/oscilloscope.py +++ b/piel/experimental/models/oscilloscope.py @@ -2,7 +2,9 @@ from ..types import Oscilloscope -def create_two_port_oscilloscope() -> Oscilloscope: +def create_two_port_oscilloscope( + name: str = "two_port_oscilloscope", **kwargs +) -> Oscilloscope: ports = [ PhysicalPort( name="CH1", @@ -17,12 +19,12 @@ def create_two_port_oscilloscope() -> Oscilloscope: ] return Oscilloscope( - name="two_port_oscilloscope", + name=name, ports=ports, ) -def DPO73304(**kwargs) -> Oscilloscope: +def DPO73304(name: str = "DPO73304", **kwargs) -> Oscilloscope: ports = [ PhysicalPort( name="CH1", @@ -37,5 +39,5 @@ def DPO73304(**kwargs) -> Oscilloscope: ] return Oscilloscope( - name="DPO73304", ports=ports, manufacturer="Tektronix", **kwargs + name=name, ports=ports, manufacturer="Tektronix", model="DPO73304", **kwargs ) diff --git a/piel/experimental/models/rf_calibration.py b/piel/experimental/models/rf_calibration.py index ca5413a8..6891bd60 100644 --- a/piel/experimental/models/rf_calibration.py +++ b/piel/experimental/models/rf_calibration.py @@ -2,16 +2,16 @@ def short_85052D(): - return Short(name="short_85052D", manufacturer="Agilent") + return Short(name="short_85052D", model="85052D", manufacturer="Agilent") def open_85052D(): - return Open(name="open_85052D", manufacturer="Agilent") + return Open(name="open_85052D", model="85052D", manufacturer="Agilent") def load_85052D(): - return Load(name="load_82052D", manufacturer="Agilent") + return Load(name="load_82052D", model="85052D", manufacturer="Agilent") def through_85052D(): - return Through(name="through_82052D", manufacturer="Agilent") + return Through(name="through_82052D", model="85052D", manufacturer="Agilent") diff --git a/piel/experimental/models/rf_passives.py b/piel/experimental/models/rf_passives.py index 0d2cfa3e..f8c405e3 100644 --- a/piel/experimental/models/rf_passives.py +++ b/piel/experimental/models/rf_passives.py @@ -1,7 +1,12 @@ -from ...types import PhysicalPort, PowerSplitter +from typing import Optional +from functools import partial +from ...types import PhysicalPort, PowerSplitter, BiasTee -def create_power_splitter_1to2(): +def create_power_splitter_1to2(name: Optional[str] = None): + if name is None: + name = "power_splitter_1to2" + ports = [ PhysicalPort( name="IN", @@ -21,6 +26,62 @@ def create_power_splitter_1to2(): ] return PowerSplitter( - name="power_splitter_1to2", + name=name, ports=ports, ) + + +def create_bias_tee(name: Optional[str] = None): + if name is None: + name = "bias_tee" + + ports = [ + PhysicalPort( + name="IN_RF", + domain="RF", + connector="SMA", + ), + PhysicalPort( + name="IN_DC", + domain="RF", + connector="SMA", + ), + PhysicalPort( + name="OUT", + domain="RF", + connector="SMA", + ), + ] + + return BiasTee( + name=name, + ports=ports, + ) + + +def create_attenuator(name: Optional[str] = None): + if name is None: + name = "attenuator" + + ports = [ + PhysicalPort( + name="RF", + domain="RF", + connector="SMA", + ), + PhysicalPort( + name="OUT", + domain="RF", + connector="SMA", + ), + ] + + return BiasTee( + name=name, + ports=ports, + ) + + +Picosecond5575A104 = partial( + create_bias_tee, manufacturer="Picosecond Pulse Labs", model="5575A104" +) diff --git a/piel/experimental/models/sourcemeter.py b/piel/experimental/models/sourcemeter.py index e5005e9c..185eb2ab 100644 --- a/piel/experimental/models/sourcemeter.py +++ b/piel/experimental/models/sourcemeter.py @@ -1,11 +1,21 @@ from typing import Optional from ...types import PhysicalPort -from ..types import Sourcemeter +from ..types import Sourcemeter, SourcemeterConfiguration -def SMU2450(name: Optional[str] = None, - **kwargs) -> Sourcemeter: - +def create_dc_operating_point_configuration( + voltage_V: float, +) -> SourcemeterConfiguration: + return SourcemeterConfiguration(voltage_set_V=voltage_V) + + +def create_dc_sweep_configuration( + voltage_range_V: tuple[float, float], +) -> SourcemeterConfiguration: + return SourcemeterConfiguration(voltage_range_V=voltage_range_V) + + +def SMU2450(name: Optional[str] = None, **kwargs) -> Sourcemeter: if name is None: name = "SMU2450" @@ -37,4 +47,6 @@ def SMU2450(name: Optional[str] = None, ), ] - return Sourcemeter(name=name, manufacturer="Keithley", ports=ports, **kwargs) + return Sourcemeter( + name=name, manufacturer="Keithley", model="", ports=ports, **kwargs + ) diff --git a/piel/experimental/models/vna.py b/piel/experimental/models/vna.py index 41f5adbb..eebccf1d 100644 --- a/piel/experimental/models/vna.py +++ b/piel/experimental/models/vna.py @@ -2,4 +2,4 @@ def E8364A(**kwargs) -> pe.types.VNA: - return pe.types.VNA(name="E8364A", manufacturer="Agilent", **kwargs) + return pe.types.VNA(name="E8364A", manufacturer="Agilent", model="E8364A", **kwargs) diff --git a/piel/experimental/models/waveform_generator.py b/piel/experimental/models/waveform_generator.py index 76749108..0133e354 100644 --- a/piel/experimental/models/waveform_generator.py +++ b/piel/experimental/models/waveform_generator.py @@ -1,4 +1,4 @@ -from ...types import PhysicalPort, PulseSource +from ...types import PhysicalPort, PulseSource, SignalTimeSources from ..types import WaveformGenerator, WaveformGeneratorConfiguration @@ -38,9 +38,26 @@ def create_one_port_square_wave_waveform_generator( name="two_port_oscilloscope", ports=ports, configuration=configuration, - manufacturer="Tektronix", ) -def AWG70001A(**kwargs) -> WaveformGenerator: - pass +def AWG70001A(signal: SignalTimeSources, **kwargs) -> WaveformGenerator: + # Configure the waveform generator + configuration = WaveformGeneratorConfiguration(signal=signal) + + # Configure the ports + ports = [ + PhysicalPort( + name="CH1", + domain="RF", + connector="SMA", + ), + ] + + return WaveformGenerator( + name="AWG70001A", + ports=ports, + configuration=configuration, + manufacturer="Tektronix", + **kwargs + ) diff --git a/piel/experimental/types/cryostat.py b/piel/experimental/types/cryostat.py index 4cbbd456..bbe64a9f 100644 --- a/piel/experimental/types/cryostat.py +++ b/piel/experimental/types/cryostat.py @@ -1,3 +1,4 @@ +from typing import Optional from ...types import Environment, Component @@ -6,7 +7,7 @@ class TemperatureStage(Environment, Component): Standard definition for a generic temperature stage. """ - surface_area_m2: float # TODO move to a geometry type. + surface_area_m2: Optional[float] = None # TODO move to a geometry type. class Cryostat(Component): diff --git a/piel/experimental/types/dc.py b/piel/experimental/types/dc.py index 78b697f9..f457ddfb 100644 --- a/piel/experimental/types/dc.py +++ b/piel/experimental/types/dc.py @@ -8,8 +8,10 @@ class SourcemeterConfiguration(DeviceConfiguration): not the experimental setup connectivity. """ - current_limit_A: float - voltage_limit_V: float + voltage_set_V: Optional[float] = None + voltage_range_V: Optional[tuple] = None + current_limit_A: Optional[float] = None + voltage_limit_V: Optional[float] = None class Sourcemeter(Device): diff --git a/piel/types/__init__.py b/piel/types/__init__.py index 0b6560ad..f15c1776 100644 --- a/piel/types/__init__.py +++ b/piel/types/__init__.py @@ -50,6 +50,7 @@ from .electrical.rf_passives import ( PowerSplitter, + BiasTee, ) from .electro_optic import ( @@ -60,7 +61,18 @@ SwitchFunctionParameter, SParameterCollection, ) -from .electronic import HVAMetricsType, LNAMetricsType, ElectronicCircuitComponent + +from .electronic.core import ( + ElectronicCircuit, + ElectronicChip, + ElectronicCircuitComponent, +) +from .electronic.amplifier import RFTwoPortAmplifier +from .electronic.hva import HVAMetricsType, HighVoltageTwoPortAmplifier +from .electronic.lna import LNAMetricsType, LowNoiseTwoPortAmplifier + +from .frequency import FrequencyNetworkModel + from .file_system import ProjectType from .integration import CircuitComponent from .materials import ( @@ -81,7 +93,6 @@ from .signal.dc_data import SignalDC, DCSweepData from .signal.frequency import ( - SParameterNetwork, TwoPortCalibrationNetworkCollection, ) diff --git a/piel/types/connectivity/physical.py b/piel/types/connectivity/physical.py index 137e1eab..92509c3b 100644 --- a/piel/types/connectivity/physical.py +++ b/piel/types/connectivity/physical.py @@ -39,3 +39,8 @@ class PhysicalComponent(Component): """ The manufacturer of the device. """ + + model: Optional[str] = None + """ + The model of the device. + """ diff --git a/piel/types/electrical/rf_passives.py b/piel/types/electrical/rf_passives.py index 0495f80f..5593cff1 100644 --- a/piel/types/electrical/rf_passives.py +++ b/piel/types/electrical/rf_passives.py @@ -1,5 +1,18 @@ -from ...types import PhysicalComponent +from ...types import PhysicalComponent, MinimumMaximumType -class PowerSplitter(PhysicalComponent): +class RFComponent(PhysicalComponent): + bandwidth: MinimumMaximumType = None + + +class PowerSplitter(RFComponent): + pass + + +class BiasTee(RFComponent): + pass + + +class Attenuator(RFComponent): + nominal_attenuation_dB: float = None pass diff --git a/piel/types/electronic.py b/piel/types/electronic.py deleted file mode 100644 index 17c6e0dd..00000000 --- a/piel/types/electronic.py +++ /dev/null @@ -1,167 +0,0 @@ -""" -This module defines files models for low-noise amplifier (LNA) and high-voltage amplifier (HVA) metrics. -It provides structured types using pydantic for validation and includes type aliases for metric ranges. -""" -import gdsfactory as gf -from typing import Optional -from .core import PielBaseModel, NumericalTypes, MinimumMaximumType - -# Type alias for a photonic circuit component in gdsfactory. -ElectronicCircuitComponent = gf.Component -""" -PhotonicCircuitComponent: - A type representing a component in a photonic circuit, as defined in the gdsfactory framework. - This type is used to handle and manipulate photonic components in circuit designs. -""" - - -class LNAMetricsType(PielBaseModel): - """ - A model representing the metrics for a low-noise amplifier (LNA). - - Attributes: - footprint_mm2 (Optional[NumericalTypes]): - The physical footprint of the amplifier in square millimeters. - bandwidth_Hz (MinimumMaximumType | None): - The operational bandwidth of the amplifier in Hertz, given as a range (min, max). - noise_figure (MinimumMaximumType | None): - The noise figure of the amplifier, given as a range (min, max). - power_consumption_mW (MinimumMaximumType | None): - The power consumption of the amplifier in milliwatts, given as a range (min, max). - power_gain_dB (MinimumMaximumType | None): - The power gain of the amplifier in decibels, given as a range (min, max). - supply_voltage_V (Optional[NumericalTypes]): - The supply voltage of the amplifier in volts. - technology_nm (Optional[NumericalTypes]): - The technology node of the amplifier in nanometers. - technology_material (Optional[str]): - The material technology used in the amplifier. - """ - - footprint_mm2: Optional[NumericalTypes] - """ - footprint_mm2 (Optional[NumericalTypes]): - The physical footprint of the amplifier in square millimeters. - """ - - bandwidth_Hz: MinimumMaximumType | None - """ - bandwidth_Hz (MinimumMaximumType | None): - The operational bandwidth of the amplifier in Hertz, given as a range (min, max). - """ - - noise_figure: MinimumMaximumType | None - """ - noise_figure (MinimumMaximumType | None): - The noise figure of the amplifier, given as a range (min, max). - """ - - power_consumption_mW: MinimumMaximumType | None - """ - power_consumption_mW (MinimumMaximumType | None): - The power consumption of the amplifier in milliwatts, given as a range (min, max). - """ - - power_gain_dB: MinimumMaximumType | None - """ - power_gain_dB (MinimumMaximumType | None): - The power gain of the amplifier in decibels, given as a range (min, max). - """ - - supply_voltage_V: Optional[NumericalTypes] - """ - supply_voltage_V (Optional[NumericalTypes]): - The supply voltage of the amplifier in volts. - """ - - technology_nm: Optional[NumericalTypes] - """ - technology_nm (Optional[NumericalTypes]): - The technology node of the amplifier in nanometers. - """ - - technology_material: Optional[str] - """ - technology_material (Optional[str]): - The material technology used in the amplifier. - """ - - -class HVAMetricsType(PielBaseModel): - """ - A model representing the metrics for a high-voltage amplifier (HVA). - - Attributes: - footprint_mm2 (Optional[NumericalTypes]): - The physical footprint of the amplifier in square millimeters. - bandwidth_Hz (MinimumMaximumType | None): - The operational bandwidth of the amplifier in Hertz, given as a range (min, max). - power_added_efficiency (MinimumMaximumType | None): - The power added efficiency of the amplifier, given as a range (min, max). - power_consumption_mW (MinimumMaximumType | None): - The power consumption of the amplifier in milliwatts, given as a range (min, max). - power_gain_dB (MinimumMaximumType | None): - The power gain of the amplifier in decibels, given as a range (min, max). - saturated_power_output_dBm (Optional[NumericalTypes]): - The saturated power output of the amplifier in dBm. - supply_voltage_V (Optional[NumericalTypes]): - The supply voltage of the amplifier in volts. - technology_nm (Optional[NumericalTypes]): - The technology node of the amplifier in nanometers. - technology_material (Optional[str]): - The material technology used in the amplifier. - """ - - footprint_mm2: Optional[NumericalTypes] - """ - footprint_mm2 (Optional[NumericalTypes]): - The physical footprint of the amplifier in square millimeters. - """ - - bandwidth_Hz: MinimumMaximumType | None - """ - bandwidth_Hz (MinimumMaximumType | None): - The operational bandwidth of the amplifier in Hertz, given as a range (min, max). - """ - - power_added_efficiency: MinimumMaximumType | None - """ - power_added_efficiency (MinimumMaximumType | None): - The power added efficiency of the amplifier, given as a range (min, max). - """ - - power_consumption_mW: MinimumMaximumType | None - """ - power_consumption_mW (MinimumMaximumType | None): - The power consumption of the amplifier in milliwatts, given as a range (min, max). - """ - - power_gain_dB: MinimumMaximumType | None - """ - power_gain_dB (MinimumMaximumType | None): - The power gain of the amplifier in decibels, given as a range (min, max). - """ - - saturated_power_output_dBm: Optional[NumericalTypes] - """ - saturated_power_output_dBm (Optional[NumericalTypes]): - The saturated power output of the amplifier in dBm. - """ - - supply_voltage_V: Optional[NumericalTypes] - """ - supply_voltage_V (Optional[NumericalTypes]): - The supply voltage of the amplifier in volts. - """ - - technology_nm: Optional[NumericalTypes] - """ - technology_nm (Optional[NumericalTypes]): - The technology node of the amplifier in nanometers. - """ - - technology_material: Optional[str] - """ - technology_material (Optional[str]): - The material technology used in the amplifier. - """ diff --git a/piel/types/electronic/__init__.py b/piel/types/electronic/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/piel/types/electronic/amplifier.py b/piel/types/electronic/amplifier.py new file mode 100644 index 00000000..c1742bd8 --- /dev/null +++ b/piel/types/electronic/amplifier.py @@ -0,0 +1,5 @@ +from .core import RFElectronicCircuit + + +class RFTwoPortAmplifier(RFElectronicCircuit): + pass diff --git a/piel/types/electronic/core.py b/piel/types/electronic/core.py new file mode 100644 index 00000000..408df1da --- /dev/null +++ b/piel/types/electronic/core.py @@ -0,0 +1,31 @@ +""" +This module defines files models for low-noise amplifier (LNA) and high-voltage amplifier (HVA) metrics. +It provides structured types using pydantic for validation and includes type aliases for metric ranges. +""" +import gdsfactory as gf +from ..connectivity.physical import PhysicalComponent +from ..frequency import RFPhysicalComponent + +# Type alias for a photonic circuit component in gdsfactory. +ElectronicCircuitComponent = gf.Component +""" +PhotonicCircuitComponent: + A type representing a component in a photonic circuit, as defined in the gdsfactory framework. + This type is used to handle and manipulate photonic components in circuit designs. +""" + + +class ElectronicCircuit(PhysicalComponent): + pass + + +class RFElectronicCircuit(RFPhysicalComponent): + pass + + +class ElectronicChip(PhysicalComponent): + """ + A model representing an electronic chip in a photonic circuit. + """ + + pass diff --git a/piel/types/electronic/hva.py b/piel/types/electronic/hva.py new file mode 100644 index 00000000..31e0ad6b --- /dev/null +++ b/piel/types/electronic/hva.py @@ -0,0 +1,87 @@ +from typing import Optional +from ..core import PielBaseModel, NumericalTypes, MinimumMaximumType +from .amplifier import RFTwoPortAmplifier + + +class HVAMetricsType(PielBaseModel): + """ + A model representing the metrics for a high-voltage amplifier (HVA). + + Attributes: + footprint_mm2 (Optional[NumericalTypes]): + The physical footprint of the amplifier in square millimeters. + bandwidth_Hz (MinimumMaximumType | None): + The operational bandwidth of the amplifier in Hertz, given as a range (min, max). + power_added_efficiency (MinimumMaximumType | None): + The power added efficiency of the amplifier, given as a range (min, max). + power_consumption_mW (MinimumMaximumType | None): + The power consumption of the amplifier in milliwatts, given as a range (min, max). + power_gain_dB (MinimumMaximumType | None): + The power gain of the amplifier in decibels, given as a range (min, max). + saturated_power_output_dBm (Optional[NumericalTypes]): + The saturated power output of the amplifier in dBm. + supply_voltage_V (Optional[NumericalTypes]): + The supply voltage of the amplifier in volts. + technology_nm (Optional[NumericalTypes]): + The technology node of the amplifier in nanometers. + technology_material (Optional[str]): + The material technology used in the amplifier. + """ + + footprint_mm2: Optional[NumericalTypes] = None + """ + footprint_mm2 (Optional[NumericalTypes]): + The physical footprint of the amplifier in square millimeters. + """ + + bandwidth_Hz: MinimumMaximumType | None = None + """ + bandwidth_Hz (MinimumMaximumType | None): + The operational bandwidth of the amplifier in Hertz, given as a range (min, max). + """ + + power_added_efficiency: MinimumMaximumType | None = None + """ + power_added_efficiency (MinimumMaximumType | None): + The power added efficiency of the amplifier, given as a range (min, max). + """ + + power_consumption_mW: MinimumMaximumType | None = None + """ + power_consumption_mW (MinimumMaximumType | None): + The power consumption of the amplifier in milliwatts, given as a range (min, max). + """ + + power_gain_dB: MinimumMaximumType | None = None + """ + power_gain_dB (MinimumMaximumType | None): + The power gain of the amplifier in decibels, given as a range (min, max). + """ + + saturated_power_output_dBm: Optional[NumericalTypes] = None + """ + saturated_power_output_dBm (Optional[NumericalTypes]): + The saturated power output of the amplifier in dBm. + """ + + supply_voltage_V: Optional[NumericalTypes] = None + """ + supply_voltage_V (Optional[NumericalTypes]): + The supply voltage of the amplifier in volts. + """ + + technology_nm: Optional[NumericalTypes] = None + """ + technology_nm (Optional[NumericalTypes]): + The technology node of the amplifier in nanometers. + """ + + technology_material: Optional[str] = None + """ + technology_material (Optional[str]): + The material technology used in the amplifier. + """ + + +class HighVoltageTwoPortAmplifier(RFTwoPortAmplifier): + metrics: HVAMetricsType = None diff --git a/piel/types/electronic/lna.py b/piel/types/electronic/lna.py new file mode 100644 index 00000000..5686b1f1 --- /dev/null +++ b/piel/types/electronic/lna.py @@ -0,0 +1,79 @@ +from typing import Optional +from ...types import PielBaseModel, NumericalTypes, MinimumMaximumType +from .amplifier import RFTwoPortAmplifier + + +class LNAMetricsType(PielBaseModel): + """ + A model representing the metrics for a low-noise amplifier (LNA). + + Attributes: + footprint_mm2 (Optional[NumericalTypes]): + The physical footprint of the amplifier in square millimeters. + bandwidth_Hz (MinimumMaximumType | None): + The operational bandwidth of the amplifier in Hertz, given as a range (min, max). + noise_figure (MinimumMaximumType | None): + The noise figure of the amplifier, given as a range (min, max). + power_consumption_mW (MinimumMaximumType | None): + The power consumption of the amplifier in milliwatts, given as a range (min, max). + power_gain_dB (MinimumMaximumType | None): + The power gain of the amplifier in decibels, given as a range (min, max). + supply_voltage_V (Optional[NumericalTypes]): + The supply voltage of the amplifier in volts. + technology_nm (Optional[NumericalTypes]): + The technology node of the amplifier in nanometers. + technology_material (Optional[str]): + The material technology used in the amplifier. + """ + + footprint_mm2: Optional[NumericalTypes] = None + """ + footprint_mm2 (Optional[NumericalTypes]): + The physical footprint of the amplifier in square millimeters. + """ + + bandwidth_Hz: MinimumMaximumType | None = None + """ + bandwidth_Hz (MinimumMaximumType | None): + The operational bandwidth of the amplifier in Hertz, given as a range (min, max). + """ + + noise_figure: MinimumMaximumType | None = None + """ + noise_figure (MinimumMaximumType | None): + The noise figure of the amplifier, given as a range (min, max). + """ + + power_consumption_mW: MinimumMaximumType | None = None + """ + power_consumption_mW (MinimumMaximumType | None): + The power consumption of the amplifier in milliwatts, given as a range (min, max). + """ + + power_gain_dB: MinimumMaximumType | None = None + """ + power_gain_dB (MinimumMaximumType | None): + The power gain of the amplifier in decibels, given as a range (min, max). + """ + + supply_voltage_V: Optional[NumericalTypes] = None + """ + supply_voltage_V (Optional[NumericalTypes]): + The supply voltage of the amplifier in volts. + """ + + technology_nm: Optional[NumericalTypes] = None + """ + technology_nm (Optional[NumericalTypes]): + The technology node of the amplifier in nanometers. + """ + + technology_material: Optional[str] = None + """ + technology_material (Optional[str]): + The material technology used in the amplifier. + """ + + +class LowNoiseTwoPortAmplifier(RFTwoPortAmplifier): + metrics: LNAMetricsType = None diff --git a/piel/types/frequency.py b/piel/types/frequency.py new file mode 100644 index 00000000..b85c00d5 --- /dev/null +++ b/piel/types/frequency.py @@ -0,0 +1,11 @@ +import skrf +from .connectivity.physical import PhysicalComponent + +FrequencyNetworkModel = skrf.Network +""" +Corresponds to a container that contains a s-parameter representation. +""" + + +class RFPhysicalComponent(PhysicalComponent): + network: FrequencyNetworkModel = None diff --git a/piel/types/integration.py b/piel/types/integration.py index 28708214..b26534d9 100644 --- a/piel/types/integration.py +++ b/piel/types/integration.py @@ -1,4 +1,4 @@ -from .electronic import ElectronicCircuitComponent +from .electronic.core import ElectronicCircuitComponent from .photonic import PhotonicCircuitComponent CircuitComponent = ElectronicCircuitComponent | PhotonicCircuitComponent diff --git a/piel/types/signal/frequency.py b/piel/types/signal/frequency.py index 5640fa3e..56f2a592 100644 --- a/piel/types/signal/frequency.py +++ b/piel/types/signal/frequency.py @@ -1,11 +1,5 @@ -import skrf from ..core import PielBaseModel - - -SParameterNetwork = skrf.Network -""" -Corresponds to a container that contains a s-parameter representation. -""" +from ..frequency import FrequencyNetworkModel class TwoPortCalibrationNetworkCollection(PielBaseModel): @@ -13,22 +7,22 @@ class TwoPortCalibrationNetworkCollection(PielBaseModel): Two-port representation of the corresponding networks """ - through: SParameterNetwork + through: FrequencyNetworkModel """ This should correspond to a two-port through network. """ - short: SParameterNetwork + short: FrequencyNetworkModel """ This should correspond to a two-port short network either reciprocal or non-reciprocal. """ - open: SParameterNetwork + open: FrequencyNetworkModel """ This should correspond to a two-port open network either reciprocal or non-reciprocal. """ - load: SParameterNetwork + load: FrequencyNetworkModel """ This should correspond to a two-port load network either reciprocal or non-reciprocal. """