def calcNewEdges(wcs, shape):
    """
    This method will compute sky coordinates for all the pixels around
    the edge of an image AFTER applying the geometry model.

    Parameters
    ----------
    wcs : obj
        HSTWCS object for image

    shape : tuple
        numpy shape tuple for size of image

    Returns
    -------
    border : arr
        array which contains the new positions for
        all pixels around the border of the edges in alpha,dec

    """

    naxis1 = shape[1]
    naxis2 = shape[0]
    # build up arrays for pixel positions for the edges
    # These arrays need to be: array([(x,y),(x1,y1),...])
    numpix = naxis1*2 + naxis2*2
    border = np.zeros(shape=(numpix,2),dtype=np.float64)

    # Now determine the appropriate values for this array
    # We also need to account for any subarray offsets
    xmin = 1.
    xmax = naxis1
    ymin = 1.
    ymax = naxis2

    # Build range of pixel values for each side
    # Add 1 to make them consistent with pixel numbering in IRAF
    # Also include the LTV offsets to represent position in full chip
    #   since the model works relative to full chip positions.
    xside = np.arange(naxis1) + xmin
    yside = np.arange(naxis2) + ymin

    #Now apply them to the array to generate the appropriate tuples
    #bottom
    _range0 = 0
    _range1 = naxis1
    border[_range0:_range1,0] = xside
    border[_range0:_range1,1] = ymin
    #top
    _range0 = _range1
    _range1 = _range0 + naxis1
    border[_range0:_range1,0] = xside
    border[_range0:_range1,1] = ymax
    #left
    _range0 = _range1
    _range1 = _range0 + naxis2
    border[_range0:_range1,0] = xmin
    border[_range0:_range1,1] = yside
    #right
    _range0 = _range1
    _range1 = _range0 + naxis2
    border[_range0:_range1,0] = xmax
    border[_range0:_range1,1] = yside

    edges = wcs.all_pix2world(border[:,0],border[:,1],1)
    return edges
This method will compute sky coordinates for all the pixels around
    the edge of an image AFTER applying the geometry model.

    Parameters
    ----------
    wcs : obj
        HSTWCS object for image

    shape : tuple
        numpy shape tuple for size of image

    Returns
    -------
    border : arr
        array which contains the new positions for
        all pixels around the border of the edges in alpha,dec