def in_sector_bounding_box(polar_point, radius, start_theta, end_theta):
    """Check if a polar coordinate lies within the segment of a circle

    :param polar_point: tuple representing the point to check (r,phi)
    :param radius: radius of the segement
    :param start_theta: start angle of the segement in rad
    :param end_theta: end angle of the segement in rad
    :returns: bool -- whether a point lies in the sector
    """
    point_radius, point_theta = polar_point

    if start_theta > end_theta:
        return (point_radius < radius and (point_theta >= start_theta or
                                           point_theta < end_theta))
    else:
        return (point_radius < radius and point_theta >= start_theta and
                point_theta < end_theta)