'Two dimensional Ellipse model function.'

@staticmethod
def evaluate(x, y, amplitude, x_0, y_0, a, b, theta):

    xx = (x - x_0)
    yy = (y - y_0)
    cost = np.cos(theta)
    sint = np.sin(theta)
    numerator1 = ((xx * cost) + (yy * sint))
    numerator2 = ((- (xx * sint)) + (yy * cost))
    in_ellipse = ((((numerator1 / a) ** 2) + ((numerator2 / b) ** 2)) <= 1.0)
    result = np.select([in_ellipse], [amplitude])
    if isinstance(amplitude, Quantity):
        return Quantity(result, unit=amplitude.unit, copy=False)
    else:
        return result
