In [1]:
import numpy as np
import tables as tab
In [2]:
h5file=tab.open_file("NuFATECrossSections.h5", mode = "w", title = "Cross sections tables")
In [3]:
dsx=h5file.create_group(h5file.root,"differential_cross_sections","Differential cross sections")
dsx._v_attrs.number_energy_nodes=200
dsx._v_attrs.min_energy=1.0e3
dsx._v_attrs.max_energy=1.0e10
dsx._v_attrs.energy_unit="GeV"
dsx._v_attrs.cross_section_unit="cm^2"
In [4]:
dxsnu=np.genfromtxt("./dxsnu.dat")
h5file.create_array(dsx,"dxsnu",dxsnu,title="Neutrino differential cross section");
In [5]:
dxsnubar=np.genfromtxt("./dxsnubar.dat")
h5file.create_array(dsx,"dxsnubar",dxsnu,title="Antieutrino differential cross section");
In [6]:
sx=h5file.create_group(h5file.root,"total_cross_sections","Total cross sections")
sx._v_attrs.number_energy_nodes=200
sx._v_attrs.min_energy=1.0e3
sx._v_attrs.max_energy=1.0e10
sx._v_attrs.energy_unit="GeV"
sx._v_attrs.cross_section_unit="cm^2"
In [7]:
nuexs=np.genfromtxt("./nuexs.dat")
h5file.create_array(sx,"nuexs",nuexs,title="Neutrino total nue cross section");
numuxs=np.genfromtxt("./numuxs.dat")
h5file.create_array(sx,"numuxs",numuxs,title="Neutrino total numu cross section");
nutauxs=np.genfromtxt("./nutauxs.dat")
h5file.create_array(sx,"nutauxs",nutauxs,title="Neutrino total nutau cross section");
In [8]:
nuebarxs=np.genfromtxt("./nuebarxs.dat")
h5file.create_array(sx,"nuebarxs",nutauxs,title="Antineutrino total nue cross section");
numubarxs=np.genfromtxt("./numubarxs.dat")
h5file.create_array(sx,"numubarxs",numubarxs,title="Antineutrino total numu cross section");
nutaubarxs=np.genfromtxt("./nutaubarxs.dat")
h5file.create_array(sx,"nutaubarxs",nutaubarxs,title="Antineutrino total nutau cross section");
In [9]:
tx=h5file.create_group(h5file.root,"tau_decay_spectrum","Tau decay information")
tx._v_attrs.number_energy_nodes=200
tx._v_attrs.min_energy=1.0e3
tx._v_attrs.max_energy=1.0e10
tx._v_attrs.energy_unit="GeV"
tx._v_attrs.cross_section_unit="cm^2"
In [10]:
tfull=np.genfromtxt("./tfull.dat")
h5file.create_array(tx,"tfull",tfull,title="Tau spectrum to all particles");
tbarfull=np.genfromtxt("./tbarfull.dat")
h5file.create_array(tx,"tbarfull",tbarfull,title="Taubar spectrum to all particles");
In [11]:
secfull=np.genfromtxt("./secfull.dat")
h5file.create_array(tx,"secfull",secfull,title="Tau spectrum to secondary leptons");
secbarfull=np.genfromtxt("./secbarfull.dat")
h5file.create_array(tx,"secbarfull",secbarfull,title="Taubar spectrum to secondary leptons");
In [12]:
h5file.close()