#NEWLINE# def centroid( self , data , xc , yc , radius ) : #NEWLINE# #INDENT# ( x0 , y0 , arr ) = self . cut_region ( self , xc , yc , radius , y0 ) #NEWLINE# ( cy , cx ) = ndimage . center_of_mass ( arr ) #NEWLINE# return ( cx , cy )