def topLeftToCenter(pointXY, screenXY, flipY=False):
    """
    Takes a coordinate given in topLeft reference frame and transforms it
    to center-based coordiantes. Switches from (0,0) as top left to
    (0,0) as center

    Parameters
    ----------
    pointXY : tuple
        The topLeft coordinate which is to be transformed
    screenXY : tuple, ints
        The (x,y) dimensions of the grid or screen
    flipY : Bool
        If True, flips the y coordinates

    Returns
    -------
    newPos : tuple
        The (x,y) position in center-based coordinates

    Examples
    --------
    >>> newPos = topLeftToCenter((100,100), (1920,1080), False)
    >>> newPos
    (-860.0, 440.0)

    """
    newX = pointXY[0] - (screenXY[0] / 2.0)
    newY = (screenXY[1] / 2.0) - pointXY[1]
    if flipY:
        newY *= -1
    return newX, newY