data_list.append(score_array) label_list.append(json_dict["label"]) # PLOT STATISTICS ######################################################### fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(16, 9)) common.plot_hist1d(ax1, data_list, label_list=label_list, logx=logx, logy=logy, xmax=max_abscissa, overlaid=overlaid, xlabel="Score", title=title, num_bins=30, #num_bins=[0., 0.0011, 0.0022, 0.0033], tight=tight, plot_ratio=plot_ratio, degx=degx) # Save file and plot ######## if not notebook: plt.savefig(output_file_path, bbox_inches='tight') if not quiet: plt.show()
data_list = parse_fits_files(fits_file_name_list, progress_bar=not notebook) # PLOT STATISTICS ######################################################### if not notebook: print("Plotting...") fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(16, 9)) common.plot_hist1d(axis=ax1, data_list=[np.array(data_list).flatten()], label_list=[], logy=logy, xlabel="Photoelectrons", xylabel_fontsize=16, title=title, linear_xlabel_style=None, linear_ylabel_style=None, num_bins=None, info_box_rms=False, info_box_std=True) # Save file and plot ######## if not notebook: plt.tight_layout() plt.savefig(output_file_path, bbox_inches='tight') if not quiet: plt.show()
else: errors_str = None if errors_str is not None: title = "{} ({}) histogram for {}".format(key, errors_str, label) else: title = "{} histogram for {}".format(key, label) # PLOT STATISTICS ######################################################### fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(16, 9)) common.plot_hist1d(ax1, [data_array], num_bins=50, logx=logx, logy=logy, xlabel=key, title=title, tight=tight, info_box_rms=False, info_box_std=True, plot_ratio=False) # SAVE FILE AND PLOT ###################################################### if not notebook: plt.savefig(output_file_path, bbox_inches='tight') if not quiet: plt.show()
if errors_str is not None: title = "{} ({}) histogram for {}".format(key, errors_str, label) else: title = "{} histogram for {}".format(key, label) # PLOT STATISTICS ######################################################### fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(16, 9)) common.plot_hist1d(ax1, [data_array], num_bins=50, logx=logx, logy=logy, xlabel=key, title=title, tight=tight, info_box_rms=False, info_box_std=True, plot_ratio=False) # SAVE FILE AND PLOT ###################################################### if not notebook: plt.savefig(output_file_path, bbox_inches='tight') if not quiet: plt.show()
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2, figsize=(16, 9)) num_bins = 30 legend_fontsize = 14 show_info_box = True info_box_num_samples = True info_box_mean = False info_box_rms = False info_box_std = False common.plot_hist1d(axis=ax1, data_list=data_list1, label_list=label_list, logx=logx, logy=logy, num_bins=num_bins, legend_fontsize=legend_fontsize, show_info_box=show_info_box, info_box_num_samples=info_box_num_samples, info_box_mean=info_box_mean, info_box_rms=info_box_rms, info_box_std=info_box_std) common.plot_hist1d(axis=ax2, data_list=data_list2, label_list=label_list, logx=logx, logy=logy, num_bins=num_bins, legend_fontsize=legend_fontsize, show_info_box=show_info_box, info_box_num_samples=info_box_num_samples,
# Parse FITS files data_list = parse_fits_files(fits_file_name_list, progress_bar=not notebook) # PLOT STATISTICS ######################################################### if not notebook: print("Plotting...") fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(16, 9)) common.plot_hist1d(axis=ax1, data_list=[np.array(data_list).flatten()], label_list=[], logy=logy, xlabel="Photoelectrons", xylabel_fontsize=16, title=title, linear_xlabel_style=None, linear_ylabel_style=None, num_bins=None, info_box_rms=False, info_box_std=True) # Save file and plot ######## if not notebook: plt.tight_layout() plt.savefig(output_file_path, bbox_inches='tight') if not quiet: plt.show()
# PLOT STATISTICS ######################################################### print("Plotting...") fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(16, 9)) common.plot_hist1d(axis=ax1, data_list=[ np.array(data_list).flatten(), np.random.poisson(lam=2, size=40 * 40), np.random.poisson(lam=3, size=40 * 40) ], label_list=[ "Noise", r"Poisson dist. ($\lambda$=2)", r"Poisson dist. ($\lambda$=3)" ], logy=logy, xlabel="Photoelectrons", xylabel_fontsize=16, title=title, linear_xlabel_style=None, linear_ylabel_style=None, num_bins=None, info_box_num_samples=False, info_box_rms=False, info_box_std=True) # Save file and plot ######## plt.tight_layout() plt.savefig(output_file_path, bbox_inches='tight')