Пример #1
0
  def summarise(self):

    summary = ['Sweep: %s' % self._name]

    if self._template and self._directory:
      summary.append('Files %s' % os.path.join(self._directory,
                                               self._template))

    if self._frames_to_process:
      summary.append('Images: %d to %d' % tuple(self._frames_to_process))


    if self._frames_to_process:
      first = self._frames_to_process[0]
      start = self._frames_to_process[0] - first
      end = self._frames_to_process[1] - first + 1
      self._imageset = self._imageset[start:end]

    if self._get_indexer():
      # print the comparative values

      indxr = self._get_indexer()

      from xia2.Schema.Interfaces.FrameProcessor import get_beam_centre
      imgset = self.get_input_imageset()
      hbeam = get_beam_centre(imgset.get_detector(), imgset.get_beam())
      ibeam = indxr.get_indexer_beam_centre()

      if hbeam and ibeam:
        summary.append('Beam %.2f %.2f => %.2f %.2f' % \
        (hbeam[0], hbeam[1], ibeam[0], ibeam[1]))

      hdist = imgset.get_detector()[0].get_distance()
      idist = indxr.get_indexer_distance()

      if hdist and idist:
        summary.append('Distance %.2f => %.2f' % (hdist, idist))

      summary.append('Date: %s' %time.asctime(
        time.gmtime(imgset.get_scan().get_epochs()[0])))

    return summary
Пример #2
0
Файл: Sweep.py Проект: xia2/xia2
 def get_beam_centre(self):
   from xia2.Schema.Interfaces.FrameProcessor import get_beam_centre
   detector = self._imageset.get_detector()
   beam = self._imageset.get_beam()
   return get_beam_centre(detector, beam)