예제 #1
0
    def export(self):
        """
        Export the files
        """
        from dials.util import best

        experiment = self.experiments[0]
        reflections = self.reflections[0]
        partiality = reflections["partiality"]
        sel = partiality >= self.params.min_partiality
        logger.info(
            "Selecting %s/%s reflections with partiality >= %s",
            sel.count(True),
            sel.size(),
            self.params.min_partiality,
        )
        if sel.count(True) == 0:
            raise Sorry(
                "No reflections remaining after filtering for minimum partiality (min_partiality=%f)"
                % (self.params.min_partiality))
        reflections = reflections.select(sel)

        imageset = experiment.imageset
        prefix = self.params.output.prefix

        best.write_background_file(f"{prefix}.dat",
                                   imageset,
                                   n_bins=self.params.n_bins)
        best.write_integrated_hkl(prefix, reflections)
        best.write_par_file(f"{prefix}.par", experiment)
예제 #2
0
    def export(self):
        '''
    Export the files

    '''
        from dials.util import best

        experiment = self.experiments[0]
        reflections = self.reflections[0]
        partiality = reflections['partiality']
        sel = partiality >= self.params.best.min_partiality
        logger.info(
            'Selecting %s/%s reflections with partiality >= %s' %
            (sel.count(True), sel.size(), self.params.best.min_partiality))
        if sel.count(True) == 0:
            raise Sorry(
                "No reflections remaining after filtering for minimum partiality (min_partiality=%f)"
                % (self.params.best.min_partiality))
        reflections = reflections.select(sel)

        imageset = experiment.imageset
        prefix = self.params.best.prefix

        best.write_background_file('%s.dat' % prefix,
                                   imageset,
                                   n_bins=self.params.best.n_bins)
        best.write_integrated_hkl(prefix, reflections)
        best.write_par_file('%s.par' % prefix, experiment)
예제 #3
0
파일: export.py 프로젝트: dials/dials
  def export(self):
    '''
    Export the files

    '''
    from dials.util import best

    experiment = self.experiments[0]
    reflections = self.reflections[0]
    imageset = experiment.imageset
    prefix = self.params.best.prefix

    best.write_background_file(
      '%s.dat' %prefix, imageset, n_bins=self.params.best.n_bins)
    best.write_integrated_hkl(prefix, reflections)
    best.write_par_file('%s.par' %prefix, experiment)
예제 #4
0
    def export(self):
        '''
    Export the files

    '''
        from dials.util import best

        experiment = self.experiments[0]
        reflections = self.reflections[0]
        imageset = experiment.imageset
        prefix = self.params.best.prefix

        best.write_background_file('%s.dat' % prefix,
                                   imageset,
                                   n_bins=self.params.best.n_bins)
        best.write_integrated_hkl(prefix, reflections)
        best.write_par_file('%s.par' % prefix, experiment)
예제 #5
0
파일: best_out.py 프로젝트: dials/dials
def run(args):

  from dials.util.options import OptionParser
  from dials.util.options import flatten_experiments
  from dials.util.options import flatten_reflections
  import libtbx.load_env
  from dials.util import best

  usage = "%s [options] experiments.json integrated.pickle" % (
    libtbx.env.dispatcher_name)

  parser = OptionParser(
    usage=usage,
    phil=phil_scope,
    read_experiments=True,
    read_reflections=True,
    epilog=help_message)

  params, options = parser.parse_args(show_diff_phil=True)
  experiments = flatten_experiments(params.input.experiments)
  reflections = flatten_reflections(params.input.reflections)

  if len(experiments) == 0 or len(reflections) == 0:
    parser.print_help()
    exit()

  #assert(len(experiments) == 1)

  experiment = experiments[0]
  reflections = reflections[0]
  imageset = experiment.imageset

  best.write_background_file('bestfile.dat', imageset, n_bins=params.n_bins)

  best.write_integrated_hkl('bestfile', reflections)

  best.write_par_file('bestfile.par', experiment)
예제 #6
0
def run(args):

    from dials.util.options import OptionParser
    from dials.util.options import flatten_experiments
    from dials.util.options import flatten_reflections
    import libtbx.load_env
    from dials.util import best

    usage = "%s [options] experiments.json integrated.pickle" % (
        libtbx.env.dispatcher_name)

    parser = OptionParser(usage=usage,
                          phil=phil_scope,
                          read_experiments=True,
                          read_reflections=True,
                          epilog=help_message)

    params, options = parser.parse_args(show_diff_phil=True)
    experiments = flatten_experiments(params.input.experiments)
    reflections = flatten_reflections(params.input.reflections)

    if len(experiments) == 0 or len(reflections) == 0:
        parser.print_help()
        exit()

    #assert(len(experiments) == 1)

    experiment = experiments[0]
    reflections = reflections[0]
    imageset = experiment.imageset

    best.write_background_file('bestfile.dat', imageset, n_bins=params.n_bins)

    best.write_integrated_hkl('bestfile', reflections)

    best.write_par_file('bestfile.par', experiment)