code: def set_position(self, skydir):
          
  
          if not isinstance(skydir, SkyCoord):
              skydir = SkyCoord(ra=skydir[0], dec=skydir[1], unit=u.deg)
  
          if not skydir.isscalar:
              skydir = np.ravel(skydir)[0]
  
          radec = np.array([skydir.icrs.ra.deg, skydir.icrs.dec.deg])
          self._set_radec(radec)
docs: Set the position of the source.
  
          Parameters
          ----------
          skydir : `~astropy.coordinates.SkyCoord`