'Support pickling of WCS objects.  This is done by serializing
to an in-memory FITS file and dumping that as a string.'

def __reduce__(self):

    hdulist = self.to_fits(relax=True)
    buffer = io.BytesIO()
    hdulist.writeto(buffer)
    return (__WCS_unpickle__, (self.__class__, self.__dict__, buffer.getvalue()))
