docs: def to_pixel(self, wcs, mode='all'):
          """
          Convert the aperture to a `RectangularAnnulus` object defined in
          pixel coordinates.
  
          Parameters
          ----------
          wcs : `~astropy.wcs.WCS`
              The world coordinate system (WCS) transformation to use.
  
          mode : {'all', 'wcs'}, optional
              Whether to do the transformation including distortions
              (``'all'``; default) or only including only the core WCS
              transformation (``'wcs'``).
  
          Returns
          -------
          aperture : `RectangularAnnulus` object
              A `RectangularAnnulus` object.
          """
  
          pixel_params = self._to_pixel_params(wcs, mode=mode)
          return RectangularAnnulus(**pixel_params)