def get_hstwcs(filename,hdulist,extnum):
    """ Return the HSTWCS object for a given chip. """
    hdrwcs = wcsutil.HSTWCS(hdulist,ext=extnum)
    hdrwcs.filename = filename
    hdrwcs.expname = hdulist[extnum].header['expname']
    hdrwcs.extver = hdulist[extnum].header['extver']

    return hdrwcs
Return the HSTWCS object for a given chip.