code: def get_sources_by_position(self, skydir, dist, min_dist=None,
                                  square=False, coordsys='CEL'):
          
  
          msk = get_skydir_distance_mask(self._src_skydir, skydir, dist,
                                         min_dist=min_dist, square=square,
                                         coordsys=coordsys)
  
          radius = self._src_skydir.separation(skydir).deg
          radius = radius[msk]
  
          srcs = [self._srcs[i] for i in np.nonzero(msk)[0]]
  
          isort = np.argsort(radius)
          radius = radius[isort]
          srcs = [srcs[i] for i in isort]
  
          return radius, srcs
docs: Retrieve sources within a certain angular distance of a sky
          coordinate.  This function supports two types of geometric
          selections: circular (square=False) and square (square=True).
          The circular selection finds all sources with a given angular
          distance of the target position.  The square selection finds
          sources within an ROI-like region of size R x R where R = 2 x
          dist.
  
          Parameters
          ----------
  
          skydir : `~astropy.coordinates.SkyCoord` 
              Sky direction with respect to which the selection will be applied.
  
          dist : float
              Maximum distance in degrees from the sky coordinate.
  
          square : bool
              Choose whether to apply a circular or square selection.
  
          coordsys : str
              Coordinate system to use when applying a selection with square=True.