Vignetting equation using the KARL-WEISS-MODEL
    see http://research.microsoft.com/en-us/people/stevelin/vignetting.pdf

    f - focal length
    alpha - coefficient in the geometric vignetting factor
    Xi - tilt factor of a planar scene
    tau - rotation angle of a planar scene
    cx - image center, x
    cy - image center, y

def vignettingEq(xxx_todo_changeme, f=100, alpha=0, Xi=0, tau=0, cx=50, cy=50):
    '''
    Vignetting equation using the KARL-WEISS-MODEL
    see http://research.microsoft.com/en-us/people/stevelin/vignetting.pdf

    f - focal length
    alpha - coefficient in the geometric vignetting factor
    Xi - tilt factor of a planar scene
    tau - rotation angle of a planar scene
    cx - image center, x
    cy - image center, y
    '''
    (x, y) = xxx_todo_changeme
    dist = ((x - cx)**2 + (y - cy)**2)**0.5

    A = old_div(1.0, (1 + (old_div(dist, f))**2)**2)
    G = (1 - alpha * dist)
    T = np.cos(tau) * (1 + (old_div(np.tan(tau), f))
                       * (x * np.sin(Xi) - y * np.cos(Xi)))**3

    return A * G * T