def in_costmap_bounds(data, map_x, map_y):
    """
    whether a pixel at (map_x, map_y) is inside the costmap area
    :param data: data array
    :param map_x int: x coordinate
    :param map_y int: y coordinate
    :return bool: whether a pixel at (map_x, map_y) is inside the costmap area
    """
    return not (map_x < 0 or map_y < 0 or map_x >= data.shape[1] or map_y >= data.shape[0])