def findCoords(self,x,y,x_pos,y_pos):
        '''
        Calculates the relative coordinates (alpha,beta) for each point (x,y),
        given the sectors (x_pos,y_pos) in which they reside.  Only called as
        a subroutine of __call__().

        Parameters
        ----------
        x : np.array
            Values whose sector should be found.
        y : np.array
            Values whose sector should be found.  Should be same size as x.
        x_pos : np.array
            Sector x-coordinates for each point in (x,y), of the same size.
        y_pos : np.array
            Sector y-coordinates for each point in (x,y), of the same size.

        Returns
        -------
        alpha : np.array
            Relative "horizontal" position of the input in their respective sectors.
        beta : np.array
            Relative "vertical" position of the input in their respective sectors.
        '''
        # Calculate relative coordinates in the sector for each point
        xA = self.x_values[x_pos,y_pos]
        xB = self.x_values[x_pos+1,y_pos]
        xC = self.x_values[x_pos,y_pos+1]
        xD = self.x_values[x_pos+1,y_pos+1]
        yA = self.y_values[x_pos,y_pos]
        yB = self.y_values[x_pos+1,y_pos]
        yC = self.y_values[x_pos,y_pos+1]
        yD = self.y_values[x_pos+1,y_pos+1]
        polarity = 2.0*self.polarity[x_pos,y_pos] - 1.0
        a = xA
        b = (xB-xA)
        c = (xC-xA)
        d = (xA-xB-xC+xD)
        e = yA
        f = (yB-yA)
        g = (yC-yA)
        h = (yA-yB-yC+yD)
        denom = (d*g-h*c)
        mu = (h*b-d*f)/denom
        tau = (h*(a-x) - d*(e-y))/denom
        zeta = a - x + c*tau
        eta = b + c*mu + d*tau
        theta = d*mu
        alpha = (-eta + polarity*np.sqrt(eta**2.0 - 4.0*zeta*theta))/(2.0*theta)
        beta = mu*alpha + tau

        # Alternate method if there are sectors that are "too regular"
        z = np.logical_or(np.isnan(alpha),np.isnan(beta))   # These points weren't able to identify coordinates
        if np.any(z):
            these = np.isclose(f/b,(yD-yC)/(xD-xC)) # iso-beta lines have equal slope
            if np.any(these):
                kappa     = f[these]/b[these]
                int_bot   = yA[these] - kappa*xA[these]
                int_top   = yC[these] - kappa*xC[these]
                int_these = y[these] - kappa*x[these]
                beta_temp = (int_these-int_bot)/(int_top-int_bot)
                x_left    = beta_temp*xC[these] + (1.0-beta_temp)*xA[these]
                x_right   = beta_temp*xD[these] + (1.0-beta_temp)*xB[these]
                alpha_temp= (x[these]-x_left)/(x_right-x_left)
                beta[these]  = beta_temp
                alpha[these] = alpha_temp

            #print(np.sum(np.isclose(g/c,(yD-yB)/(xD-xB))))

        return alpha, beta
Calculates the relative coordinates (alpha,beta) for each point (x,y),
        given the sectors (x_pos,y_pos) in which they reside.  Only called as
        a subroutine of __call__().

        Parameters
        ----------
        x : np.array
            Values whose sector should be found.
        y : np.array
            Values whose sector should be found.  Should be same size as x.
        x_pos : np.array
            Sector x-coordinates for each point in (x,y), of the same size.
        y_pos : np.array
            Sector y-coordinates for each point in (x,y), of the same size.

        Returns
        -------
        alpha : np.array
            Relative "horizontal" position of the input in their respective sectors.
        beta : np.array
            Relative "vertical" position of the input in their respective sectors.