The pyedb.generic.constants library#

Summary#

SWEEPDRAFT

SweepDraftType Enumerator class.

FlipChipOrientation

Chip orientation enumerator class.

SolverType

Provides solver type classes.

CutoutSubdesignType

RadiationBoxType

SweepType

BasisOrder

Enumeration-class for HFSS basis order settings.

NodeType

Type of node for source creation.

SourceType

Type of excitation enumerator.

CommonMapper

TerminalTypeMapper

BoundaryTypeMapper

SourceTermMapper

FAdaptTypeMapper

MeshOperationTypeMapper

DCBehaviorMapper

SParamExtrapolationMapper

SparamInterpolationMapper

db20

Convert db20 to decimal and vice versa.

db10

Convert db10 to decimal and vice versa.

dbw

Convert W to decimal and vice versa.

dbm

Convert W to decimal and vice versa.

fah2kel

Convert a temperature from Fahrenheit to Kelvin.

cel2kel

Convert a temperature from Celsius to Kelvin.

unit_system

Retrieve the name of the unit system associated with a unit string.

decompose_variable_value

Decompose a variable value.

unit_converter

Convert unit in specified unit system.

scale_units

Find the scale_to_unit into main system unit.

validate_enum_class_value

Check whether the value for the class enumeration-class is valid.

Module detail#

constants.db20(x, inverse=True)#

Convert db20 to decimal and vice versa.

constants.db10(x, inverse=True)#

Convert db10 to decimal and vice versa.

constants.dbw(x, inverse=True)#

Convert W to decimal and vice versa.

constants.dbm(x, inverse=True)#

Convert W to decimal and vice versa.

constants.fah2kel(val, inverse=True)#

Convert a temperature from Fahrenheit to Kelvin.

Parameters:
valfloat

Temperature value in Fahrenheit.

inversebool, optional

The default is True.

Returns:
float

Temperature value converted to Kelvin.

constants.cel2kel(val, inverse=True)#

Convert a temperature from Celsius to Kelvin.

Parameters:
valfloat

Temperature value in Celsius.

inversebool, optional

The default is True.

Returns:
float

Temperature value converted to Kelvin.

constants.unit_system(units)#

Retrieve the name of the unit system associated with a unit string.

Parameters:
unitsstr

Units for retrieving the associated unit system name.

Returns:
str

Key from the AEDT_units when successful. For example, "AngularSpeed".

False when the units specified are not defined in AEDT units.
constants.decompose_variable_value(variable_value, full_variables={})#

Decompose a variable value.

Parameters:
variable_valuestr
full_variablesdict
Returns:
tuples

Tuples made of the float value of the variable and the units exposed as a string.

constants.unit_converter(values, unit_system='Length', input_units='meter', output_units='mm')#

Convert unit in specified unit system.

Parameters:
valuesfloat, list

Values to convert.

unit_systemstr

Unit system. Default is “Length”.

input_unitsstr

Input units. Default is “meter”.

output_unitsstr

Output units. Default is “mm”.

Returns:
float, list

Converted value.

constants.scale_units(scale_to_unit)#

Find the scale_to_unit into main system unit.

Parameters:
scale_to_unitstr

Unit to Scale.

Returns:
float

Return the scaling factor if any.

constants.validate_enum_class_value(cls, value)#

Check whether the value for the class enumeration-class is valid.

Parameters:
clsclass

Enumeration-style class with integer members in range(0, N) where cls.Invalid equals N-1.

valueint

Value to check.

Returns:
bool

True when the value is valid for the enumeration-class, False otherwise.

constants.RAD2DEG = 57.29577951308232#
constants.DEG2RAD = 0.017453292519943295#
constants.HOUR2SEC = 3600.0#
constants.MIN2SEC = 60.0#
constants.SEC2MIN = 0.016666666666666666#
constants.SEC2HOUR = 0.0002777777777777778#
constants.INV2PI = 0.15915494309189535#
constants.V2PI = 6.283185307179586#
constants.METER2IN = 0.0254#
constants.METER2MILES = 1609.344051499#
constants.MILS2METER = 39370.078740157#
constants.AEDT_UNITS#
constants.SI_UNITS#
constants.UNIT_SYSTEM_OPERATIONS#
constants.CSS4_COLORS#
constants.SpeedOfLight = 299792458.0#