This documentation page refers to a previous release of DIALS (1.14).
Click here to go to the corresponding page for the latest version of DIALS

Source code for dials.extensions.simple_centroid_ext

from __future__ import absolute_import, division
from __future__ import print_function


[docs]class SimpleCentroidExt(object): """ An extension class implementing a simple centroid algorithm. """ name = "simple" default = True def __init__(self, params, experiments): """Initialise the algorithm. :param params: The input phil parameters :param experiments: The experiment list """ self.experiments = experiments
[docs] def compute_centroid(self, reflections, image_volume=None): """ Compute the centroid. :param reflections: The list of reflections """ from dials.algorithms.centroid.simple.algorithm import Algorithm algorithm = Algorithm(self.experiments) return algorithm(reflections, image_volume=image_volume)