コード例 #1
0
    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)
コード例 #2
0
ファイル: factory.py プロジェクト: dials/dials
  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)
コード例 #3
0
ファイル: factory.py プロジェクト: biochem-fan/dials
  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)
コード例 #4
0
ファイル: factory.py プロジェクト: hmeduyvesteyn/dials
    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)