def METHOD_NAME(self, x, y, theta_E, r_trunc):
    """
    :param x:
    :param y:
    :param r_trunc:
    :return:
    """
    r = np.sqrt(x * x + y * y)
    if isinstance(r, int) or isinstance(r, float):
        if r == 0:
            a = 0
        elif r < r_trunc:
            a = theta_E
        elif r < 2 * r_trunc:
            a = theta_E * (2 - r / r_trunc)
        else:
            a = 0
    else:
        a = np.zeros_like(r)
        a[(r < r_trunc) & (r > 0)] = theta_E
        r_ = r[(r < 2 * r_trunc) & (r >= r_trunc)]
        a[(r < 2 * r_trunc) & (r >= r_trunc)] = theta_E * (2 - r_ / r_trunc)
        a[r >= 2 * r_trunc] = 0
    return a