def configure_threshold(params, datablock): ''' Get the threshold strategy :param params: The input parameters :return: The threshold algorithm ''' from dials.interfaces import SpotFinderThresholdIface # Set the gain if necessary - requires datablock if params.spotfinder.threshold.xds.gain is None: assert (datablock) gain = None for imageset in datablock.extract_imagesets(): for panel in imageset.get_detector(): if gain is None: gain = panel.get_gain() else: assert abs(gain - panel.get_gain()) < 1e-7 params.spotfinder.threshold.xds.gain = gain # Configure the algotihm Algorithm = SpotFinderThresholdIface.extension( params.spotfinder.threshold.algorithm) return Algorithm(params)
def configure_threshold(params, datablock): ''' Get the threshold strategy :param params: The input parameters :return: The threshold algorithm ''' from dials.interfaces import SpotFinderThresholdIface # Set the gain if necessary - requires datablock if params.spotfinder.threshold.xds.gain is None: assert(datablock) gain = None for imageset in datablock.extract_imagesets(): for panel in imageset.get_detector(): if gain is None: gain = panel.get_gain() else: assert abs(gain - panel.get_gain()) < 1e-7 params.spotfinder.threshold.xds.gain = gain # Configure the algotihm Algorithm = SpotFinderThresholdIface.extension( params.spotfinder.threshold.algorithm) return Algorithm(params)
def configure_threshold(params): ''' Get the threshold strategy :param params: The input parameters :return: The threshold algorithm ''' from dials.interfaces import SpotFinderThresholdIface Algorithm = SpotFinderThresholdIface.extension( params.spotfinder.threshold.algorithm) return Algorithm(params)
def configure_threshold(params, datablock): ''' Get the threshold strategy :param params: The input parameters :return: The threshold algorithm ''' from dials.interfaces import SpotFinderThresholdIface # Configure the algotihm Algorithm = SpotFinderThresholdIface.extension( params.spotfinder.threshold.algorithm) return Algorithm(params)