#NEWLINE# def radectopix( self , ra_deg , dec_deg , coords = 'data' , naxispath = None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ( x , y ) = self . wcs . wcs2pix ( ra_deg , dec_deg ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . logger . error ( ( 'Error calculating radectopix: %s' % str ( e ) ) ) #NEWLINE# raise WCSError ( e ) #NEWLINE# #UNINDENT# if ( coords == 'fits' ) : #NEWLINE# #INDENT# ( x , y ) = ( ( x + 1 ) , ( y + 1 ) ) #NEWLINE# #UNINDENT# return ( x , y )