Normally:
def raw_to_distances(raw, a, b):
return a / numpy.log(raw) - b
If the sensors are too perpendicular to the wall, reflection may change the best equation to:
def raw_to_distances(raw, a, b, c):
return a / numpy.log(raw) - b - c * numpy.sqrt(raw)