'Return a list of Point() where the x position is set to the nearest x value in *data* for each point in *pts*.'

def adjustXPositions(self, pts, data):

    points = []
    timeIndices = []
    for p in pts:
        x = np.argwhere((abs((data - p.x())) == abs((data - p.x())).min()))
        points.append(Point(data[x], p.y()))
        timeIndices.append(x)
    return (points, timeIndices)
