@staticmethod
def get_slice_wcs(wcs, slx=slice(480, 520), sly=slice(480, 520)):
    """Get slice of a WCS including higher orders like SIP and DET2IM
        
        The normal `~astropy.wcs.wcs.WCS` `slice` method doesn't apply the
        slice to all of the necessary keywords.  For example, SIP WCS also
        has a `CRPIX` reference pixel that needs to be offset along with
        the main `CRPIX`.
        
        Parameters
        ----------
        slx, sly : slice
            Slices in x and y dimensions to extract
        
        """
    NX = slx.stop - slx.start
    NY = sly.stop - sly.start
    slice_wcs = wcs.slice((sly, slx))
    slice_wcs.naxis1 = slice_wcs._naxis1 = NX
    slice_wcs.naxis2 = slice_wcs._naxis2 = NY
    if hasattr(slice_wcs, 'sip'):
        if slice_wcs.sip is not None:
            for c in [0, 1]:
                slice_wcs.sip.crpix[c] = slice_wcs.wcs.crpix[c]
    ACS_CRPIX = [4096 / 2, 2048 / 2]
    dx_crpix = slice_wcs.wcs.crpix[0] - ACS_CRPIX[0]
    dy_crpix = slice_wcs.wcs.crpix[1] - ACS_CRPIX[1]
    for ext in ['cpdis1', 'cpdis2', 'det2im1', 'det2im2']:
        if hasattr(slice_wcs, ext):
            wcs_ext = slice_wcs.__getattribute__(ext)
            if wcs_ext is not None:
                wcs_ext.crval[0] += dx_crpix
                wcs_ext.crval[1] += dy_crpix
                slice_wcs.__setattr__(ext, wcs_ext)
    return slice_wcs
