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

        x, y = skycoord_to_pixel(self.positions, wcs,
                                 mode=skycoord_to_pixel_mode)
        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)

        if self.a.unit.physical_type == 'angle':
            a = (scale * self.a).to(u.pixel).value
            b = (scale * self.b).to(u.pixel).value
        else:  # pixel
            a = self.a.value
            b = self.b.value

        theta = (angle + self.theta).to(u.radian).value

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

        return EllipticalAperture(pixel_positions, a, b, theta)

        Return a EllipticalAperture instance in pixel coordinates.
        
Return a EllipticalAperture instance in pixel coordinates.
Return a EllipticalAperture instance in pixel coordinates .
def to_pixel(self, wcs):
        x, y = skycoord_to_pixel(self.positions, wcs,
                                 mode=skycoord_to_pixel_mode)
        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)
        if self.a.unit.physical_type == 'angle':
            a = (scale * self.a).to(u.pixel).value
            b = (scale * self.b).to(u.pixel).value
        else:  
            a = self.a.value
            b = self.b.value
        theta = (angle + self.theta).to(u.radian).value
        pixel_positions = np.array([x, y]).transpose()
        return EllipticalAperture(pixel_positions, a, b, theta)
def to_pixel ( self , wcs ) : x , y = skycoord_to_pixel ( self . positions , wcs , mode = skycoord_to_pixel_mode ) 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 ) if self . a . unit . physical_type == 'angle' : a = ( scale * self . a ) . to ( u . pixel ) . value b = ( scale * self . b ) . to ( u . pixel ) . value else : a = self . a . value b = self . b . value theta = ( angle + self . theta ) . to ( u . radian ) . value pixel_positions = np . array ( [ x , y ] ) . transpose ( ) return EllipticalAperture ( pixel_positions , a , b , theta )
Return a EllipticalAperture instance in pixel coordinates.
Return a EllipticalAperture instance in pixel coordinates .
"""
        Return a EllipticalAperture instance in pixel coordinates.
        """ # pixel
self
wcs