def scale(pix, pixMax, floatMin, floatMax):
    """ scale takes in
        pix, the CURRENT pixel column (or row)
        pixMax, the total # of pixel columns
        floatMin, the min floating-point value
        floatMax, the max floating-point value
        scale returns the floating-point value that
        corresponds to pix
    """
    return (pix / pixMax) * (floatMax - floatMin) + floatMin