def run(self, experiments, reflections):
    self.logger.log_step_time("INTENSITY_STATISTICS")

    title = "\n                     Intensity Statistics (all accepted experiments)\n"
    self.logger.log(title, rank_prepend=False)
    if self.mpi_helper.rank == 0:
      self.logger.main_log(title)
    self.run_detail(reflections)

    title = "\n                     Intensity Statistics (odd accepted experiments)\n"
    self.logger.log(title, rank_prepend=False)
    if self.mpi_helper.rank == 0:
      self.logger.main_log(title)
    reflections_odd = reflection_table_utils.select_odd_experiment_reflections(reflections)
    self.run_detail(reflections_odd)

    title = "\n                     Intensity Statistics (even accepted experiments)\n"
    self.logger.log(title, rank_prepend=False)
    if self.mpi_helper.rank == 0:
      self.logger.main_log(title)
    reflections_even = reflection_table_utils.select_even_experiment_reflections(reflections)
    self.run_detail(reflections_even)

    self.logger.log_step_time("INTENSITY_STATISTICS", True)

    return experiments, reflections
Exemplo n.º 2
0
  def run(self, experiments, reflections):
    self.last_bin_incomplete = False
    self.suggested_resolution_scalar = -1.0

    reflections_before_stats_count = reflections.size()
    total_reflections_before_stats_count = self.mpi_helper.sum(reflections_before_stats_count)
    if self.mpi_helper.rank == 0:
      self.logger.main_log("Total reflections before doing intensity statistics: %d"%(total_reflections_before_stats_count))

    self.logger.log_step_time("INTENSITY_STATISTICS")

    title = "\n                     Intensity Statistics (odd accepted experiments)\n"
    self.logger.log(title, rank_prepend=False)
    if self.mpi_helper.rank == 0:
      self.logger.main_log(title)
    reflections_odd = reflection_table_utils.select_odd_experiment_reflections(reflections)
    self.run_detail(reflections_odd)

    title = "\n                     Intensity Statistics (even accepted experiments)\n"
    self.logger.log(title, rank_prepend=False)
    if self.mpi_helper.rank == 0:
      self.logger.main_log(title)
    reflections_even = reflection_table_utils.select_even_experiment_reflections(reflections)
    self.run_detail(reflections_even)

    title = "\n                     Intensity Statistics (all accepted experiments)\n"
    self.logger.log(title, rank_prepend=False)
    if self.mpi_helper.rank == 0:
      self.logger.main_log(title)
    self.run_detail(reflections)

    title = "\n                     CC 1/2, CC ISO\n"
    self.logger.log(title, rank_prepend=False)
    self.calculate_cc_int(reflections_odd, reflections_even)
    self.calculate_cc_iso(reflections)

    if self.mpi_helper.rank == 0:
      for entry in [(self.Total_CC_OneHalf_Table, "\n                     CC 1/2\n"),
                    (self.Total_CC_Iso_Table,     "\n                     CC ISO\n")]:
        Table = entry[0]
        Title = entry[1]
        if Table is not None:
          self.logger.main_log(Title)
          for row in Table.table:
            self.logger.main_log("%d/%d\t\t%f"%(row.observed_matching_asu_count, row.theor_asu_count, row.cross_correlation))
          self.logger.main_log("--------------------------------------------------------")
          self.logger.main_log("%d/%d\t\t%f\n"%(Table.cumulative_observed_matching_asu_count,
                                                     Table.cumulative_theor_asu_count,
                                                     Table.cumulative_cross_correlation))

    self.logger.log_step_time("INTENSITY_STATISTICS", True)

    return experiments, reflections
Exemplo n.º 3
0
  def run(self, experiments, reflections):

    # select, merge and output odd reflections
    odd_reflections = reflection_table_utils.select_odd_experiment_reflections(reflections)
    odd_reflections_merged = reflection_table_utils.merge_reflections(odd_reflections, self.params.merging.minimum_multiplicity)
    self.gather_and_output_reflections(odd_reflections_merged, 'odd')

    # select, merge and output even reflections
    even_reflections = reflection_table_utils.select_even_experiment_reflections(reflections)
    even_reflections_merged = reflection_table_utils.merge_reflections(even_reflections, self.params.merging.minimum_multiplicity)
    self.gather_and_output_reflections(even_reflections_merged, 'even')

    # merge and output all reflections
    all_reflections_merged = reflection_table_utils.merge_reflections(reflections, self.params.merging.minimum_multiplicity)
    self.gather_and_output_reflections(all_reflections_merged, 'all')

    return None, reflections
    def run(self, experiments, reflections):
        reflections_before_stats_count = reflections.size()
        total_reflections_before_stats_count = self.mpi_helper.sum(
            reflections_before_stats_count)
        if self.mpi_helper.rank == 0:
            self.logger.main_log(
                "Total reflections before doing intensity statistics: %d" %
                (total_reflections_before_stats_count))

        self.logger.log_step_time("INTENSITY_STATISTICS")

        title = "\n                     Intensity Statistics (odd accepted experiments)\n"
        self.logger.log(title, rank_prepend=False)
        if self.mpi_helper.rank == 0:
            self.logger.main_log(title)
        reflections_odd = reflection_table_utils.select_odd_experiment_reflections(
            reflections)
        self.run_detail(reflections_odd)

        title = "\n                     Intensity Statistics (even accepted experiments)\n"
        self.logger.log(title, rank_prepend=False)
        if self.mpi_helper.rank == 0:
            self.logger.main_log(title)
        reflections_even = reflection_table_utils.select_even_experiment_reflections(
            reflections)
        self.run_detail(reflections_even)

        title = "\n                     Intensity Statistics (all accepted experiments)\n"
        self.logger.log(title, rank_prepend=False)
        if self.mpi_helper.rank == 0:
            self.logger.main_log(title)
        self.run_detail(reflections)

        self.logger.log_step_time("INTENSITY_STATISTICS", True)

        return experiments, reflections