piel.analysis.electronic#

Submodules#

Functions#

compose_amplifier_collection_performance_dataframe(...)

Composes performance parameters of amplifiers into a pandas DataFrame,

calculate_power_gain_dB([p_in, p_out])

Calculate the power gain in decibels (dB).

calculate_power_gain_50ohm_dB([v_in, v_out])

Calculate the power gain in decibels (dB) assuming a 50-ohm system.

calculate_voltage_gain_dB([v_in, v_out])

Calculate the voltage gain in decibels (dB).

calculate_voltage_gain_ratio([v_in, v_out])

Calculate the voltage gain ratio.

Package Contents#

compose_amplifier_collection_performance_dataframe(amplifier_collection: piel.types.RFAmplifierCollection, desired_metrics: list[str]) pandas.DataFrame[source]#

Composes performance parameters of amplifiers into a pandas DataFrame, handling multiple metrics per component.

Parameters:
  • amplifier_collection (RFAmplifierCollection) – The collection of RF amplifiers.

  • desired_metrics (List[str]) – List of metric names to include in the DataFrame.

Returns:

DataFrame containing the specified metrics for each amplifier and metrics instance.

Return type:

pd.DataFrame

calculate_power_gain_dB(p_in=1, p_out=1)[source]#

Calculate the power gain in decibels (dB).

Parameters: p_in (float): Input power (W). Default is 1. p_out (float): Output power (W). Default is 1.

Returns: float: Power gain in dB.

Formula: .. math:

G_P(dB) = 10 \cdot \log_{10} \left(

rac{P_{out}}{P_{in}} ight)

calculate_power_gain_50ohm_dB(v_in=1, v_out=1)[source]#

Calculate the power gain in decibels (dB) assuming a 50-ohm system.

Parameters: v_in (float): Input voltage (V). Default is 1. v_out (float): Output voltage (V). Default is 1.

Returns: float: Power gain in dB.

Formula: .. math:

G_P(dB) = 10 \cdot \log_{10} \left(

rac{V_{out}^2}{V_{in}^2} ight)

Note: For a 50-ohm impedance, power is proportional to voltage squared.

calculate_voltage_gain_dB(v_in=1, v_out=1)[source]#

Calculate the voltage gain in decibels (dB).

Parameters: v_in (float): Input voltage (V). Default is 1. v_out (float): Output voltage (V). Default is 1.

Returns: float: Voltage gain in dB.

Formula: .. math:

G_V(dB) = 20 \cdot \log_{10} \left(

rac{V_{out}}{V_{in}} ight)

calculate_voltage_gain_ratio(v_in=1, v_out=1)[source]#

Calculate the voltage gain ratio.

Parameters: v_in (float): Input voltage (V). Default is 1. v_out (float): Output voltage (V). Default is 1.

Returns: float: Voltage gain ratio.

Formula: .. math:

G_V =

rac{V_{out}}{V_{in}}