def plot_histo(a_h, a_stop): import window p = window.plotter(inlib.get_cout(), 1, 1, 0, 0, 700, 500) p.plot_histo_cp(a_h) p.show() print('steer...') #p.steer() # it blocks input from the prompt (because threading module is not a truely thread system). import time while True: if a_stop() == True: break if p.sync() == False: break time.sleep(0.01) print('end steer.') del p import offscreen p = offscreen.plotter(inlib.get_cout(), 0, 0, 700, 500) p.plot_histo_cp(a_h) p.out_ps() p.out_zb_ps() p.out_bsg() del p
print("inlib::histo::c3d entries : "+str(c3.entries())) print(" mean x = "+str(c3.mean_x())+", rms x = "+str(c3.rms_x())) print(" mean y = "+str(c3.mean_y())+", rms y = "+str(c3.rms_y())) print(" mean z = "+str(c3.mean_z())+", rms z = "+str(c3.rms_z())) print(" low x = "+str(c3.lower_edge_x())+", up x = "+str(c3.upper_edge_x())) print(" low y = "+str(c3.lower_edge_y())+", up y = "+str(c3.upper_edge_y())) print(" low z = "+str(c3.lower_edge_z())+", up z = "+str(c3.upper_edge_z())) #/////////////////////////////////////////////////////////////////////////////////////// #/// plotting : ///////////////////////////////////////////////////////////////////////// #/////////////////////////////////////////////////////////////////////////////////////// if args.vis_mode == "window" : if verbose == True : print("plot (window) ...") import window p = window.plotter(inlib.get_cout(),1,1,0,0,700,500) p.plot_cloud3D(c3) p.show() p.steer() del p elif args.vis_mode == "offscreen" : if verbose == True : print("plot (offscreen) ...") import offscreen p = offscreen.plotter(inlib.get_cout(),1,1,400,400) p.plot_cloud3D(c3) if args.vis_format == "bsg": p.out_bsg('out_csv_c3d_vis.bsg') else: p.write_paper('out_csv_c3d_vis.ps','INZB_PS') p.write_paper('out_csv_c3d_vis.png','INZB_PNG')
if verbose == True: print("inlib::histo::c3d entries : " + str(c3.entries())) print(" mean x = " + str(c3.mean_x()) + ", rms x = " + str(c3.rms_x())) print(" mean y = " + str(c3.mean_y()) + ", rms y = " + str(c3.rms_y())) print(" mean z = " + str(c3.mean_z()) + ", rms z = " + str(c3.rms_z())) #/////////////////////////////////////////////////////////////////////////////////////// #/// plotting : ///////////////////////////////////////////////////////////////////////// #/////////////////////////////////////////////////////////////////////////////////////// width = 700 height = 500 if args.vis_mode == "window": if verbose == True: print("plot (window) ...") import window p = window.plotter(inlib.get_cout(), 2, 2, 0, 0, width, height) sgp = p.plot_histo(h1_0) sgp.y_axis_automated.value(False) sgp.y_axis_min.value(0) sgp.y_axis_max.value(y_max) p.next() sgp = p.plot_histo(h1_1) sgp.y_axis_automated.value(False) sgp.y_axis_min.value(0) sgp.y_axis_max.value(y_max) p.next() sgp = p.plot_histo(h1_2) sgp.y_axis_automated.value(False) sgp.y_axis_min.value(0) sgp.y_axis_max.value(y_max)