scamp_extensions.utilities.math.AtanWarp

class scamp_extensions.utilities.math.AtanWarp(in_lo: float, in_hi: float, out_min: float, out_max: float)[source]

Bases: object

A warping function that uses an appropriately scaled arctan to warp values from the input range to the output range. See atan_warp() for details. This callable object version is callable allows you to define the warp on instantiation and then call it like a function. E.g:

warper = AtanWarp(-10, 10, 100, 200)
print(warper(0), warper(-5), warper(20))
Parameters:
  • in_lo – soft input minimum

  • in_hi – soft input maximum

  • out_min – hard input minimum

  • out_max – hard input maximum