def skydir_to_pixel(self, skydir):
        """Return the pixel index of a SkyCoord object."""
        if self.coordsys in ['CEL', 'EQU']:
            skydir = skydir.transform_to('icrs')
            lon = skydir.ra.deg
            lat = skydir.dec.deg
        else:
            skydir = skydir.transform_to('galactic')
            lon = skydir.l.deg
            lat = skydir.b.deg

        return self.get_pixel_indices(lat, lon)
def skydir_to_pixel ( self , skydir ) : if self . coordsys in [ 'CEL' , 'EQU' ] : skydir = skydir . transform_to ( 'icrs' ) lon = skydir . ra . deg lat = skydir . dec . deg else : skydir = skydir . transform_to ( 'galactic' ) lon = skydir . l . deg lat = skydir . b . deg return self . get_pixel_indices ( lat , lon )
Return the pixel index of a SkyCoord object.