photutils/aperture/circle.py
def to_pixel(self, wcs):
        """
        Return a CircularAnnulus instance in pixel coordinates.
        """

        x, y = skycoord_to_pixel(self.positions, wcs,
                                 mode=skycoord_to_pixel_mode)
        if self.r_in.unit.physical_type == 'angle':
            central_pos = SkyCoord([wcs.wcs.crval], frame=self.positions.name,
                                   unit=wcs.wcs.cunit)
            xc, yc, scale, angle = skycoord_to_pixel_scale_angle(central_pos,
                                                                 wcs)
            r_in = (scale * self.r_in).to(u.pixel).value
            r_out = (scale * self.r_out).to(u.pixel).value
        else:  # pixel
            r_in = self.r_in.value
            r_out = self.r_out.value

        pixel_positions = np.array([x, y]).transpose()

        return CircularAnnulus(pixel_positions, r_in, r_out)

        Return a CircularAnnulus instance in pixel coordinates.
        
Return a CircularAnnulus instance in pixel coordinates.
Return a CircularAnnulus instance in pixel coordinates .
def to_pixel(self, wcs):
        x, y = skycoord_to_pixel(self.positions, wcs,
                                 mode=skycoord_to_pixel_mode)
        if self.r_in.unit.physical_type == 'angle':
            central_pos = SkyCoord([wcs.wcs.crval], frame=self.positions.name,
                                   unit=wcs.wcs.cunit)
            xc, yc, scale, angle = skycoord_to_pixel_scale_angle(central_pos,
                                                                 wcs)
            r_in = (scale * self.r_in).to(u.pixel).value
            r_out = (scale * self.r_out).to(u.pixel).value
        else:  
            r_in = self.r_in.value
            r_out = self.r_out.value
        pixel_positions = np.array([x, y]).transpose()
        return CircularAnnulus(pixel_positions, r_in, r_out)
def to_pixel ( self , wcs ) : x , y = skycoord_to_pixel ( self . positions , wcs , mode = skycoord_to_pixel_mode ) if self . r_in . unit . physical_type == 'angle' : central_pos = SkyCoord ( [ wcs . wcs . crval ] , frame = self . positions . name , unit = wcs . wcs . cunit ) xc , yc , scale , angle = skycoord_to_pixel_scale_angle ( central_pos , wcs ) r_in = ( scale * self . r_in ) . to ( u . pixel ) . value r_out = ( scale * self . r_out ) . to ( u . pixel ) . value else : r_in = self . r_in . value r_out = self . r_out . value pixel_positions = np . array ( [ x , y ] ) . transpose ( ) return CircularAnnulus ( pixel_positions , r_in , r_out )
Return a CircularAnnulus instance in pixel coordinates.
Return a CircularAnnulus instance in pixel coordinates .
"""
        Return a CircularAnnulus instance in pixel coordinates.
        """ # pixel
self
wcs