def write(self, filename='same'):
        """
        write object to an ENVI header file
        """
        if filename == 'same':
            filename = self.filename
        if not filename.endswith('.hdr'):
            filename += '.hdr'
        with open(filename, 'w') as out:
            out.write(self.__str__())