def getMosaicWindow(viewer,minCoords):
    """
    getMosaicWindow
    
    Mosaic images should contain fields in the header that give the coordinates of the lower left-hand corner of the image.
    This function uses those coordinates to calculate the position of the window so that the viewer is properly centered
    on the image.
    
    Parameters
    ----------
    viewer: dictionary
        - Dictionary of fitsviewer properties. Required keys:
            xCenter, yCenter: int
                - x and y coordinates at the center of the image
            canvasWidth,canvasHeight: int
                - Width and height of the client canvas displaying the fits image
            scale: float
                - Scale of the image (scale=1 has 1 pixel for each element of the image array)
    
    minCoords: list
        - x,y coordinates of the physical coordinates of the image.
    
    Returns
    -------
    viewer: dictionary
        - The same viewer sent to the function is returned with its upper left boundary (x0,y0) and lower right boundary
        (xf,yf) calculated
    """
    viewer['xCenter']=viewer['xCenter']-minCoords[0]
    viewer['xCenter']=viewer['xCenter']-minCoords[0]
    return viewer