コード例 #1
0
ファイル: algorithm.py プロジェクト: jbeilstenedmands/dials
class Algorithm(object):
    """
    A python class to wrap the centroid algorithm
    """
    def __init__(self, experiments):
        """
        Initialize the centroider

        :param experiments: The experiment list
        """
        from dials.algorithms.centroid.simple import Centroider

        # Create the centroider
        self.centroider = Centroider()

        # Add all the experiments
        for exp in experiments:
            if exp.scan is not None:
                self.centroider.add(exp.detector, exp.scan)
            else:
                self.centroider.add(exp.detector)

    def __call__(self, reflections, image_volume=None):
        """
        Do the centroiding

        :param reflections: The reflection list
        """
        if image_volume is None:
            return self.centroider(reflections)
        return self.centroider(reflections, image_volume)
コード例 #2
0
ファイル: algorithm.py プロジェクト: jbeilstenedmands/dials
    def __init__(self, experiments):
        """
        Initialize the centroider

        :param experiments: The experiment list
        """
        from dials.algorithms.centroid.simple import Centroider

        # Create the centroider
        self.centroider = Centroider()

        # Add all the experiments
        for exp in experiments:
            if exp.scan is not None:
                self.centroider.add(exp.detector, exp.scan)
            else:
                self.centroider.add(exp.detector)
コード例 #3
0
ファイル: algorithm.py プロジェクト: dials/dials
class Algorithm(object):
  '''
  A python class to wrap the centroid algorithm

  '''

  def __init__(self, experiments):
    '''
    Initialize the centroider

    :param experiments: The experiment list

    '''
    from dials.algorithms.centroid.simple import Centroider

    # Create the centroider
    self.centroider = Centroider()

    # Add all the experiments
    for exp in experiments:
      if exp.scan is not None:
        self.centroider.add(
          exp.detector,
          exp.scan)
      else:
        self.centroider.add(
          exp.detector)

  def __call__(self, reflections, image_volume=None):
    '''
    Do the centroiding

    :param reflections: The reflection list

    '''
    if image_volume is None:
      return self.centroider(reflections)
    return self.centroider(reflections, image_volume)
コード例 #4
0
ファイル: algorithm.py プロジェクト: dials/dials
  def __init__(self, experiments):
    '''
    Initialize the centroider

    :param experiments: The experiment list

    '''
    from dials.algorithms.centroid.simple import Centroider

    # Create the centroider
    self.centroider = Centroider()

    # Add all the experiments
    for exp in experiments:
      if exp.scan is not None:
        self.centroider.add(
          exp.detector,
          exp.scan)
      else:
        self.centroider.add(
          exp.detector)