linlin

emlib.numpytools.linlin(xs, x0, x1, y0, y1)[source]

Map xs from range x0-x1 to y0-y1

Parameters:
  • xs (ndarray) – the array of values between x0 and x1

  • x0 (float) – the min. value of xs

  • x1 (float) – the max. value of xs

  • y0 (float) – the min. value of the remapped array

  • y1 (float) – the max. value of the remapped array

Return type:

ndarray

Returns:

the remapped values