photutils/aperture/circle.py
def to_pixel(self, wcs):
        """
        Convert the aperture to a `CircularAperture` instance in
        pixel coordinates.
        """

        x, y = skycoord_to_pixel(self.positions, wcs,
                                 mode=skycoord_to_pixel_mode)

        if self.r.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 = (scale * self.r).to(u.pixel).value
        else:
            r = self.r.value    # pixels

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

        return CircularAperture(pixel_positions, r)

        Convert the aperture to a `CircularAperture` instance in
        pixel coordinates.
        
Convert the aperture to a `CircularAperture` instance in
pixel coordinates.
Convert the aperture to a ` CircularAperture ` 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.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 = (scale * self.r).to(u.pixel).value
        else:
            r = self.r.value    
        pixel_positions = np.array([x, y]).transpose()
        return CircularAperture(pixel_positions, r)
def to_pixel ( self , wcs ) : x , y = skycoord_to_pixel ( self . positions , wcs , mode = skycoord_to_pixel_mode ) if self . r . 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 = ( scale * self . r ) . to ( u . pixel ) . value else : r = self . r . value pixel_positions = np . array ( [ x , y ] ) . transpose ( ) return CircularAperture ( pixel_positions , r )
Convert the aperture to a `CircularAperture` instance in
pixel coordinates.
Convert the aperture to a ` CircularAperture ` instance in pixel coordinates .
"""
        Convert the aperture to a `CircularAperture` instance in
        pixel coordinates.
        """ # pixels
self
wcs