docs: def query_ssos(self, mpc_observations, lunation_count=None):
          """Send a query to the SSOS web service, looking for available observations using the given track.
  
          :param mpc_observations: a list of mpc.Observations
          :param lunation_count: how many dark runs (+ and -) to search into
          :return: an SSOSData object
          :rtype: SSOSData
          """
  
          # we observe ~ a week either side of new moon
          # but we don't know when in the dark run the discovery happened
          # so be generous with the search boundaries, add extra 2 weeks
          # current date just has to be the night of the triplet,
  
          if lunation_count is None:
              # Only using SSOS to find data acquired during the survey period, for now.
              search_start_date = Time('2013-02-08', scale='utc')
              search_end_date = Time(datetime.datetime.now().strftime('%Y-%m-%d'), scale='utc')
          else:
              search_start_date = Time((mpc_observations[0].date.jd * units.day - (
                  self._nights_per_darkrun +
                  lunation_count * self._nights_separating_darkruns)), format='jd', scale='utc')
              search_end_date = Time((mpc_observations[-1].date.jd * units.day + (
                  self._nights_per_darkrun +
                  lunation_count * self._nights_separating_darkruns)), format='jd', scale='utc')
  
          logger.info("Sending query to SSOS start_date: {} end_data: {}\n".format(search_start_date, search_end_date))
          query = Query(mpc_observations,
                        search_start_date=search_start_date,
                        search_end_date=search_end_date)
          logger.debug("Parsing query results...")
          tracks_data = self.ssos_parser.parse(query.get(), mpc_observations=mpc_observations)
  
          tracks_data.mpc_observations = {}
  
          for mpc_observation in mpc_observations:
              # attach the input observations to the the SSOS query result.
              if isinstance(mpc_observation.comment, mpc.OSSOSComment):
                  try:
                      tracks_data.mpc_observations[mpc_observation.comment.frame.strip()] = mpc_observation
                  except Exception as e:
                      logger.error(str(e))
                      logger.error(mpc_observation)
  
          ref_sky_coord = None
  
          min_radius = config.read('CUTOUTS.SINGLETS.RADIUS')
          if not isinstance(min_radius, units.Quantity):
              min_radius = min_radius * units.arcsec
  
          for source in tracks_data.get_sources():
              astrom_observations = tracks_data.observations
              source_readings = source.get_readings()
              foci = []
              # Loop over all the sources to determine which ones go which which focus location.
              # this is helpful to for blinking.
              for idx in range(len(source_readings)):
                  source_reading = source_readings[idx]
                  astrom_observation = astrom_observations[idx]
                  self.orbit.predict(Time(astrom_observation.mjd, format='mjd', scale='utc'))
                  assert isinstance(source_reading, SourceReading)
                  if ref_sky_coord is None or source_reading.sky_coord.separation(ref_sky_coord) > min_radius * 0.8:
                      foci.append([])
                      ref_sky_coord = source_reading.sky_coord
                  foci[-1].append(source_reading)
              for focus in foci:
                  ra = numpy.zeros(len(focus))
                  dec = numpy.zeros(len(focus))
                  for idx in range(len(focus)):
                      source_reading = focus[idx]
                      ra[idx] = source_reading.sky_coord.ra.to('degree').value
                      dec[idx] = source_reading.sky_coord.dec.to('degree').value
                  ref_sky_coord = SkyCoord(ra.mean(), dec.mean(), unit='degree')
                  for source_reading in focus:
                      source_reading.reference_sky_coord = ref_sky_coord
                      source_reading.pa = self.orbit.pa
                      # why are these being recorded just in pixels?  Because the error ellipse is drawn in pixels.
                      # TODO: Modify error ellipse drawing routine to use WCS but be sure
                      # that this does not cause trouble with the use of dra/ddec for cutout computer
                      source_reading.dx = self.orbit.dra
                      source_reading.dy = self.orbit.ddec
                      frame = astrom_observation.rawname
                      if frame in tracks_data.mpc_observations:
                          source_reading.discovery = tracks_data.mpc_observations[frame].discovery
  
          return tracks_data