예제 #1
0
    print(len(dvpi0p16.index))


    bin_size = [100,100]
    xvals2 = df['Mpi0']

    xvals = dvpi0p16['Mpi0']
    
    
    x_name = "Gamma-Gamma Invariant Mass (GeV)"
    output_dir = "figures/"
    #ranges = "none"
    ranges = [0,0.3,100]

    make_histos.plot_1dhist(xvals,[x_name,],ranges=ranges,second_x=None,annotation=None,
                     saveplot=False,pics_dir=output_dir,plot_title="Reconstructed Pion Mass, NF Sampled",
                     density=False,proton_line=0.135,first_color="blue",xlabel_1="NF Data")
    
    sys.exit()
    x_data = df["Mpi0"]
    y_data = df["pmass"]
    var_names = ["E Px","E Py"]
    saveplots = False
    output_dir = "figures/"
    title = "Pi Mass vs EPx"
    filename = title
    units = ["GeV","Gev"]
    ranges = [[0,.3,100],[.9,.96,100]]

    #interactive(True)
    make_histos.plot_2dhist(x_data,y_data,var_names,ranges,colorbar=False,
예제 #2
0
#x_name = "Gamma-Gamma Invariant Mass (GeV)"
x_name = "Reconstructed Pion Mass (GeV)"
#ranges = "none"
#ranges = [12,28,100]
ranges = [.02, .3, 100]
print("PLOTTTING")
make_histos.plot_1dhist(
    xvals3, [
        x_name,
    ],
    ranges=ranges,
    second_x=xvals2,
    annotation="yes",
    third_x=xvals,
    xlabel_3="QT-3-Feature Model",
    saveplot=False,
    pics_dir=output_dir,
    plot_title=
    "Reconstructed Pion Mass, (4 Feature) and (3 Feature with QT) NF Models vs. Standard Simulations",
    density=True,
    proton_line=0.135,
    first_color="red",
    xlabel_1="Physics Recon. Data",
    xlabel_2="4-Feature Model")

sys.exit()

df_4 = pd.read_pickle("4_feature_pion.pkl")
ic(df_4)

#df = df_4.head(50000)
예제 #3
0
    print(df)
    print(df2)
    #sys.exit()

    bin_size = [100, 100]
    xvals = df["emass2"]
    x_name = "px E"
    output_dir = "./"
    #ranges = "none"
    ranges = [-0.2, 0.2, 100]

    make_histos.plot_1dhist(xvals, [
        x_name,
    ],
                            ranges=ranges,
                            second_x=None,
                            saveplot=False,
                            pics_dir=output_dir,
                            plot_title="Squared Electron Mass, NF Model",
                            density=False)

    x_data = df[1]
    y_data = df[2]
    var_names = ["E Px", "E Py"]
    saveplots = False
    output_dir = "."
    title = "Electron X vs. Y Mom., NF Model"
    filename = title
    units = ["GeV", "Gev"]
    ranges = [[-1.5, 1.5, 100], [-1.5, 1.5, 100]]
예제 #4
0
        filename="gen-recon_{}",
        units=["GeV", "GeV"])
# plt.scatter(df["recon_{}".format(name)],df["recon_{}".format(name)]-df["nf_{}".format(name)])
# plt.scatter(df["recon_{}".format(name)],df["nf_{}".format(name)])
#plt.title("Recon vs. NF, {}".format(name))
#plt.xlabel("Recon")
#plt.ylabel("NF")
#plt.show()

ic(df_ps.mean())

df_ps.to_pickle("4_feature_pion_QT_INV.pkl")

make_histos.plot_1dhist(df_ps['recon_Mpi0'], [
    'nf pion mass',
],
                        ranges=[0.02, 0.4, 150],
                        second_x=df_ps['nf_Mpi0'],
                        first_color='red')

# #         make_histos.plot_1dhist(xvals_1,[x_name,],ranges="none",second_x=xvals_2,
# #                 saveplot=True,pics_dir=output_dir,plot_title="{}, NF 4-Feature Model".format(x_name),density=True,
# #                 annotation=emd_nflow,first_color="red",xlabel_1="Microphysics Data",xlabel_2="NF Model Sample")

# dvpi0p = df_nflow_data
# #dvpi0p = df_test_data

# e=4
# dvpi0p.loc[:,'pmass'] = np.sqrt(dvpi0p[e]**2-dvpi0p[e+1]**2-dvpi0p[e+2]**2-dvpi0p[e+3]**2)/0.938

# dvpi0p.loc[:, "Gpx"] = dvpi0p.loc[:, 9]
# dvpi0p.loc[:, "Gpy"] = dvpi0p.loc[:, 10]
예제 #5
0
    dfs = [df0,df1]

    df = pd.concat(dfs)
    #print(df)
    df.hist()

    zX = df.to_numpy()

    bin_size = [100,100]


    xvals = df[1]
    x_name = "px E"
    output_dir = "./"

    make_histos.plot_1dhist(xvals,[x_name,],ranges="none",second_x="none",
                    saveplot=False,pics_dir=output_dir,plot_title=x_name)
                       
    # pairs = [(0,1),(1,2),(0,4),(8,12),(5,6),(9,10)]

    # for a,b in pairs:
    #     fig, ax = plt.subplots(figsize =(10, 7)) 
    #     plt.hist2d(zX[:,a], zX[:,b],bins =bin_size,norm=mpl.colors.LogNorm())# cmap = plt.cm.nipy_spectral) 
    #     #plt.xlim([-2,2])
    #     #plt.ylim([-2,2])
    #     #plt.colorbar()
    #     plotname = "finalplotname2.jpeg"

    #     plt.show()


if run_2:
예제 #6
0
파일: eval_flow.py 프로젝트: pmoran3/nflows
    print(df2)
    #sys.exit()

    bin_size = [100, 100]
    xvals = df["pmass"]
    x_name = "NF Model Proton Mass"
    output_dir = "./"
    #ranges = "none"
    ranges = [.925, .951, 100]

    make_histos.plot_1dhist(xvals, [
        x_name,
    ],
                            ranges=ranges,
                            second_x=None,
                            saveplot=False,
                            pics_dir=output_dir,
                            plot_title="Reconstructed Proton Mass, NF Model",
                            density=False,
                            proton_line=True,
                            first_color="green",
                            xlabel_1="NF Data")

    sys.exit()

    x_data = df[1]
    y_data = df[2]
    var_names = ["E Px", "E Py"]
    saveplots = True
    output_dir = "./"
    title = "Electron $P_X$ vs. $P_Y$, NF 4-Feat. Model"
    filename = title