From 90dbaf31e8fe3d9b5b144d42319ab85f2be707af Mon Sep 17 00:00:00 2001 From: dikgarg Date: Wed, 10 Apr 2024 15:39:17 -0500 Subject: [PATCH 1/7] added all constants in one file --- nupyprop_config.py | 41 ++++++++ src/nupyprop/datafiles/lookup_tables.h5 | Bin 27282384 -> 27282384 bytes src/nupyprop/datafiles/polarization_data.txt | 100 +++++++++++++++++++ src/nupyprop/models/models.py | 6 +- src/nupyprop/try.py | 4 + 5 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 nupyprop_config.py create mode 100644 src/nupyprop/datafiles/polarization_data.txt create mode 100644 src/nupyprop/try.py diff --git a/nupyprop_config.py b/nupyprop_config.py new file mode 100644 index 0000000..e931cf0 --- /dev/null +++ b/nupyprop_config.py @@ -0,0 +1,41 @@ +############################################################ +#This file contains all the required constants for nupyprop +############################################################ +import numpy as np +import scipy.constants as scc + +#useful constants +N_A = 6.0221409e+23 # Avogadro's number in units of 1/mole + +R_earth = 6378.137 #radius of Earth in km + +rho_water, rho_rock, rho_iron = 1.02, 2.65, 7.87 #density of water, rock and iron in g/cm^3 + +m_mu = scc.physical_constants["muon mass energy equivalent in MeV"][0]*1e-3 # muon mass in GeV +m_tau = scc.physical_constants["tau mass energy equivalent in MeV"][0]*1e-3 # tau mass in GeV +m_pi = 139.57018e-3 # pion mass in GeV +m_p = scc.physical_constants["proton mass energy equivalent in MeV"][0]*1e-3 # proton mass in GeV + +alpha_fs = scc.fine_structure #fine structure constant + +#Earth emergence angles +beta_arr = np.asarray([float('{:.1f}'.format(i)) for i in np.arange(0.1,90.1,step=0.1)]) # finer steps of 0.1 degerees + +#Cross-section models that exsist in src/nupyprop/datafiles/lookup_table.h5 +nu_models = ['allm', 'bdhm', 'ct18nlo', 'nct15'] #for weak interaction +pn_models = ['allm', 'bb'] #for Photo-nuclear electromagnetic interaction + +#step size for continuous energy loss +step_size = 4500 #in cm + +#array of energies used in interpolation for cross-section and CDFs +E_nu = np.logspace(3,12,91,base=10).astype(np.float64) #for neutrinos in GeV +E_lep = np.logspace(0,12,121,base=10).astype(np.float64) #for charged leptons in GeV + +#inelasticity values used in interpolation for energy CDFs for neutrinos and charged leptons +yvals = np.logspace(-3,0,31).astype(np.float64) #goes from 1e-3 to 1 + +#Earth layers considered in PREM - Earth density model +Rlay = np.array([1221.5, 3480.0, 5701.0, 5771.0, 5971.0, 6151.0, 6346.6, 6356.0, 6368.0, 6371.0]) + + diff --git a/src/nupyprop/datafiles/lookup_tables.h5 b/src/nupyprop/datafiles/lookup_tables.h5 index 1b91aff48d2be88b5d8d25cc51a558e4b3545fc7..024009a445a6eece8b6af260166026169ba343dd 100644 GIT binary patch delta 1424 zcmWm6SJ(&y07l{GM^-jRiOOCjdndDG6Cz|qA*+l~%8z43MA@so_fFb-YVW=G-t+6? zy*y{%royuOVqKMjf8T-O9N>rjij+0CWlKCIYOFBGifd@q@}cy*3w4W zN;_#U9i*ciDV^jf=`3BOt8|m@(nF4xW2C1XE4`$*^pU>OPx{LM87PC~I2kNMWT+f3 z!(_OeAR}a?jFJ;&w2YClGET}mnX3HFz zD`&_&nJ)|EOgT#y%Gq*`ERsT5EK6jmD9dEItdNzmO3szlvPRC6wX#mmm-VtiE|3dl zqimARvPHJaHrXyaWT)(s-Exs!ESJcoa+zE%SICuem0T^?$hC5vTrW4sjdGLREVsz5 za+};PcgUS`m)tFTAy3Lv^0Yi7&&qSMPo9?- zPLfU7>%NF92SR1 zlQ<%pMzd%hEuv+#iq_F4+D5x*A047&92uSBsOTJBqHA=E?$INTj$@){92>o&cl3$A z(J%VPfEXBq;XvV|0v(u`w>j$4N0ECdSEeN=%B$F(poo zsWC04$BdX6r^V?pD`v->m>XxryqF&g;>1|R@zB>IaWGIN9iP;rHgcxZgQM-mmbnnddcz9Tlz>}=_e;he;FVHWssaG zgJp;em0>bmM#xARC8K4GjFoXRUM9#yIY~~IQ{+^cB&W&ga)wNnDRQQqB~xXZOqUrl zQ)bE8GF#@zT$v~5$hmT!%$GtrUlzzhQ5MN!St3hinJkwTvQk#bYFQ%}$XZz^>t%y% zlufc(w#Zi5Cfj9)?34>-ms}(l%O!HDTqc*x6>_CqC0ENea;;n^*UJrZqueAn%Pn%N z+$Oin9df7KC3nkixkvWMy>g%2FAvCr@{l|%kI19)m^>~|$dmGvJT1@2v+|tmmFMLJ zc~M@Hm*o|CRbG?VzzLKxy8~Ikg zlkepR`B8q7pXC?%ReqD-dXBjc!O9!E!uXc?`db+n0NqHVN`_Hk@p=II!Bl28r|Z!=pH?yXY`8W zqj&U)zR@pEi2gAk2F9Q`F$Tww7#hQ3c#MdVF)BvKm>3)5Vth=9iE&b#9H+#oF)2=q z)8mYo98==VI4h>cw3r? Date: Wed, 17 Apr 2024 14:42:27 -0500 Subject: [PATCH 2/7] constants file --- setup.cfg | 1 + .../nupyprop/constants.py | 0 src/nupyprop/datafiles/lookup_tables.h5 | Bin 27282384 -> 27282384 bytes src/nupyprop/models/models.py | 4 ++-- src/nupyprop/try.py | 5 +++-- 5 files changed, 6 insertions(+), 4 deletions(-) rename nupyprop_config.py => src/nupyprop/constants.py (100%) diff --git a/setup.cfg b/setup.cfg index c2c43c0..5637868 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,6 +45,7 @@ where = src [options.package_data] nupyprop.datafiles = lookup_tables.h5 + polarization_data.txt nupyprop.models = *.ecsv [options.entry_points] diff --git a/nupyprop_config.py b/src/nupyprop/constants.py similarity index 100% rename from nupyprop_config.py rename to src/nupyprop/constants.py diff --git a/src/nupyprop/datafiles/lookup_tables.h5 b/src/nupyprop/datafiles/lookup_tables.h5 index 024009a445a6eece8b6af260166026169ba343dd..1b91aff48d2be88b5d8d25cc51a558e4b3545fc7 100644 GIT binary patch delta 1424 zcmWm6SD*+407l_1QizCykX1|R@zB>IaWGIN9iP;rHgcxZgQM-mmbnnddcz9Tlz>}=_e;he;FVHWssaG zgJp;em0>bmM#xARC8K4GjFoXRUM9#yIY~~IQ{+^cB&W&ga)wNnDRQQqB~xXZOqUrl zQ)bE8GF#@zT$v~5$hmT!%$GtrUlzzhQ5MN!St3hinJkwTvQk#bYFQ%}$XZz^>t%y% zlufc(w#Zi5Cfj9)?34>-ms}(l%O!HDTqc*x6>_CqC0ENea;;n^*UJrZqueAn%Pn%N z+$Oin9df7KC3nkixkvWMy>g%2FAvCr@{l|%kI19)m^>~|$dmGvJT1@2v+|tmmFMLJ zc~M@Hm*o|CRbG?VzzLKxy8~Ikg zlkepR`B8q7pXC?%ReqD-dXBjc!O9!E!uXc?`db+n0NqHVN`_Hk@p=II!Bl28r|Z!=pH?yXY`8W zqj&U)zR@pEi2gAk2F9Q`F$Tww7#hQ3c#MdVF)BvKm>3)5Vth=9iE&b#9H+#oF)2=q z)8mYo98==VI4h>cw3r?8T-O9N>rjij+0CWlKCIYOFBGifd@q@}cy*3w4W zN;_#U9i*ciDV^jf=`3BOt8|m@(nF4xW2C1XE4`$*^pU>OPx{LM87PC~I2kNMWT+f3 z!(_OeAR}a?jFJ;&w2YClGET}mnX3HFz zD`&_&nJ)|EOgT#y%Gq*`ERsT5EK6jmD9dEItdNzmO3szlvPRC6wX#mmm-VtiE|3dl zqimARvPHJaHrXyaWT)(s-Exs!ESJcoa+zE%SICuem0T^?$hC5vTrW4sjdGLREVsz5 za+};PcgUS`m)tFTAy3Lv^0Yi7&&qSMPo9?- zPLfU7>%NF92SR1 zlQ<%pMzd%hEuv+#iq_F4+D5x*A047&92uSBsOTJBqHA=E?$INTj$@){92>o&cl3$A z(J%VPfEXBq;XvV|0v(u`w>j$4N0ECdSEeN=%B$F(poo zsWC04$BdX6r^V?pD`v->m>XxryqF&g;> Date: Wed, 17 Apr 2024 15:29:55 -0500 Subject: [PATCH 3/7] added constants in all files --- plot.py | 466 ++++++++++++++++++++++++++++++++++ src/nupyprop/data.py | 9 +- src/nupyprop/geometry.py | 10 +- src/nupyprop/main.py | 4 +- src/nupyprop/models/models.py | 26 +- src/nupyprop/try.py | 2 +- 6 files changed, 490 insertions(+), 27 deletions(-) create mode 100644 plot.py diff --git a/plot.py b/plot.py new file mode 100644 index 0000000..894de53 --- /dev/null +++ b/plot.py @@ -0,0 +1,466 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Wed Jun 1 10:27:38 2022 + +@author: dikgarg +""" +import numpy as np + +#Load nuPyProp data & models modules +from nupyprop import data +from nupyprop import models + +#Load astropy modules +from astropy.table import Table +from astropy.io import ascii + +# Plotting modules +import matplotlib as mpl +from matplotlib.ticker import ScalarFormatter +import matplotlib.pyplot as plt +from matplotlib import pyplot +from itertools import cycle +import seaborn as sns +import itertools +import matplotlib.gridspec as gridspec +import random +from scipy import interpolate + +nu_type = 'neutrino' # nu for neutrino & anu for anti-neutrino +ch_lepton = 'tau' # type of charged lepton +ch_leptons = 'taus' # type of charged lepton +cross_section_model = 'ct18nlo' # neutrino cross-section model +pn_model = 'allm' # photonuclear energy loss model +pn_models = 'bdhm' +idepth = 4 # depth of water layer in km +idepths = 0 +stats = 1e8 # no. of ingoing neutrinos ie., statistics, Diksha code +stats1 = 1e5 +stats2 = 1e6 +stats3 = 1e7 +stats4 = 1e9 +prop_type = 'stochastic' # type of energy loss; can be stochastic or continuous + +#mpl.style.use('/Users/dikgarg/Desktop/Research/Neutrinos/paper.mplstyle') + +files_path = "/Users/dikgarg/Desktop/Research/Neutrinos/Tau_polarization/nupyprop/" +#energy = [8,10] + +#data.process_htc_out(files_path, nu_type, ch_lepton, energy, idepth, cross_section_model, pn_model, prop_type, stats, elep_mode=True, arg=None) + +#===============================================# +#========== to make plots from h5 ==============# +#===============================================# +plt.rcParams['xtick.major.pad']='5' +plt.rcParams['xtick.labelsize']='24' +plt.rcParams['ytick.labelsize']='24' + +energies = [10,11,12] #np.arange(7,12,1) +angles01 = np.arange(1,8,1) +angles02 = [10,15] #np.arange(1,43).astype('float64') # default angles in nuPyProp +angles1 = np.concatenate((angles01, angles02)) +angles = np.arange(1,43).astype('float64') # default angles in nuPyProp + +fig= plt.figure(figsize=[8,6], constrained_layout=True) +spec=gridspec.GridSpec(ncols=1,nrows=2,figure=fig) # set up subplot grid + +plt1 = fig.add_subplot(spec[0:2,0]) + +lss = ['-','--'] +colors = sns.color_palette('colorblind')[:len(energies)] + +for e, c in zip(energies, colors): + pexit_no_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepth, cross_section_model, pn_model, prop_type, stats)[2] # without regen + pexit_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepths, cross_section_model, pn_model, prop_type, stats3)[2] # with regen + + print("for 0km = ", pexit_regen) + plt1.loglog(angles, pexit_no_regen[9:], linestyle=lss[0], marker='o', color = c) + plt1.loglog(angles1, pexit_regen[9:18], linestyle=lss[1], marker='o', color = c) + +#plt.text(8.8, 0.07, r'$\log_{10}(E_{\nu}$/GeV)',fontsize=18) +m = plt1.plot( [], [], label= r'$\log_{10}(E_{\nu}$/GeV)', ls=lss[0]) +j = [plt1.plot( [],[], color=colors[i], label= str(energies[i]), ls=lss[0])[0] for i in range(len(energies))] +first_legend = plt1.legend(handles=j, frameon=False, loc='lower right', fontsize=19) #ncol=3 (0.38,0.65) (25.08, 0.015)) +ax = plt.gca().add_artist(first_legend) + +titles = ['4km', '0km'] #['Without regeneration', 'With regeneration'] +#titles = ['ALLM', 'BDHM'] +linestyles = ['-', '--'] + +h = [plt1.plot( [],[], color='black', label=titles[i], ls=linestyles[i])[0] for i in range(len(titles)) ] +plt1.legend(handles=(h), frameon=False, loc='lower left', fontsize=18) + +plt1.set_xlim(1,15) +# plt1.set_ylim(1e-6, 2*1e-1) +# plt1.set_ylabel(r'$P^{(\tau)}_{exit}$', fontsize=24) +plt1.grid(which='major', axis='both', linestyle=':', linewidth=0.5) +plt1.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) +# plt1.set_xticklabels([]) + +# plt2 = fig.add_subplot(spec[2:3,0]) + +# for e, c in zip(energies, colors): +# pexit_no_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepth, cross_section_model, pn_model, prop_type, stats)[1] # without regen +# pexit_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepth, cross_section_model, pn_model, prop_type, stats)[2] # with regen + +# plt2.semilogx(angles, pexit_no_regen[9:]/pexit_regen[9:], linestyle=lss[1], color = c) + +# plt2.set_xlim(1,42) +# ticks = (1,2,3,4,5,10,15,20,30,40) +# plt2.set_xticks(ticks) +# plt2.set_xticklabels(ticks) +# plt2.set_ylabel('Ratio', fontsize=24) +# #plt2.set_ylabel('Ratio (ALLM/BDHM)', fontsize=19) +# plt2.set_xlabel(r"$\beta_{tr}$ [degrees]", fontsize=24) +# plt2.grid(which='major', axis='both', linestyle=':', linewidth=0.5) +# plt2.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) + +plt.savefig('pexit_regen_noregen.png', bbox_inches='tight', dpi=400) +#plt.show() + +#===============================================# +#============ to modify h5files ================# +#===============================================# +#data.add_cdf(nu_type, ch_lepton, idepth, cross_section_model, pn_model, prop_type, stats, bins=np.logspace(-7,0,71)) +# energies = [6.0, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75, 12.0] +# for energy in energies: +# data.get_pexit(nu_type, ch_lepton, energy, idepth, cross_section_model, pn_model, prop_type, stats, out=False, out_h5=True, arg=None) +# data.get_cdf(nu_type, ch_lepton, energy, idepth, cross_section_model, pn_model, prop_type, stats, out=False, out_h5=True) + # data.get_pexit(nu_type, ch_lepton, ch_leptons, energy, idepth, cross_section_model, pn_model, prop_type, stats, stats1, stats2, stats3, stats4, out=False, out_h5=True, arg=None) + + # data.get_clep_out(nu_type, ch_lepton, ch_leptons, energy, idepth, cross_section_model, pn_model, prop_type, stats, stats1, stats2, stats3, stats4, out=False, out_h5=False, arg=None) + +#===============================================# +#=========== to check polarization =============# +#===============================================# +# energies=[1e10] +# angle = data.get_polarization(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[0] +# #pol = data.get_polarization(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[1] +# pol1 = data.get_polarization(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[1] + +# #plt.plot(angle, -1*pol, label='old pol') +# plt.plot(angle, -1*pol1, label = 'new pol') +# plt.legend() +# plt.show() + +#===============================================# +#=========== to check cdf ======================# +#===============================================# +#energies = [1e8] #, 11.0, 12.0] + +# z = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[0] # get z bins +# angles_in_data = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[1] # get the list of earth emergence angles in the output file +# angle_indices = [int(np.where(angles_in_data == i)[0]) for i in angles_in_data] # gets the indices of the angles we need based on that in the output file +# e_out_cdf = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[2] # binned CDF values for all angles + +# z1 = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[0] # get z bins +# angles_in_data1 = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[1] +# angle_indices1 = [int(np.where(angles_in_data1 == i)[0]) for i in angles_in_data1] +# e_out_cdf1 = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[2] # binned CDF values for all angles + +# an = [0, 9, 19, 34] #1, 10, 20, 30, 40 degrees +# c = sns.color_palette('colorblind')[:len(an)] #['blue', 'black', 'green', 'orange', 'red'] +# #ls = ['-', '--'] +# ls = ['-', '--', ':', '-.'] + +# for i in range(len(an)): +# print("eout = ", 1e8*e_out_cdf[an[i]+9]) +# plt.semilogx(z, e_out_cdf[an[i]+9], color=c[i], linestyle=ls[i]) #, label=str(an[i]+1)) +# #plt.semilogx(z1, e_out_cdf1[an[i]], color=c[i], linestyle=ls[1]) + +# j = [plt.plot( [],[], color=c[i], label=str(an[i]+1)+r"$^\circ$", ls=ls[0])[0] for i in range(len(an))] +# first_legend = plt.legend(handles=j, title=r"$\beta=$", frameon=False, loc='best') +# ax = plt.gca().add_artist(first_legend) + +# labels = ['New CDF', 'Old CDF'] +# linestyles = ['-', '--'] + +# h = [plt.plot( [],[], color='black', label=labels[i], ls=linestyles[i])[0] for i in range(len(labels)) ] +# first_legend1 = plt.legend(handles=(h), frameon=False, loc='lower right') #,fontsize=20) +# ax = plt.gca().add_artist(first_legend1) + +# plt.title(r"$log(E_\nu/GeV)=$"+str(energies[0])) +# plt.ylabel("CDF", fontsize=18) +# plt.xlabel(r"$z=E_{\tau}/E_{\nu}$", fontsize=18) +#plt.xlim(1e-7,1e0) + +# # plt.savefig('CDF_compare_Enu'+str(energies[0])+'.jpeg', bbox_inches='tight', dpi=400) +#plt.show() + + +# plt.legend() +# plt.show() + +#===============================================# +#=========== to plot energy ====================# +#===============================================# +# energies = [1e10] # [1e6,1e7,1e8,1e9,1e10,1e11,1e12] +# angles = np.array([1,10,20,35]).astype('float64') +# # e_out_type = 'cdf' # for plot type CDF +# e_out_type = 'no_cdf' # for plot type histogram + +# E_nu = data.E_nu # neutrino energy bins +# color_map = cycle(sns.color_palette("colorblind")[0:len(angles)]) +# lss = [':', '-.', '--', '-'] + +# for energy in energies: +# fig, axs = plt.subplots(1, figsize=(10/1.1,8/1.1)) +# energy_log = float(np.log10(energy)) + +# for angle in range(len(angles)): +# e_out = data.get_clep_out(nu_type, ch_lepton, energy, angles[angle], idepth, cross_section_model, pn_model, prop_type, stats) + +# bins = E_nu # binned according to E_nu +# count, bins_count = np.histogram(e_out, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# cdf = np.cumsum(dist)/np.cumsum(dist)[-1] # normalized +# dist = np.insert(dist,0,0) +# cdf = np.insert(cdf,0,0) + +# if e_out_type == 'no_cdf': +# axs.step(E_nu, dist, where='pre', ls = lss[angle], color = next(color_map), label = r'$%.f^\circ$' % angles[angle], linewidth=2) +# axs.set_xscale('log') +# if ch_lepton=='muon':axs.set_ylabel(r"Scaled $N_{\mu}$", fontsize = 30) +# if ch_lepton=='tau':axs.set_ylabel(r"Scaled $N_{\tau}$", fontsize = 30) + +# else: +# axs.semilogx(E_nu, cdf, ls = '-', color = next(color_map), label = r'$%.f^\circ$' % angles[angle]) # normalized CDF +# axs.set_ylabel("CDF", fontsize = 30) + +# if ch_lepton=='tau': +# axs.set_xlabel(r"$E_{\tau}$ [GeV]", fontsize = 30) +# axs.set_xlim(1e5,energy*10) +# if ch_lepton=='muon': +# axs.set_xlabel(r"$E_{\mu}$ [GeV]", fontsize = 30) +# axs.set_xlim(100,energy*10) + +# if energy_log%2 == 0 or (energy_log+1)%2 == 0:axs.set_title(r"log$_{10}(E_{\nu}$/GeV) = %.2f" % energy_log) +# else:axs.set_title(r"log$_{10}(E_{\nu}/GeV) = %.2f$" % energy_log) + +# axs.legend(loc='upper left', ncol=int(np.ceil(len(angles)/8)), title = r'$\beta_{tr}$', frameon=False, framealpha=0.5, fontsize=27) +# #axs.grid(which='major', axis='both', linestyle='--') +# #axs.grid(which='minor', linestyle=':', linewidth='0.2', color='black') +# axs.xaxis.set_ticks_position('both') +# axs.yaxis.set_ticks_position('both') +# axs.tick_params(axis='x', which='both', labelbottom = True, labeltop = False) +# axs.tick_params(axis='y', which='both', left = True, labelleft = True, labelright= False) +# axs.set_ylim(0,1.2) +# plt.savefig('energy-dist-10.pdf', bbox_inches='tight', dpi=400) +# plt.tight_layout() +# plt.show() + +#===============================================# +#=========== to plot energy in 2x2 =============# +#===============================================# +# energies = [1e10] # [1e6,1e7,1e8,1e9,1e10,1e11,1e12] +# angles = np.array([1,10,20,35]).astype('float64') +# # e_out_type = 'cdf' # for plot type CDF +# e_out_type = 'no_cdf' # for plot type histogram + +# E_nu = data.E_nu # neutrino energy bins +# color_map = sns.color_palette("colorblind")[:2] +# lss = ['-', '--'] + +# fig, axs = plt.subplots(2, 2, sharex=True, sharey=True) +# plt.tight_layout(pad=0.6, w_pad=0.01, h_pad=0.01) +# #plt.subplots_adjust(wspace=0.1, hspace=0.1) +# #fig.suptitle(r"log$_{10}(E_{\nu}/GeV) = %.2f$" % np.log10(energies[0]), fontsize=15) + +# #===== +# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[0], idepth, cross_section_model, pn_model, prop_type, stats) +# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[0], idepth, cross_section_model, pn_models, prop_type, stats) + +# bins = E_nu # binned according to E_nu +# count, bins_count = np.histogram(eout_allm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[0,0].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) + +# count, bins_count = np.histogram(eout_bdhm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[0,0].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) + +# axs[0,0].set_ylabel(r"Scaled $N_{\tau}$", fontsize = 22) +# axs[0,0].set_xscale('log') +# axs[0,0].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[0])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) +# axs[0,0].text(137879, 0.099, r"log$_{10}(E_{\nu}$/GeV)$=%.2f$" % np.log10(energies[0]), fontsize=20) + +# #===== +# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[1], idepth, cross_section_model, pn_model, prop_type, stats) +# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[1], idepth, cross_section_model, pn_models, prop_type, stats) + +# bins = E_nu # binned according to E_nu +# count, bins_count = np.histogram(eout_allm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[0,1].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) + +# count, bins_count = np.histogram(eout_bdhm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[0,1].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) + +# axs[0,1].set_xscale('log') +# axs[0,1].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[1])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) + +# #===== +# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[2], idepth, cross_section_model, pn_model, prop_type, stats) +# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[2], idepth, cross_section_model, pn_models, prop_type, stats) + +# bins = E_nu # binned according to E_nu +# count, bins_count = np.histogram(eout_allm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[1,0].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) + +# count, bins_count = np.histogram(eout_bdhm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[1,0].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) + +# axs[1,0].set_xlabel(r"$E_{\tau}$ [GeV]", fontsize = 22) +# axs[1,0].set_ylabel(r"Scaled $N_{\tau}$", fontsize = 22) +# axs[1,0].set_xscale('log') +# axs[1,0].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[2])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) + +# #===== +# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[3], idepth, cross_section_model, pn_model, prop_type, stats) +# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[3], idepth, cross_section_model, pn_models, prop_type, stats) + +# bins = E_nu # binned according to E_nu +# count, bins_count = np.histogram(eout_allm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[1,1].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) + +# count, bins_count = np.histogram(eout_bdhm, bins) +# pdf = count / sum(count) +# dist = count / max(count) # normalized +# dist = np.insert(dist,0,0) +# axs[1,1].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) + +# axs[1,1].set_xscale('log') +# axs[1,1].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[3])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) + +# axs[1,1].set_xlabel(r"$E_{\tau}$ [GeV]", fontsize = 22) +# axs[1,1].set_ylim(0,1.05) +# axs[1,1].set_xlim(1e5,energies[0]*10) +# plt.show() + +#===============================================# +#=========== to check pexit ====================# +#===============================================# +# energies=[1e7, 1e8, 1e9, 1e10, 1e11] +# #angles = np.arange(1.5,3,0.1) +# colors = sns.color_palette("colorblind")[:len(energies)] +# lss = ['-', '--'] + +# fig = plt.figure(figsize=[8,6], constrained_layout=True) +# spec=gridspec.GridSpec(ncols=1,nrows=3,figure=fig) # set up subplot grid +# plt.tight_layout() + +# plt.rcParams['legend.title_fontsize'] = 'small' +# plt.rcParams['xtick.labelsize']='22' +# plt.rcParams['ytick.labelsize']='22' + +# plt1 = fig.add_subplot(spec[0:2,0]) + +# for e,c in zip(energies, colors): +# p_no_regen = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats)[1] +# p_regen = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats)[2] + +# angles = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[0] +# p_no_regen1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[1] +# p_regen1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[2] + +# #plt.semilogy(angles,p_no_regen,color=c,label='Old no_regen') +# plt1.loglog(angles, p_regen[9:], color=c, ls='-', marker='.', label=np.log10(e)) #'Water depth = 4 km') + +# #plt.semilogy(angles,p_no_regen1,color='green',ls='--',label='New No_regen') +# plt1.loglog(angles, p_regen1, color=c, ls='--', marker='.', label=np.log10(e)) #'Water depth = 3 km') + +# m = plt1.plot( [], [], label= r'$\log_{10}(E_{\nu}$/GeV)', ls=lss[0]) +# j = [plt1.plot( [],[], color=colors[i], label= str(int(np.log10(energies[i]))), ls=lss[0])[0] for i in range(len(energies))] +# first_legend = plt1.legend(handles=j, frameon=False, loc='upper right', ncol=3, fontsize=19) #(25.08, 0.015)) +# ax = plt.gca().add_artist(first_legend) + +# titles = [r'$\texttt{allm}$', r'$\texttt{bdhm}$'] #['PREM-4', 'PREM-3'] +# linestyles = ['-', '--'] + +# h = [plt1.plot( [],[], color='black', label=titles[i], ls=linestyles[i])[0] for i in range(len(titles)) ] +# plt1.legend(handles=(h), frameon=False, ncol=2, loc='lower left', fontsize=22) + +# plt1.set_xlim(angles[0], angles[-1]) +# plt1.set_ylabel(r'$P^{(\tau)}_{exit}$', fontsize=24) +# plt1.set_xticklabels([]) +# plt1.grid(which='major', axis='both', linestyle=':', linewidth=0.5) +# plt1.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) + +# plt2 = fig.add_subplot(spec[2:3,0]) + +# for e,c in zip(energies, colors): +# #angles1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats3)[0] +# p_regen = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats)[2] +# p_regen1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[2] + +# plt2.semilogx(angles, p_regen[9:]/p_regen1, color=c, ls=lss[1]) + +# # j = [plt2.plot( [],[], color=colors[i], label= str(np.log10(energies[i])), ls=lss[1])[0] for i in range(len(energies))] +# # first_legend = plt2.legend(handles=j, title= r'$\log_{10}(E_\nu/{\rm GeV})$', ncol=2, frameon=False, loc='upper right', fontsize=18) #(25.08, 0.015)) +# # ax = plt.gca().add_artist(first_legend) + +# xticks = [1, 2, 3, 4, 5, 10, 15, 20, 30, 40] #5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0] +# plt2.set_ylabel(r'Ratio ($\texttt{allm}/\texttt{bdhm}$)', fontsize=24) +# plt2.set_xlabel(r'$\beta_{tr}$ [degrees]', fontsize=24) +# plt2.set_xlim(angles[0], angles[-1]) +# plt2.set_xticks(xticks) +# plt2.set_xticklabels(xticks) +# #plt2.set_yticklabels(fontsize=18) +# plt2.grid(which='major', axis='both', linestyle=':', linewidth=0.5) +# plt2.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) +# plt.savefig('pexit_allm_bdhm.pdf', bbox_inches='tight', dpi=400) +# plt.show() + +#===============================================# +# To look at the interactions of tau, y*Ei>1PeV # +#===============================================# +# data = np.genfromtxt("lepint_9.00_ 1.0.dat") +# data = np.asarray(sorted(data, key = lambda x: x[0])) +# print(data) + +# stats = [1,3,4] #np.arange(1,11,1) +# print(stats) + +# colors = ['red', 'green', 'blue', 'orange', 'black', 'grey', 'cyan', 'pink', 'brown', 'purple'] +# ls = ['dashed', '-', '-.'] +# mk = ['o', 'x', '.'] +# for j in range(len(stats)): +# dist,energy = [], [] +# for i in range(len(data)): +# if data[i][0] == stats[j]: +# dist.append(data[i][1]) +# energy.append(data[i][2]) + +# plt.plot(dist, energy, colors[j], marker=mk[j], linestyle=ls[j], linewidth=0.5) +# dist = np.insert(dist, 0, 0) +# delx=[abs(dist[k]-dist[k+1]) for k in range(len(dist)-1)] + +# print(delx) + +# #plt.plot(delx, energy, marker='o', linestyle='None') #, colors[j], marker=mk[j], linestyle=ls[j], linewidth=0.5) + + +# plt.xlabel("Dist travelled before interacting (km)") +# plt.ylabel("Shower energy, y*Ei (GeV)") +# plt.title(r"$E_{i,\tau}=10^9$ GeV") +# plt.show() diff --git a/src/nupyprop/data.py b/src/nupyprop/data.py index f31d78b..cbb0bcf 100755 --- a/src/nupyprop/data.py +++ b/src/nupyprop/data.py @@ -5,6 +5,7 @@ @author: sam """ +import nupyprop.constants as const import numpy as np from decimal import Decimal @@ -18,11 +19,11 @@ from collections.abc import Iterable from scipy.interpolate import interpn -E_nu = np.logspace(3,12,91,base=10).astype(np.float64) -E_lep = np.logspace(0,12,121,base=10).astype(np.float64) +E_nu = const.E_nu +E_lep = const.E_lep -nu_models = ['allm', 'bdhm', 'ct18nlo', 'nct15'] #these are the models that exsist in lookup_table.h5 -pn_models = ['allm', 'bb'] +nu_models = cosnt.nu_models #these are the models that exsist in lookup_table.h5 +pn_models = const.pn_models ref = importlib_resources.files('nupyprop.datafiles') / 'lookup_tables.h5' # path for lookup_tables diff --git a/src/nupyprop/geometry.py b/src/nupyprop/geometry.py index 3696c2f..22a4f46 100644 --- a/src/nupyprop/geometry.py +++ b/src/nupyprop/geometry.py @@ -8,6 +8,7 @@ import nupyprop.data as Data from nupyprop.propagate import geometry as Geometry +import nupyprop.constants as const from collections import OrderedDict import numpy as np @@ -19,13 +20,12 @@ import warnings warnings.filterwarnings('ignore') -Re = 6371.0 # radius of the earth in km -Rlay = np.array([1221.5, 3480.0, 5701.0, 5771.0, 5971.0, 6151.0, 6346.6, 6356.0, 6368.0, 6371.0]) # PREM layers based on R_earth. If you're using another Earth model, be sure to change it here as well as propagate.f90, in PREMdensity subroutine. +Re = const.R_earth #Radius of the earth in km +Rlay = const.Rlay #PREM layers based on R_earth. If you're using another Earth model, be sure to change it in the constants.py file -rho_water = 1.02 # density of water in g/cm^3 -# beta_arr = np.asarray([float('{:.1f}'.format(i)) for i in np.concatenate((np.linspace(0.1,5,50), np.linspace(6,90,85)))]) +rho_water = const.rho_water #density of water in g/cm^3 -beta_arr = np.asarray([float('{:.1f}'.format(i)) for i in np.arange(0.1,90.1,step=0.1)]) # finer steps of 0.1 deg +beta_arr = const.beta_arr #Earth emergence angles in steps of 0.1 degrees def sagitta_deg(beta_deg): ''' diff --git a/src/nupyprop/main.py b/src/nupyprop/main.py index 9d0a246..06fb69e 100644 --- a/src/nupyprop/main.py +++ b/src/nupyprop/main.py @@ -10,6 +10,8 @@ import nupyprop.geometry as Geometry from nupyprop.propagate import run as Run +import nupyprop.constants as const + import numpy as np from astropy.table import Table from collections import OrderedDict @@ -18,7 +20,7 @@ import os import glob -rho_water = 1.02 # g/cm^3 +rho_water = const.rho_water # g/cm^3 def file_cleaner(output_type): ''' diff --git a/src/nupyprop/models/models.py b/src/nupyprop/models/models.py index de54709..df179dd 100644 --- a/src/nupyprop/models/models.py +++ b/src/nupyprop/models/models.py @@ -13,34 +13,28 @@ @author: sam """ -import nupyprop.data as Data -# import data as Data +import nupyprop.constants as const import numpy as np import scipy.integrate as integrate import scipy.constants as scc import multiprocessing as mp from multiprocessing import Pool -# import matplotlib.pyplot as plt -# mpl.use('Agg') # for clusters from astropy.table import Table from astropy.io import ascii from collections import OrderedDict import time -E_nu = Data.E_nu -E_lep = Data.E_lep +E_nu = const.E_nu +E_lep = const.E_lep -#m_e = scc.physical_constants["electron mass energy equivalent in MeV"][0]*1e-3 # GeV -m_mu = scc.physical_constants["muon mass energy equivalent in MeV"][0]*1e-3 # GeV -m_tau = scc.physical_constants["tau mass energy equivalent in MeV"][0]*1e-3 # GeV -m_pi = 139.57018e-3 # pion mass in GeV -alpha_fs = scc.fine_structure -#le = 3.8616e-11 # electron Compton wavelength in cm +m_mu = const.m_mu #muon mass in GeV +m_tau = const.m_tau #tau mass in GeV +m_pi = const.m_pi #pion mass in GeV +alpha_fs = const.alpha_fs #fine structure constant -m_p = scc.physical_constants["proton mass energy equivalent in MeV"][0]*1e-3 # GeV -#G_F = scc.physical_constants["Fermi coupling constant"][0] # GeV^-2 -N_A = scc.Avogadro +m_p = const.m_p #proton mass in GeV +N_A = const.N_A #Avogadro's number def rep(val): # Remove non-physical values ''' @@ -517,4 +511,4 @@ def calc_xc(lepton, material, model): # p.close() # end_time = time.time() - # print(f"It took a total of {end_time-start_time:.2f} seconds to compute") \ No newline at end of file + # print(f"It took a total of {end_time-start_time:.2f} seconds to compute") diff --git a/src/nupyprop/try.py b/src/nupyprop/try.py index e033fa0..5f6d37b 100644 --- a/src/nupyprop/try.py +++ b/src/nupyprop/try.py @@ -1,5 +1,5 @@ import numpy as np import constants as const -print(N_A) +print(const.N_A) From bf8f8a12b6caa3c7d64fe925eb9e6077a09ad2c4 Mon Sep 17 00:00:00 2001 From: Diksha Garg Date: Wed, 17 Apr 2024 15:30:17 -0500 Subject: [PATCH 4/7] added constants in all files --- plot.py | 466 -------------------------------------------------------- 1 file changed, 466 deletions(-) delete mode 100644 plot.py diff --git a/plot.py b/plot.py deleted file mode 100644 index 894de53..0000000 --- a/plot.py +++ /dev/null @@ -1,466 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -Created on Wed Jun 1 10:27:38 2022 - -@author: dikgarg -""" -import numpy as np - -#Load nuPyProp data & models modules -from nupyprop import data -from nupyprop import models - -#Load astropy modules -from astropy.table import Table -from astropy.io import ascii - -# Plotting modules -import matplotlib as mpl -from matplotlib.ticker import ScalarFormatter -import matplotlib.pyplot as plt -from matplotlib import pyplot -from itertools import cycle -import seaborn as sns -import itertools -import matplotlib.gridspec as gridspec -import random -from scipy import interpolate - -nu_type = 'neutrino' # nu for neutrino & anu for anti-neutrino -ch_lepton = 'tau' # type of charged lepton -ch_leptons = 'taus' # type of charged lepton -cross_section_model = 'ct18nlo' # neutrino cross-section model -pn_model = 'allm' # photonuclear energy loss model -pn_models = 'bdhm' -idepth = 4 # depth of water layer in km -idepths = 0 -stats = 1e8 # no. of ingoing neutrinos ie., statistics, Diksha code -stats1 = 1e5 -stats2 = 1e6 -stats3 = 1e7 -stats4 = 1e9 -prop_type = 'stochastic' # type of energy loss; can be stochastic or continuous - -#mpl.style.use('/Users/dikgarg/Desktop/Research/Neutrinos/paper.mplstyle') - -files_path = "/Users/dikgarg/Desktop/Research/Neutrinos/Tau_polarization/nupyprop/" -#energy = [8,10] - -#data.process_htc_out(files_path, nu_type, ch_lepton, energy, idepth, cross_section_model, pn_model, prop_type, stats, elep_mode=True, arg=None) - -#===============================================# -#========== to make plots from h5 ==============# -#===============================================# -plt.rcParams['xtick.major.pad']='5' -plt.rcParams['xtick.labelsize']='24' -plt.rcParams['ytick.labelsize']='24' - -energies = [10,11,12] #np.arange(7,12,1) -angles01 = np.arange(1,8,1) -angles02 = [10,15] #np.arange(1,43).astype('float64') # default angles in nuPyProp -angles1 = np.concatenate((angles01, angles02)) -angles = np.arange(1,43).astype('float64') # default angles in nuPyProp - -fig= plt.figure(figsize=[8,6], constrained_layout=True) -spec=gridspec.GridSpec(ncols=1,nrows=2,figure=fig) # set up subplot grid - -plt1 = fig.add_subplot(spec[0:2,0]) - -lss = ['-','--'] -colors = sns.color_palette('colorblind')[:len(energies)] - -for e, c in zip(energies, colors): - pexit_no_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepth, cross_section_model, pn_model, prop_type, stats)[2] # without regen - pexit_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepths, cross_section_model, pn_model, prop_type, stats3)[2] # with regen - - print("for 0km = ", pexit_regen) - plt1.loglog(angles, pexit_no_regen[9:], linestyle=lss[0], marker='o', color = c) - plt1.loglog(angles1, pexit_regen[9:18], linestyle=lss[1], marker='o', color = c) - -#plt.text(8.8, 0.07, r'$\log_{10}(E_{\nu}$/GeV)',fontsize=18) -m = plt1.plot( [], [], label= r'$\log_{10}(E_{\nu}$/GeV)', ls=lss[0]) -j = [plt1.plot( [],[], color=colors[i], label= str(energies[i]), ls=lss[0])[0] for i in range(len(energies))] -first_legend = plt1.legend(handles=j, frameon=False, loc='lower right', fontsize=19) #ncol=3 (0.38,0.65) (25.08, 0.015)) -ax = plt.gca().add_artist(first_legend) - -titles = ['4km', '0km'] #['Without regeneration', 'With regeneration'] -#titles = ['ALLM', 'BDHM'] -linestyles = ['-', '--'] - -h = [plt1.plot( [],[], color='black', label=titles[i], ls=linestyles[i])[0] for i in range(len(titles)) ] -plt1.legend(handles=(h), frameon=False, loc='lower left', fontsize=18) - -plt1.set_xlim(1,15) -# plt1.set_ylim(1e-6, 2*1e-1) -# plt1.set_ylabel(r'$P^{(\tau)}_{exit}$', fontsize=24) -plt1.grid(which='major', axis='both', linestyle=':', linewidth=0.5) -plt1.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) -# plt1.set_xticklabels([]) - -# plt2 = fig.add_subplot(spec[2:3,0]) - -# for e, c in zip(energies, colors): -# pexit_no_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepth, cross_section_model, pn_model, prop_type, stats)[1] # without regen -# pexit_regen = data.get_pexit(nu_type, ch_lepton, 10**e, idepth, cross_section_model, pn_model, prop_type, stats)[2] # with regen - -# plt2.semilogx(angles, pexit_no_regen[9:]/pexit_regen[9:], linestyle=lss[1], color = c) - -# plt2.set_xlim(1,42) -# ticks = (1,2,3,4,5,10,15,20,30,40) -# plt2.set_xticks(ticks) -# plt2.set_xticklabels(ticks) -# plt2.set_ylabel('Ratio', fontsize=24) -# #plt2.set_ylabel('Ratio (ALLM/BDHM)', fontsize=19) -# plt2.set_xlabel(r"$\beta_{tr}$ [degrees]", fontsize=24) -# plt2.grid(which='major', axis='both', linestyle=':', linewidth=0.5) -# plt2.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) - -plt.savefig('pexit_regen_noregen.png', bbox_inches='tight', dpi=400) -#plt.show() - -#===============================================# -#============ to modify h5files ================# -#===============================================# -#data.add_cdf(nu_type, ch_lepton, idepth, cross_section_model, pn_model, prop_type, stats, bins=np.logspace(-7,0,71)) -# energies = [6.0, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75, 12.0] -# for energy in energies: -# data.get_pexit(nu_type, ch_lepton, energy, idepth, cross_section_model, pn_model, prop_type, stats, out=False, out_h5=True, arg=None) -# data.get_cdf(nu_type, ch_lepton, energy, idepth, cross_section_model, pn_model, prop_type, stats, out=False, out_h5=True) - # data.get_pexit(nu_type, ch_lepton, ch_leptons, energy, idepth, cross_section_model, pn_model, prop_type, stats, stats1, stats2, stats3, stats4, out=False, out_h5=True, arg=None) - - # data.get_clep_out(nu_type, ch_lepton, ch_leptons, energy, idepth, cross_section_model, pn_model, prop_type, stats, stats1, stats2, stats3, stats4, out=False, out_h5=False, arg=None) - -#===============================================# -#=========== to check polarization =============# -#===============================================# -# energies=[1e10] -# angle = data.get_polarization(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[0] -# #pol = data.get_polarization(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[1] -# pol1 = data.get_polarization(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[1] - -# #plt.plot(angle, -1*pol, label='old pol') -# plt.plot(angle, -1*pol1, label = 'new pol') -# plt.legend() -# plt.show() - -#===============================================# -#=========== to check cdf ======================# -#===============================================# -#energies = [1e8] #, 11.0, 12.0] - -# z = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[0] # get z bins -# angles_in_data = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[1] # get the list of earth emergence angles in the output file -# angle_indices = [int(np.where(angles_in_data == i)[0]) for i in angles_in_data] # gets the indices of the angles we need based on that in the output file -# e_out_cdf = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_model, prop_type, stats)[2] # binned CDF values for all angles - -# z1 = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[0] # get z bins -# angles_in_data1 = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[1] -# angle_indices1 = [int(np.where(angles_in_data1 == i)[0]) for i in angles_in_data1] -# e_out_cdf1 = data.get_cdf(nu_type, ch_lepton, energies[0], idepth, cross_section_model, pn_models, prop_type, stats)[2] # binned CDF values for all angles - -# an = [0, 9, 19, 34] #1, 10, 20, 30, 40 degrees -# c = sns.color_palette('colorblind')[:len(an)] #['blue', 'black', 'green', 'orange', 'red'] -# #ls = ['-', '--'] -# ls = ['-', '--', ':', '-.'] - -# for i in range(len(an)): -# print("eout = ", 1e8*e_out_cdf[an[i]+9]) -# plt.semilogx(z, e_out_cdf[an[i]+9], color=c[i], linestyle=ls[i]) #, label=str(an[i]+1)) -# #plt.semilogx(z1, e_out_cdf1[an[i]], color=c[i], linestyle=ls[1]) - -# j = [plt.plot( [],[], color=c[i], label=str(an[i]+1)+r"$^\circ$", ls=ls[0])[0] for i in range(len(an))] -# first_legend = plt.legend(handles=j, title=r"$\beta=$", frameon=False, loc='best') -# ax = plt.gca().add_artist(first_legend) - -# labels = ['New CDF', 'Old CDF'] -# linestyles = ['-', '--'] - -# h = [plt.plot( [],[], color='black', label=labels[i], ls=linestyles[i])[0] for i in range(len(labels)) ] -# first_legend1 = plt.legend(handles=(h), frameon=False, loc='lower right') #,fontsize=20) -# ax = plt.gca().add_artist(first_legend1) - -# plt.title(r"$log(E_\nu/GeV)=$"+str(energies[0])) -# plt.ylabel("CDF", fontsize=18) -# plt.xlabel(r"$z=E_{\tau}/E_{\nu}$", fontsize=18) -#plt.xlim(1e-7,1e0) - -# # plt.savefig('CDF_compare_Enu'+str(energies[0])+'.jpeg', bbox_inches='tight', dpi=400) -#plt.show() - - -# plt.legend() -# plt.show() - -#===============================================# -#=========== to plot energy ====================# -#===============================================# -# energies = [1e10] # [1e6,1e7,1e8,1e9,1e10,1e11,1e12] -# angles = np.array([1,10,20,35]).astype('float64') -# # e_out_type = 'cdf' # for plot type CDF -# e_out_type = 'no_cdf' # for plot type histogram - -# E_nu = data.E_nu # neutrino energy bins -# color_map = cycle(sns.color_palette("colorblind")[0:len(angles)]) -# lss = [':', '-.', '--', '-'] - -# for energy in energies: -# fig, axs = plt.subplots(1, figsize=(10/1.1,8/1.1)) -# energy_log = float(np.log10(energy)) - -# for angle in range(len(angles)): -# e_out = data.get_clep_out(nu_type, ch_lepton, energy, angles[angle], idepth, cross_section_model, pn_model, prop_type, stats) - -# bins = E_nu # binned according to E_nu -# count, bins_count = np.histogram(e_out, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# cdf = np.cumsum(dist)/np.cumsum(dist)[-1] # normalized -# dist = np.insert(dist,0,0) -# cdf = np.insert(cdf,0,0) - -# if e_out_type == 'no_cdf': -# axs.step(E_nu, dist, where='pre', ls = lss[angle], color = next(color_map), label = r'$%.f^\circ$' % angles[angle], linewidth=2) -# axs.set_xscale('log') -# if ch_lepton=='muon':axs.set_ylabel(r"Scaled $N_{\mu}$", fontsize = 30) -# if ch_lepton=='tau':axs.set_ylabel(r"Scaled $N_{\tau}$", fontsize = 30) - -# else: -# axs.semilogx(E_nu, cdf, ls = '-', color = next(color_map), label = r'$%.f^\circ$' % angles[angle]) # normalized CDF -# axs.set_ylabel("CDF", fontsize = 30) - -# if ch_lepton=='tau': -# axs.set_xlabel(r"$E_{\tau}$ [GeV]", fontsize = 30) -# axs.set_xlim(1e5,energy*10) -# if ch_lepton=='muon': -# axs.set_xlabel(r"$E_{\mu}$ [GeV]", fontsize = 30) -# axs.set_xlim(100,energy*10) - -# if energy_log%2 == 0 or (energy_log+1)%2 == 0:axs.set_title(r"log$_{10}(E_{\nu}$/GeV) = %.2f" % energy_log) -# else:axs.set_title(r"log$_{10}(E_{\nu}/GeV) = %.2f$" % energy_log) - -# axs.legend(loc='upper left', ncol=int(np.ceil(len(angles)/8)), title = r'$\beta_{tr}$', frameon=False, framealpha=0.5, fontsize=27) -# #axs.grid(which='major', axis='both', linestyle='--') -# #axs.grid(which='minor', linestyle=':', linewidth='0.2', color='black') -# axs.xaxis.set_ticks_position('both') -# axs.yaxis.set_ticks_position('both') -# axs.tick_params(axis='x', which='both', labelbottom = True, labeltop = False) -# axs.tick_params(axis='y', which='both', left = True, labelleft = True, labelright= False) -# axs.set_ylim(0,1.2) -# plt.savefig('energy-dist-10.pdf', bbox_inches='tight', dpi=400) -# plt.tight_layout() -# plt.show() - -#===============================================# -#=========== to plot energy in 2x2 =============# -#===============================================# -# energies = [1e10] # [1e6,1e7,1e8,1e9,1e10,1e11,1e12] -# angles = np.array([1,10,20,35]).astype('float64') -# # e_out_type = 'cdf' # for plot type CDF -# e_out_type = 'no_cdf' # for plot type histogram - -# E_nu = data.E_nu # neutrino energy bins -# color_map = sns.color_palette("colorblind")[:2] -# lss = ['-', '--'] - -# fig, axs = plt.subplots(2, 2, sharex=True, sharey=True) -# plt.tight_layout(pad=0.6, w_pad=0.01, h_pad=0.01) -# #plt.subplots_adjust(wspace=0.1, hspace=0.1) -# #fig.suptitle(r"log$_{10}(E_{\nu}/GeV) = %.2f$" % np.log10(energies[0]), fontsize=15) - -# #===== -# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[0], idepth, cross_section_model, pn_model, prop_type, stats) -# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[0], idepth, cross_section_model, pn_models, prop_type, stats) - -# bins = E_nu # binned according to E_nu -# count, bins_count = np.histogram(eout_allm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[0,0].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) - -# count, bins_count = np.histogram(eout_bdhm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[0,0].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) - -# axs[0,0].set_ylabel(r"Scaled $N_{\tau}$", fontsize = 22) -# axs[0,0].set_xscale('log') -# axs[0,0].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[0])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) -# axs[0,0].text(137879, 0.099, r"log$_{10}(E_{\nu}$/GeV)$=%.2f$" % np.log10(energies[0]), fontsize=20) - -# #===== -# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[1], idepth, cross_section_model, pn_model, prop_type, stats) -# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[1], idepth, cross_section_model, pn_models, prop_type, stats) - -# bins = E_nu # binned according to E_nu -# count, bins_count = np.histogram(eout_allm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[0,1].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) - -# count, bins_count = np.histogram(eout_bdhm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[0,1].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) - -# axs[0,1].set_xscale('log') -# axs[0,1].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[1])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) - -# #===== -# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[2], idepth, cross_section_model, pn_model, prop_type, stats) -# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[2], idepth, cross_section_model, pn_models, prop_type, stats) - -# bins = E_nu # binned according to E_nu -# count, bins_count = np.histogram(eout_allm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[1,0].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) - -# count, bins_count = np.histogram(eout_bdhm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[1,0].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) - -# axs[1,0].set_xlabel(r"$E_{\tau}$ [GeV]", fontsize = 22) -# axs[1,0].set_ylabel(r"Scaled $N_{\tau}$", fontsize = 22) -# axs[1,0].set_xscale('log') -# axs[1,0].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[2])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) - -# #===== -# eout_allm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[3], idepth, cross_section_model, pn_model, prop_type, stats) -# eout_bdhm = data.get_clep_out(nu_type, ch_lepton, energies[0], angles[3], idepth, cross_section_model, pn_models, prop_type, stats) - -# bins = E_nu # binned according to E_nu -# count, bins_count = np.histogram(eout_allm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[1,1].step(E_nu, dist, where='pre', ls = lss[0], color = color_map[0], label = r'$\texttt{allm}$', linewidth=2) - -# count, bins_count = np.histogram(eout_bdhm, bins) -# pdf = count / sum(count) -# dist = count / max(count) # normalized -# dist = np.insert(dist,0,0) -# axs[1,1].step(E_nu, dist, where='pre', ls = lss[1], color = color_map[1], label = r'$\texttt{bdhm}$', linewidth=2) - -# axs[1,1].set_xscale('log') -# axs[1,1].legend(loc='best', title = r'$\beta_{tr} = %.f$' % (angles[3])+r'$^\circ$', frameon=False, framealpha=0.5, fontsize=18) - -# axs[1,1].set_xlabel(r"$E_{\tau}$ [GeV]", fontsize = 22) -# axs[1,1].set_ylim(0,1.05) -# axs[1,1].set_xlim(1e5,energies[0]*10) -# plt.show() - -#===============================================# -#=========== to check pexit ====================# -#===============================================# -# energies=[1e7, 1e8, 1e9, 1e10, 1e11] -# #angles = np.arange(1.5,3,0.1) -# colors = sns.color_palette("colorblind")[:len(energies)] -# lss = ['-', '--'] - -# fig = plt.figure(figsize=[8,6], constrained_layout=True) -# spec=gridspec.GridSpec(ncols=1,nrows=3,figure=fig) # set up subplot grid -# plt.tight_layout() - -# plt.rcParams['legend.title_fontsize'] = 'small' -# plt.rcParams['xtick.labelsize']='22' -# plt.rcParams['ytick.labelsize']='22' - -# plt1 = fig.add_subplot(spec[0:2,0]) - -# for e,c in zip(energies, colors): -# p_no_regen = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats)[1] -# p_regen = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats)[2] - -# angles = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[0] -# p_no_regen1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[1] -# p_regen1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[2] - -# #plt.semilogy(angles,p_no_regen,color=c,label='Old no_regen') -# plt1.loglog(angles, p_regen[9:], color=c, ls='-', marker='.', label=np.log10(e)) #'Water depth = 4 km') - -# #plt.semilogy(angles,p_no_regen1,color='green',ls='--',label='New No_regen') -# plt1.loglog(angles, p_regen1, color=c, ls='--', marker='.', label=np.log10(e)) #'Water depth = 3 km') - -# m = plt1.plot( [], [], label= r'$\log_{10}(E_{\nu}$/GeV)', ls=lss[0]) -# j = [plt1.plot( [],[], color=colors[i], label= str(int(np.log10(energies[i]))), ls=lss[0])[0] for i in range(len(energies))] -# first_legend = plt1.legend(handles=j, frameon=False, loc='upper right', ncol=3, fontsize=19) #(25.08, 0.015)) -# ax = plt.gca().add_artist(first_legend) - -# titles = [r'$\texttt{allm}$', r'$\texttt{bdhm}$'] #['PREM-4', 'PREM-3'] -# linestyles = ['-', '--'] - -# h = [plt1.plot( [],[], color='black', label=titles[i], ls=linestyles[i])[0] for i in range(len(titles)) ] -# plt1.legend(handles=(h), frameon=False, ncol=2, loc='lower left', fontsize=22) - -# plt1.set_xlim(angles[0], angles[-1]) -# plt1.set_ylabel(r'$P^{(\tau)}_{exit}$', fontsize=24) -# plt1.set_xticklabels([]) -# plt1.grid(which='major', axis='both', linestyle=':', linewidth=0.5) -# plt1.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) - -# plt2 = fig.add_subplot(spec[2:3,0]) - -# for e,c in zip(energies, colors): -# #angles1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats3)[0] -# p_regen = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_model, prop_type, stats)[2] -# p_regen1 = data.get_pexit(nu_type, ch_lepton, e, idepth, cross_section_model, pn_models, prop_type, stats)[2] - -# plt2.semilogx(angles, p_regen[9:]/p_regen1, color=c, ls=lss[1]) - -# # j = [plt2.plot( [],[], color=colors[i], label= str(np.log10(energies[i])), ls=lss[1])[0] for i in range(len(energies))] -# # first_legend = plt2.legend(handles=j, title= r'$\log_{10}(E_\nu/{\rm GeV})$', ncol=2, frameon=False, loc='upper right', fontsize=18) #(25.08, 0.015)) -# # ax = plt.gca().add_artist(first_legend) - -# xticks = [1, 2, 3, 4, 5, 10, 15, 20, 30, 40] #5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0] -# plt2.set_ylabel(r'Ratio ($\texttt{allm}/\texttt{bdhm}$)', fontsize=24) -# plt2.set_xlabel(r'$\beta_{tr}$ [degrees]', fontsize=24) -# plt2.set_xlim(angles[0], angles[-1]) -# plt2.set_xticks(xticks) -# plt2.set_xticklabels(xticks) -# #plt2.set_yticklabels(fontsize=18) -# plt2.grid(which='major', axis='both', linestyle=':', linewidth=0.5) -# plt2.grid(which='minor', axis='both', linestyle=':', linewidth=0.5) -# plt.savefig('pexit_allm_bdhm.pdf', bbox_inches='tight', dpi=400) -# plt.show() - -#===============================================# -# To look at the interactions of tau, y*Ei>1PeV # -#===============================================# -# data = np.genfromtxt("lepint_9.00_ 1.0.dat") -# data = np.asarray(sorted(data, key = lambda x: x[0])) -# print(data) - -# stats = [1,3,4] #np.arange(1,11,1) -# print(stats) - -# colors = ['red', 'green', 'blue', 'orange', 'black', 'grey', 'cyan', 'pink', 'brown', 'purple'] -# ls = ['dashed', '-', '-.'] -# mk = ['o', 'x', '.'] -# for j in range(len(stats)): -# dist,energy = [], [] -# for i in range(len(data)): -# if data[i][0] == stats[j]: -# dist.append(data[i][1]) -# energy.append(data[i][2]) - -# plt.plot(dist, energy, colors[j], marker=mk[j], linestyle=ls[j], linewidth=0.5) -# dist = np.insert(dist, 0, 0) -# delx=[abs(dist[k]-dist[k+1]) for k in range(len(dist)-1)] - -# print(delx) - -# #plt.plot(delx, energy, marker='o', linestyle='None') #, colors[j], marker=mk[j], linestyle=ls[j], linewidth=0.5) - - -# plt.xlabel("Dist travelled before interacting (km)") -# plt.ylabel("Shower energy, y*Ei (GeV)") -# plt.title(r"$E_{i,\tau}=10^9$ GeV") -# plt.show() From b4a93effe893c7749a0a567d3d0f5ce2097a409c Mon Sep 17 00:00:00 2001 From: dikgarg Date: Wed, 17 Apr 2024 15:42:36 -0500 Subject: [PATCH 5/7] cleaned up --- src/nupyprop/try.py | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 src/nupyprop/try.py diff --git a/src/nupyprop/try.py b/src/nupyprop/try.py deleted file mode 100644 index 5f6d37b..0000000 --- a/src/nupyprop/try.py +++ /dev/null @@ -1,5 +0,0 @@ -import numpy as np -import constants as const - -print(const.N_A) - From 5042b93347a66dff2f8830837dde8848a5d19f8c Mon Sep 17 00:00:00 2001 From: Diksha Garg Date: Wed, 17 Apr 2024 15:58:28 -0500 Subject: [PATCH 6/7] typo fix --- ...ut_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 | Bin 0 -> 20408 bytes src/nupyprop/data.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 output_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 diff --git a/output_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 b/output_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 new file mode 100644 index 0000000000000000000000000000000000000000..28ab3d7d8898d2be9dbcfd56f9a404fec3edb6c2 GIT binary patch literal 20408 zcmeI3dr(wW9LLY{NM0s{57Lb5=%k4jj)+7mAgrv0u#>COKP?MfmeqB4TXqR36(>}5 zbcT{_#2JV3t(BzWqrnMD@j*Ty?Lnq!XrfuzH0oH6-E+@5KbDp4iusSjIga<-&*7Zk zJ?Fc>yXVgDw|AK)X-e;afdL2?KR@Jyg5^_oxKGQzG}6MD{XK)8sAyeE>n&d7M1}A_ zgu-Zh2(|CtPxrc7jijE;KC9_4)Z$Cd{8$68dz1nib%GWzIGwIqL+hi|&nO~wfytrQ z+O3&}Oq1EC|z#|1#x!R_*S;%)d&h|1dS8Uy77ZnIAGgXMgW*JtH+ONrk+TKnKPQA}7p# z2Ibk@ysJSP;QlS9(yFs7}4W|28r9WAkmI**t z>Wz-d{rgM$;JwdaF`C7PP$5K!Lqywn6cvb~?n~n>R=r&`itwGqwD)ALD;vxJ^Skbh z#eIFHS>Yvmd3nhz^`kqww@L^kw%86&i1?j~t_7hHy+}Jhc25Bn)mfz?4#wP!)j^1S zL#R*?>MN<8B<5w=O*Yu#o|VSo&m8|JV~F>#@%U4Vp`Rdb3qtYI5%+ycw#WQd$xc6M z46}o``j@2$W3{LjAg7v~hZLm9X1#zBemu~PZQDA!GHRFPHz~upZ zZ<`#s(sPSovSgW^*(Qro8d`|2Ajr~)cJi3R){J$)a7fGfZi=ot!l$_u#1Qlw?-TsxQd;oQ2l#nk)`Wpnnnj?r( zo&X2$rQo}4s=N6C?2ou~Y2RSBN~ViO8wyN$q#GR5c|0Gq;3r%Gt^iknE5H@t3UCFu z0$c&E09Sx3z!i8{1w7>g+U$ZI#&(@nw(=)Ze=ckW3udUPp zuODAHXvyt2fD5Y%Qr=9@0De9^tM25gY~a0RV_WNgH36^uJ?|SwsttJd2XiLqmO6k> zo?H1!$Pb0UyS*l)y`NMJ{7&D`lP?yP0MGpRKtJ*5GT{2Uh{j#9Wx(stt-j#2lmlP6 z^0&Qi-x^?hY-Q@X$V%YIYi0LCGB*ItG3Jo&Ar0wG&8 s+C{NbiZPex7m0xU$Q9rUa0R#mTmh~CSAZ+P72pbR1-JrSf&ZbvzXB3~*#H0l literal 0 HcmV?d00001 diff --git a/src/nupyprop/data.py b/src/nupyprop/data.py index cbb0bcf..9574bde 100755 --- a/src/nupyprop/data.py +++ b/src/nupyprop/data.py @@ -22,7 +22,7 @@ E_nu = const.E_nu E_lep = const.E_lep -nu_models = cosnt.nu_models #these are the models that exsist in lookup_table.h5 +nu_models = const.nu_models #these are the models that exsist in lookup_table.h5 pn_models = const.pn_models ref = importlib_resources.files('nupyprop.datafiles') / 'lookup_tables.h5' # path for lookup_tables From 6f44864852dc5f67b35361db5d25a50307fd1c74 Mon Sep 17 00:00:00 2001 From: Diksha Garg Date: Wed, 17 Apr 2024 15:58:43 -0500 Subject: [PATCH 7/7] typo fix --- ...ut_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 | Bin 20408 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 output_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 diff --git a/output_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 b/output_nu_tau_4km_ct18nlo_allm_stochastic_1e6.h5 deleted file mode 100644 index 28ab3d7d8898d2be9dbcfd56f9a404fec3edb6c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20408 zcmeI3dr(wW9LLY{NM0s{57Lb5=%k4jj)+7mAgrv0u#>COKP?MfmeqB4TXqR36(>}5 zbcT{_#2JV3t(BzWqrnMD@j*Ty?Lnq!XrfuzH0oH6-E+@5KbDp4iusSjIga<-&*7Zk zJ?Fc>yXVgDw|AK)X-e;afdL2?KR@Jyg5^_oxKGQzG}6MD{XK)8sAyeE>n&d7M1}A_ zgu-Zh2(|CtPxrc7jijE;KC9_4)Z$Cd{8$68dz1nib%GWzIGwIqL+hi|&nO~wfytrQ z+O3&}Oq1EC|z#|1#x!R_*S;%)d&h|1dS8Uy77ZnIAGgXMgW*JtH+ONrk+TKnKPQA}7p# z2Ibk@ysJSP;QlS9(yFs7}4W|28r9WAkmI**t z>Wz-d{rgM$;JwdaF`C7PP$5K!Lqywn6cvb~?n~n>R=r&`itwGqwD)ALD;vxJ^Skbh z#eIFHS>Yvmd3nhz^`kqww@L^kw%86&i1?j~t_7hHy+}Jhc25Bn)mfz?4#wP!)j^1S zL#R*?>MN<8B<5w=O*Yu#o|VSo&m8|JV~F>#@%U4Vp`Rdb3qtYI5%+ycw#WQd$xc6M z46}o``j@2$W3{LjAg7v~hZLm9X1#zBemu~PZQDA!GHRFPHz~upZ zZ<`#s(sPSovSgW^*(Qro8d`|2Ajr~)cJi3R){J$)a7fGfZi=ot!l$_u#1Qlw?-TsxQd;oQ2l#nk)`Wpnnnj?r( zo&X2$rQo}4s=N6C?2ou~Y2RSBN~ViO8wyN$q#GR5c|0Gq;3r%Gt^iknE5H@t3UCFu z0$c&E09Sx3z!i8{1w7>g+U$ZI#&(@nw(=)Ze=ckW3udUPp zuODAHXvyt2fD5Y%Qr=9@0De9^tM25gY~a0RV_WNgH36^uJ?|SwsttJd2XiLqmO6k> zo?H1!$Pb0UyS*l)y`NMJ{7&D`lP?yP0MGpRKtJ*5GT{2Uh{j#9Wx(stt-j#2lmlP6 z^0&Qi-x^?hY-Q@X$V%YIYi0LCGB*ItG3Jo&Ar0wG&8 s+C{NbiZPex7m0xU$Q9rUa0R#mTmh~CSAZ+P72pbR1-JrSf&ZbvzXB3~*#H0l