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)