Y_test_predicted[:,NN_index]*maxabs_factor,\ save,save_folder_name,bins=bins,\ minval=minval,maxval=maxval,cut_truth=True,axis_square=True,\ variable=plot_name,units=plot_units) plot_2D_prediction(Y_test_use[:,true_index]*maxabs_factor, Y_test_predicted[:,NN_index]*maxabs_factor,\ save,save_folder_name,bins=bins,\ minval=None,maxval=None,\ variable=plot_name,units=plot_units) plot_single_resolution(Y_test_use[:,true_index]*maxabs_factor,\ Y_test_predicted[:,NN_index]*maxabs_factor,\ minaxis=-maxval,maxaxis=maxval,bins=bins, save=save,savefolder=save_folder_name,\ variable=plot_name,units=plot_units) plot_bin_slices(Y_test_use[:,true_index]*maxabs_factor, Y_test_predicted[:,NN_index]*maxabs_factor,\ use_fraction = False,\ bins=10,min_val=minval,max_val=maxval,\ save=True,savefolder=save_folder_name,\ variable=plot_name,units=plot_units) if compare_reco: plot_single_resolution(Y_test_use[:,true_index]*maxabs_factor,\ Y_test_predicted[:,NN_index]*maxabs_factor,\ use_old_reco = True, old_reco = reco_test_use[:,true_index],\ minaxis=-maxval,maxaxis=maxval,bins=bins, save=save,savefolder=save_folder_name,\ variable=plot_name,units=plot_units, reco_name=reco_name) plot_single_resolution(Y_test_use[:,true_index]*maxabs_factor,\ Y_test_predicted[:,NN_index]*maxabs_factor,\ use_old_reco = True, old_reco = reco_test_use[:,true_index],\ use_fraction=True,bins=bins,maxaxis=2.,minaxis=-2.,\ save=save,savefolder=save_folder_name,\
old_reco = reco2_value_fullAnalysis, old_reco_truth=true2_value_fullAnalysis,\ minaxis=-frac_res_range, maxaxis=frac_res_range, bins=bins, use_fraction=True,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name=name1, flavor=flavor,sample=sample) if make_bin_slice: #Bin Slices plot_bin_slices(true1_value, reco1_value, old_reco = reco2_value, old_reco_truth=true2_value, weights=weights1_value, old_reco_weights=weights2_value, use_fraction = binned_frac, bins=syst_bin, min_val=minval, max_val=maxval, #ylim=[-0.6,1.3], save=save, savefolder=save_folder_name, variable=plot_name, units=plot_units, cnn_name=name1, reco_name=name2,variable_type=var_type, flavor=flavor,sample=sample,legend="upper right") #add_contour=True plot_bin_slices(true1_value_fullAnalysis, reco1_value_fullAnalysis, energy_truth=true1_energy_fullAnalysis, old_reco = reco2_value_fullAnalysis, old_reco_truth=true2_value_fullAnalysis, reco_energy_truth = true2_energy_fullAnalysis, weights=weights1_value_fullAnalysis, old_reco_weights=weights2_value_fullAnalysis,\ use_fraction = binned_frac, bins=syst_bin, min_val=minvals[0], max_val=maxvals[0],\
flavor=nu_type,sample=sample_name) else: plot_single_resolution(true_val, cnn_val, weights=true_weights,\ use_old_reco = False,\ minaxis=-maxval, maxaxis=maxval, bins=bins,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, flavor=nu_type,sample=sample_name) if plot_vertex: plot_bin_slices(true_val, cnn_val, energy_truth=true_R, weights=true_weights, old_reco = retro_val,old_reco_truth=retro_true_val, reco_energy_truth=retro_true_R, old_reco_weights=retro_weights,use_fraction = True, bins=syst_bin, min_val=0, max_val=300,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units="(m)", reco_name=reco_name, xvariable="True Radius", flavor=nu_type,sample=sample_name) plot_bin_slices(true_val, cnn_val, energy_truth=true_Z, weights=true_weights, old_reco = retro_val,old_reco_truth=retro_true_val, reco_energy_truth=retro_true_Z, old_reco_weights=retro_weights,use_fraction = True, bins=syst_bin, min_val=-550, max_val=-150,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units="(m)", reco_name=reco_name, xvariable="True Z", flavor=nu_type,sample=sample_name) plot_bin_slices(true_val, cnn_val, energy_truth=cnn_R,
save=save, savefolder=save_folder_name,bins=bins,\ variable=plot_name, units=plot_units, reco_name="Retro") plot_2D_prediction(truth, retro_energy[cuts], weights=weights_plot, save=save, savefolder=save_folder_name,bins=bins,\ minval=minval, maxval=maxval, cut_truth=True, axis_square=True,\ variable=plot_name, units=plot_units, reco_name="Retro") plot_single_resolution(truth, cnn, weights=weights_plot,\ use_old_reco = use_old_reco_bool, old_reco = old_reco,\ minaxis=-maxval, maxaxis=maxval, bins=bins,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name="Retro") plot_bin_slices(truth, cnn, weights=weights_plot, old_reco = old_reco,\ use_fraction = True, bins=syst_bin, min_val=minval, max_val=maxval,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name="Retro") plot_rms_slices(truth, cnn, weights=weights_plot, old_reco = old_reco,\ use_fraction = True, bins=syst_bin, min_val=minval, max_val=maxval,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name="Retro") plot_vertex(true_r[cuts],true_z[cuts]) plot_bin_slices(truth, cnn, old_reco = old_reco,\ weights=weights_plot,energy_truth=true_r[cuts],\ xvariable="Starting Vertex R Position",xunits="(m)", use_fraction = True, bins=syst_bin, min_val=0, max_val=maxval*3,\
variable=plot_name, units=plot_units, reco_name="Retro") """ plot_single_resolution(true_energy[cuts], cnn_energy[cuts], weights=true_weights,\ use_old_reco = True, old_reco = retro_energy[cuts],\ minaxis=-maxval, maxaxis=maxval, bins=bins,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name="Retro") plot_single_resolution(true_energy[cuts], cnn_energy[cuts], weights=true_weights,\ use_old_reco = True, old_reco = retro_energy[cuts],\ minaxis=-2, maxaxis=2, bins=bins,\ save=save, savefolder=save_folder_name,use_fraction=True,\ variable=plot_name, units=plot_units, reco_name="Retro") plot_bin_slices(true_energy[cuts], cnn_energy[cuts], weights=true_weights, old_reco = retro_energy[cuts],\ use_fraction = True, bins=syst_bin, min_val=minval, max_val=maxval,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name="Retro") """ plot_bin_slices(true_energy[cuts], cnn_energy[cuts], weights=true_weights, old_reco = retro_energy[cuts],vs_predict = True,\ use_fraction = True, bins=syst_bin, min_val=minval, max_val=maxval,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name="Retro") """ plot_rms_slices(true_energy[cuts], cnn_energy[cuts], weights=true_weights, old_reco = retro_energy[cuts],\ use_fraction = True, bins=syst_bin, min_val=minval, max_val=maxval,\ save=save, savefolder=save_folder_name,\ variable=plot_name, units=plot_units, reco_name="Retro")
variable=plot_name,units=plot_units) plot_2D_prediction(Y_test_use[:,true_index]*maxabs_factor, Y_test_predicted[:,NN_index]*maxabs_factor,\ save,save_folder_name,bins=bins,\ minval=None,maxval=None,\ variable=plot_name,units=plot_units) plot_single_resolution(Y_test_use[:,true_index]*maxabs_factor,\ Y_test_predicted[:,NN_index]*maxabs_factor,\ minaxis=-2*maxval,maxaxis=maxval*2, save=save,savefolder=save_folder_name,\ variable=plot_name,units=plot_units) plot_distributions(Y_test_use[:,true_index]*maxabs_factor, Y_test_predicted[:,NN_index]*maxabs_factor,\ save,save_folder_name,\ variable=plot_name,units=plot_units) plot_bin_slices(Y_test_use[:,true_index]*maxabs_factor, Y_test_predicted[:,NN_index]*maxabs_factor,\ use_fraction = use_frac,\ bins=10,min_val=minval,max_val=maxval,\ save=True,savefolder=save_folder_name,\ variable=plot_name,units=plot_units) if first_var == "energy" and num ==0: plot_2D_prediction_fraction(Y_test_use[:,true_index]*maxabs_factor,\ Y_test_predicted[:,NN_index]*maxabs_factor,\ save,save_folder_name,bins=bins,\ minval=0,maxval=2,\ variable=plot_name,units=plot_units) if num > 0 or first_var == "zenith": plot_bin_slices(Y_test_use[:,true_index], Y_test_predicted[:,NN_index], \ min_energy = min_energy, max_energy=max_energy, true_energy=Y_test_use[:,0]*max_energy, \ use_fraction = False, \ bins=10,min_val=minval,max_val=maxval,\ save=True,savefolder=save_folder_name,\ variable=plot_name,units=plot_units)