def show_plot(self,result): if result is not None: if (self.options.show_plots) : try : result.plots.show_all_pyplot() from wxtbx.command_line import loggraph loggraph.run([result.loggraph_file]) except Exception as e : print "Can't display plots" print "You should be able to view them by running this command:" print " wxtbx.loggraph %s" % result.loggraph_file raise e
a_values=self.unit_cell_statistics.all_uc_a_values, b_values=self.unit_cell_statistics.all_uc_b_values, c_values=self.unit_cell_statistics.all_uc_c_values, n_slots=n_slots, title=\ "Unit cell length distribution (all frames with compatible indexing): %s" % self.prefix) plt.show() fig = plt.figure(figsize=(9, 12)) self.plot_statistics_histograms(figure=fig, n_slots=n_slots) plt.show() def plot_statistics_histograms(self, figure, n_slots=20): ax3 = figure.add_axes([0.1, 0.7, 0.8, 0.25]) ax3.hist(self.frame_d_min, n_slots, color=[0.0, 0.5, 1.0]) ax3.set_xlabel("Integrated resolution limit") ax3.set_title("Resolution by frame (%s)" % self.prefix) if (__name__ == "__main__"): show_plots = False if ("--plots" in sys.argv): sys.argv.remove("--plots") show_plots = True result = run(args=sys.argv[1:]) if result is None: sys.exit(1) if (show_plots): result.plots.show_all_pyplot() from wxtbx.command_line import loggraph loggraph.run([result.loggraph_file])
if work_params.merging.reverse_lookup is not None: for key in scaler.reverse_lookup: if reindexing_ops.get(scaler.reverse_lookup[key], None) is None: reindexing_ops[scaler.reverse_lookup[key]]=0 reindexing_ops[scaler.reverse_lookup[key]]+=1 from xfel.cxi.cxi_cc import run_cc for key in reindexing_ops.keys(): run_cc(work_params,reindexing_op=key,output=out) return result if (__name__ == "__main__"): show_plots = False if ("--plots" in sys.argv) : sys.argv.remove("--plots") show_plots = True result = run(args=sys.argv[1:]) if result is None: sys.exit(1) if (show_plots) : try : result.plots.show_all_pyplot() from wxtbx.command_line import loggraph loggraph.run([result.loggraph_file]) except Exception, e : print "Can't display plots" print "You should be able to view them by running this command:" print " wxtbx.loggraph %s" % result.loggraph_file raise e