code: def invert(self, points):
          
          X = points if not points.ndim == 1 else points.reshape((points.size, 1))
  
          wx, wy = self.wc
  
          # Switch to polar coordinates
          rn = np.sqrt((X[0,:] - wx)**2 + (X[1,:] - wy)**2)
          phi = np.arctan2(X[1,:] - wy, X[0,:]-wx)
          # 'atan' method
          r = np.tan(rn * self.lgamma) / self.lgamma;
  
          # Switch back to rectangular coordinates
          Y = np.ones(X.shape)
          Y[0,:] = wx + r * np.cos(phi)
          Y[1,:]= wy + r * np.sin(phi)
          return Y
docs: Invert the distortion
  
          Parameters
          ------------------
          points : ndarray
              Input image points
  
          Returns
          -----------------
          ndarray
              Undistorted points