def findCoords(self, x, y, x_pos, y_pos):
    '\n        Calculates the relative coordinates (alpha,beta) for each point (x,y),\n        given the sectors (x_pos,y_pos) in which they reside.  Only called as\n        a subroutine of __call__().\n\n        Parameters\n        ----------\n        x : np.array\n            Values whose sector should be found.\n        y : np.array\n            Values whose sector should be found.  Should be same size as x.\n        x_pos : np.array\n            Sector x-coordinates for each point in (x,y), of the same size.\n        y_pos : np.array\n            Sector y-coordinates for each point in (x,y), of the same size.\n\n        Returns\n        -------\n        alpha : np.array\n            Relative "horizontal" position of the input in their respective sectors.\n        beta : np.array\n            Relative "vertical" position of the input in their respective sectors.\n        '
    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)
    z = np.logical_or(np.isnan(alpha), np.isnan(beta))
    if np.any(z):
        these = np.isclose((f / b), ((yD - yC) / (xD - xC)))
        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
    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.
def findCoords(self, x, y, x_pos, y_pos):
    '\n        Calculates the relative coordinates (alpha,beta) for each point (x,y),\n        given the sectors (x_pos,y_pos) in which they reside.  Only called as\n        a subroutine of __call__().\n\n        Parameters\n        ----------\n        x : np.array\n            Values whose sector should be found.\n        y : np.array\n            Values whose sector should be found.  Should be same size as x.\n        x_pos : np.array\n            Sector x-coordinates for each point in (x,y), of the same size.\n        y_pos : np.array\n            Sector y-coordinates for each point in (x,y), of the same size.\n\n        Returns\n        -------\n        alpha : np.array\n            Relative "horizontal" position of the input in their respective sectors.\n        beta : np.array\n            Relative "vertical" position of the input in their respective sectors.\n        '
    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)
    z = np.logical_or(np.isnan(alpha), np.isnan(beta))
    if np.any(z):
        these = np.isclose((f / b), ((yD - yC) / (xD - xC)))
        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
    return (alpha, beta)