#NEWLINE# def radectopix( self , ra_deg , dec_deg , coords = 'data' , naxispath = None ) : #NEWLINE# #INDENT# if ( coords == 'data' ) : #NEWLINE# #INDENT# origin = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# origin = 1 #NEWLINE# #UNINDENT# args = [ ra_deg , dec_deg ] #NEWLINE# if naxispath : #NEWLINE# #INDENT# args += ( [ 0 ] * len ( naxispath ) ) #NEWLINE# #UNINDENT# skycrd = numpy . array ( [ args ] , numpy . float_ ) #NEWLINE# try : #NEWLINE# #INDENT# pix = self . wcs . wcs_world2pix ( skycrd , origin ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . logger . error ( ( 'Error calculating radectopix: %s' % str ( e ) ) ) #NEWLINE# raise WCSError ( e ) #NEWLINE# #UNINDENT# x = float ( pix [ ( 0 , 0 ) ] ) #NEWLINE# y = float ( pix [ ( 0 , 1 ) ] ) #NEWLINE# return ( x , y )