code: def get_pixel_indices(self, lons, lats, ibin=None):
          
          lons = np.array(lons, ndmin=1)
          lats = np.array(lats, ndmin=1)
  
          if len(lats) != len(lons):
              raise RuntimeError('Map.get_pixel_indices, input lengths '
                                 'do not match %i %i' % (len(lons), len(lats)))
          if len(self._npix) == 2:
              pix_x, pix_y = self._wcs.wcs_world2pix(lons, lats, 0)
              pixcrd = [np.floor(pix_x).astype(int), np.floor(pix_y).astype(int)]
          elif len(self._npix) == 3:
              all_lons = np.expand_dims(lons, -1)
              all_lats = np.expand_dims(lats, -1)
              if ibin is None:
                  all_bins = (np.expand_dims(
                      np.arange(self.npix[2]), -1) * np.ones(lons.shape)).T
              else:
                  all_bins = ibin
  
              l = self.wcs.wcs_world2pix(all_lons, all_lats, all_bins, 0)
              pix_x = l[0]
              pix_y = l[1]
              pixcrd = [np.floor(l[0]).astype(int), np.floor(l[1]).astype(int),
                        all_bins.astype(int)]
  
          return pixcrd
docs: Return the indices in the flat array corresponding to a set of coordinates
  
          Parameters
          ----------
          lons  : array-like
             'Longitudes' (RA or GLON)
  
          lats  : array-like
             'Latitidues' (DEC or GLAT)
  
          ibin : int or array-like
             Extract data only for a given energy bin.  None -> extract data for all energy bins.
  
          Returns
          ----------
          pixcrd : list
             Pixel indices along each dimension of the map.