Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
  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)