예제 #1
0
파일: flex.py 프로젝트: biochem-fan/dials
  def is_overloaded(self, experiments):
    '''
    Check if the shoebox contains overloaded pixels.

    :param experiments: The experiment list
    :return: True/False overloaded for each reflection

    '''
    from dials.algorithms.shoebox import OverloadChecker
    assert('shoebox' in self)
    assert('id' in self)
    checker = OverloadChecker()
    for experiment in experiments:
      checker.add(flex.double(
        (p.get_trusted_range()[1]
          for p in experiment.detector)))
    result = checker(self['id'], self['shoebox'])
    self.set_flags(result, self.flags.overloaded)
    return result
예제 #2
0
    def is_overloaded(self, experiments):
        """
        Check if the shoebox contains overloaded pixels.

        :param experiments: The experiment list
        :return: True/False overloaded for each reflection
        """
        from dials.algorithms.shoebox import OverloadChecker

        assert "shoebox" in self
        assert "id" in self
        detectors = [expr.detector for expr in experiments]
        checker = OverloadChecker()
        for detector in detectors:
            checker.add(
                cctbx.array_family.flex.double(
                    p.get_trusted_range()[1] for p in detector
                )
            )
        result = checker(self["id"], self["shoebox"])
        self.set_flags(result, self.flags.overloaded)
        return result
예제 #3
0
파일: flex.py 프로젝트: dials/dials
  def is_overloaded(self, experiments_or_datablock):
    '''
    Check if the shoebox contains overloaded pixels.

    :param experiments: The experiment list
    :return: True/False overloaded for each reflection

    '''
    from dxtbx.model.experiment.experiment_list import ExperimentList
    from dials.algorithms.shoebox import OverloadChecker
    assert('shoebox' in self)
    assert('id' in self)
    if isinstance(experiments_or_datablock, ExperimentList):
      detectors = [expr.detector for expr in experiments_or_datablock]
    else:
      imagesets = experiments_or_datablock.extract_imagesets()
      detectors = [iset.get_detector() for iset in imagesets]
    checker = OverloadChecker()
    for detector in detectors:
      checker.add(flex.double((p.get_trusted_range()[1] for p in detector)))
    result = checker(self['id'], self['shoebox'])
    self.set_flags(result, self.flags.overloaded)
    return result
예제 #4
0
파일: flex.py 프로젝트: kek-pf-mx/dials
    def is_overloaded(self, experiments_or_datablock):
        '''
    Check if the shoebox contains overloaded pixels.

    :param experiments: The experiment list
    :return: True/False overloaded for each reflection

    '''
        from dxtbx.model.experiment_list import ExperimentList
        from dials.algorithms.shoebox import OverloadChecker
        assert ('shoebox' in self)
        assert ('id' in self)
        if isinstance(experiments_or_datablock, ExperimentList):
            detectors = [expr.detector for expr in experiments_or_datablock]
        else:
            imagesets = experiments_or_datablock.extract_imagesets()
            detectors = [iset.get_detector() for iset in imagesets]
        checker = OverloadChecker()
        for detector in detectors:
            checker.add(
                flex.double((p.get_trusted_range()[1] for p in detector)))
        result = checker(self['id'], self['shoebox'])
        self.set_flags(result, self.flags.overloaded)
        return result