3.1.21.1.1. unit_scaling.core.functional.logarithmic_interpolation

unit_scaling.core.functional.logarithmic_interpolation(alpha: float, lower: float, upper: float) float[source]

Interpolate between lower and upper with logarithmic spacing (constant ratio).

For example:

logarithmic_interpolation(alpha=0.0, lower=1/1000, upper=1/10) == 1/1000
logarithmic_interpolation(alpha=0.5, lower=1/1000, upper=1/10) == 1/100
logarithmic_interpolation(alpha=1.0, lower=1/1000, upper=1/10) == 1/10
Parameters:
  • alpha (float) – interpolation weight (0=lower, 1=upper)

  • lower (float) – lower limit (alpha=0), must be > 0

  • upper (float) – upper limit (alpha=1), must be > 0

Returns:

interpolated value

Return type:

float