scamp_extensions.utilities.math.atan_warp

scamp_extensions.utilities.math.atan_warp(value, in_lo, in_hi, out_min, out_max) float[source]

Uses an appropriately scaled arctan function to warp values from the input range to the output range. The input range is a soft boundary for the inputs expected, whereas the output range is a hard limit, to which extreme high and low input values asymptote. At the exact center of the input range there is no warping, and the slope of the transformation is the same as if it were linear; as input values approach or exceed the boundaries of the input range, the output approaches, but never exceeds the output range.

Parameters:
  • value – the value to warp

  • in_lo – soft input minimum

  • in_hi – soft input maximum

  • out_min – hard input minimum

  • out_max – hard input maximum