insarviz.misc package

Submodules

Module contents

insarviz.misc.linmap(A, B)[source]

Given an interval [A, B], return a pair of affine functions (f, g) such that f(A) = -1 and f(B) = 1, and g(-1) = A and g(1) = B.

These functions allow for efficient computing of affine mappings between [A,B] and [-1,1], both for scalar values and NumPy arrays.