#NEWLINE# def load_header( self , header , fobj = None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . logger . debug ( 'Reconstructing PyFITS header' ) #NEWLINE# self . header = pyfits . Header ( header . items ( ) ) #NEWLINE# self . logger . debug ( 'Trying to make astropy-- wcs object' ) #NEWLINE# self . wcs = pywcs . WCS ( self . header , fobj = fobj , relax = True ) #NEWLINE# self . logger . debug ( 'made astropy wcs object' ) #NEWLINE# self . coordsys = get_coord_system_name ( self . header ) #NEWLINE# self . logger . debug ( ( 'Coordinate system is: %s' % self . coordsys ) ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . logger . error ( ( 'Error making WCS object: %s' % str ( e ) ) ) #NEWLINE# self . wcs = None