'Make a copy of the HDU, both header and data are copied.'

def copy(self):

    if (self.data is not None):
        data = self.data.copy()
    else:
        data = None
    return self.__class__(data=data, header=self._header.copy())
