Constant Gain

Inheritance diagram of hermespy.simulation.rf_chain.analog_digital_converter.Gain
class Gain(gain=1.0, rescale_quantization=False)[source]

Bases: Serializable, GainControlBase

Constant gain model.

  • gain (float, optional) – Linear signal gain to be applied before ADC quantization. Unit by default, meaning no gain adjustment.

  • rescale_quantization (bool, optional) – If enabled, the quantized signal is rescaled to the original signal range before gain adjustment. Disabled by default.


Estimate the gain required to adjust the signal to the ADC input range.


input_signal (Signal) – Input signal to be adjusted.

Return type:


Returns: Linear gain to be applied to the input_signal’s Voltage samples.

property gain: float

Linear gain before ADC quantization.

Quantizer operates by default between -1. and +1. Signal can be adjusted by to this range by appropriate gain setting.

Returns: Gain in Volt.


ValueError – If gain is smaller or equal to zero.

yaml_tag: Optional[str] = 'Gain'

YAML serialization tag.