class ConstDBackgroundExt(BackgroundIface): ''' An extension class implementing a crude background algorithm. ''' name = 'const_d' @classmethod def phil(cls): from libtbx.phil import parse phil = parse(''' ''') return phil def __init__(self, params, experiments): ''' Initialise the algorithm. :param params: The input parameters :param experiments: The list of experiments ''' from libtbx.phil import parse from dials.algorithms.background.const_d import BackgroundAlgorithm # Create the algorithm self._algorithm = BackgroundAlgorithm(experiments) def compute_background(self, reflections): ''' Compute the background. :param reflections: The list of reflections ''' return self._algorithm.compute_background(reflections)
def __init__(self, params, experiments): ''' Initialise the algorithm. :param params: The input parameters :param experiments: The list of experiments ''' from libtbx.phil import parse from dials.algorithms.background.const_d import BackgroundAlgorithm # Create the algorithm self._algorithm = BackgroundAlgorithm(experiments)