Skip to content

Commit

Permalink
Merge pull request #22 from Yannick-Schmidt/photonfield
Browse files Browse the repository at this point in the history
Implementation of a new EBL model from Finke et al. 2022.
  • Loading branch information
JulienDoerner authored Mar 11, 2024
2 parents fc42dff + 4bb2a79 commit b6e7e5b
Show file tree
Hide file tree
Showing 354 changed files with 69,897 additions and 2 deletions.
3 changes: 2 additions & 1 deletion calc_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
photonField.EBL_Stecker16('upper'),
photonField.EBL_Saldana21(),
photonField.EBL_Saldana21('upper'),
photonField.EBL_Saldana21('lower')
photonField.EBL_Saldana21('lower'),
photonField.EBL_Finke22()
]

fields_urb = [
Expand Down
37 changes: 36 additions & 1 deletion photonField.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,39 @@ def load_density(self, fname):

return energy, photonDensity

class EBL_Finke22(EBL):
""" IRB model from FInke et al. 2022 """

def __init__(self):
super(EBL_Finke22, self).__init__()
self.name = 'IRB_Finke22'
self.info = 'Cosmic infrared and optical background radiation model of Finke et al. 2022 (Model A).'
self.files = os.path.join(datadir, 'EBL_Finke_2022', 'z%.2f.dat')
self.redshift = np.arange(0, 7.02 , 0.02)
self.energy = []
self.photonDensity = []
self.load_data()

def load_data(self):
tmp_list = []

for i, z in enumerate(self.redshift):
data = pd.read_csv(self.files % z, sep="\s+", header=None)
# data[0]: photon energy [eV]
# data[1]: comoving energy density [erg/cm^3]
eps = data[0].to_numpy()
n = data[1].to_numpy()

self.data[z] = (eps * eV) , (n * erg * 1e6 / (eps * eV)**2) # [J] , dn/deps [1/m^3/J]

# adding the energies only once, cause they are the same in every file
if i == 0:
self.energy = eps
tmp_list.append( n * (erg / eV) / self.energy**2 ) # [1/cm^3/eV]

self.photonDensity = np.array(tmp_list).transpose()


# --------------------------------------------------------
# CRB (radio) models
# --------------------------------------------------------
Expand Down Expand Up @@ -727,6 +760,7 @@ def getEmax(self, z=0):
y9lo = c * EBL_Stecker16('lower').getDensity(eps)
y10lo = c * EBL_Saldana21('lower').getDensity(eps)
y10up = c * EBL_Saldana21('upper').getDensity(eps)
y11 = c * EBL_Finke22().getDensity(eps)

figure()
plot(x, y1, label='Kneiske 2004')
Expand All @@ -738,7 +772,8 @@ def getEmax(self, z=0):
fill_between(x, y7lo, y7up, facecolor='m', edgecolor='none', alpha=0.2, zorder=-1, label='Dominguez 2011 (limits)')
fill_between(x, y9lo, y9up, facecolor='g', edgecolor='none', alpha=0.2, zorder=-1, label='Stecker 2016 (limits)')
fill_between(x, y10lo, y10up, facecolor='b', edgecolor='none', alpha=0.2, zorder=-1, label='Saldana 2021 (limits)')

plot(x, y11, label='Finke 2022')

legend(loc='lower center', fontsize='x-small')
loglog()
grid()
Expand Down
10 changes: 10 additions & 0 deletions tables/EBL_Finke_2022/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Extragalactic background light (EBL) model from Finke et al. 2022, "Modeling the Extragalactic Background Light and the Cosmic Star Formation History" (DOI:10.3847/1538-4357/ac9843)

Files obtained from: https://zenodo.org/record/7023073 (at 2023-06-06)
Included in this database are the luminosity densities, EBL energy density/intensities, and gamma-ray absorption optical depths for the fiducial 'model A'.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

These tables contain the energy density data from the publication above.
Each file represents a different redshift (from z = 0.00 up to z = 7.00 in steps of 0.02).
The first column (which is the same in each file) is the photon energy (eV) and the second column is the comoving photon density (erg/cm^3).
199 changes: 199 additions & 0 deletions tables/EBL_Finke_2022/z0.00.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
1.000000e-03 2.168545e-16
1.054412e-03 2.541383e-16
1.111784e-03 2.942443e-16
1.172279e-03 3.411995e-16
1.236065e-03 3.910803e-16
1.303321e-03 4.480064e-16
1.374238e-03 5.123793e-16
1.449012e-03 5.837332e-16
1.527856e-03 6.635857e-16
1.610989e-03 7.506818e-16
1.698646e-03 8.461899e-16
1.791073e-03 9.506102e-16
1.888529e-03 1.062043e-15
1.991287e-03 1.186435e-15
2.099637e-03 1.315357e-15
2.213882e-03 1.461018e-15
2.334344e-03 1.618251e-15
2.461360e-03 1.783939e-15
2.595287e-03 1.965217e-15
2.736502e-03 2.150158e-15
2.885400e-03 2.352158e-15
3.042400e-03 2.556490e-15
3.207943e-03 2.760635e-15
3.382493e-03 2.983474e-15
3.566541e-03 3.202728e-15
3.760603e-03 3.434085e-15
3.965225e-03 3.654289e-15
4.180980e-03 3.880407e-15
4.408475e-03 4.094078e-15
4.648349e-03 4.302239e-15
4.901274e-03 4.490489e-15
5.167962e-03 4.666418e-15
5.449160e-03 4.836625e-15
5.745660e-03 4.974166e-15
6.058292e-03 5.097294e-15
6.387935e-03 5.190359e-15
6.735515e-03 5.256268e-15
7.102007e-03 5.299225e-15
7.488441e-03 5.305991e-15
7.895901e-03 5.281933e-15
8.325532e-03 5.234311e-15
8.778540e-03 5.159872e-15
9.256197e-03 5.056170e-15
9.759844e-03 4.923063e-15
1.029090e-02 4.768536e-15
1.085084e-02 4.588918e-15
1.144126e-02 4.391194e-15
1.206380e-02 4.178450e-15
1.272021e-02 3.949186e-15
1.341234e-02 3.728521e-15
1.414214e-02 3.486899e-15
1.491164e-02 3.245087e-15
1.572301e-02 3.004370e-15
1.657853e-02 2.767635e-15
1.748059e-02 2.540153e-15
1.843175e-02 2.322217e-15
1.943465e-02 2.126030e-15
2.049213e-02 1.938401e-15
2.160715e-02 1.762922e-15
2.278283e-02 1.610370e-15
2.402249e-02 1.471267e-15
2.532960e-02 1.355282e-15
2.670783e-02 1.254456e-15
2.816105e-02 1.174038e-15
2.969335e-02 1.109074e-15
3.130902e-02 1.058212e-15
3.301261e-02 1.032428e-15
3.480888e-02 1.005726e-15
3.670290e-02 1.002758e-15
3.869998e-02 1.001749e-15
4.080572e-02 1.014407e-15
4.302603e-02 1.033306e-15
4.536716e-02 1.058281e-15
4.783567e-02 1.087332e-15
5.043850e-02 1.118849e-15
5.318296e-02 1.149905e-15
5.607674e-02 1.180043e-15
5.912799e-02 1.208598e-15
6.234525e-02 1.233178e-15
6.573758e-02 1.253858e-15
6.931448e-02 1.267450e-15
7.308602e-02 1.276441e-15
7.706277e-02 1.278496e-15
8.125590e-02 1.271132e-15
8.567719e-02 1.262742e-15
9.033905e-02 1.243783e-15
9.525456e-02 1.221855e-15
1.004375e-01 1.194602e-15
1.059025e-01 1.160485e-15
1.116649e-01 1.124911e-15
1.177408e-01 1.084729e-15
1.241473e-01 1.046288e-15
1.309024e-01 1.006248e-15
1.380250e-01 9.713318e-16
1.455352e-01 9.368967e-16
1.534541e-01 9.087404e-16
1.618038e-01 8.851398e-16
1.706079e-01 8.716389e-16
1.798910e-01 8.644923e-16
1.896792e-01 8.708940e-16
2.000000e-01 8.853861e-16
2.108824e-01 9.170219e-16
2.223569e-01 9.575655e-16
2.344558e-01 1.014631e-15
2.472129e-01 1.086135e-15
2.606643e-01 1.173616e-15
2.748475e-01 1.271142e-15
2.898025e-01 1.389004e-15
3.055712e-01 1.510480e-15
3.221979e-01 1.653820e-15
3.397293e-01 1.796975e-15
3.582146e-01 1.963338e-15
3.777057e-01 2.131332e-15
3.982574e-01 2.318637e-15
4.199274e-01 2.498081e-15
4.427764e-01 2.690658e-15
4.668687e-01 2.885692e-15
4.922720e-01 3.088201e-15
5.190574e-01 3.263580e-15
5.473003e-01 3.440983e-15
5.770800e-01 3.607795e-15
6.084800e-01 3.775129e-15
6.415885e-01 3.913945e-15
6.764986e-01 4.034933e-15
7.133082e-01 4.127630e-15
7.521206e-01 4.204904e-15
7.930449e-01 4.263478e-15
8.361960e-01 4.322648e-15
8.816950e-01 4.368871e-15
9.296697e-01 4.405829e-15
9.802548e-01 4.424549e-15
1.033592e+00 4.427773e-15
1.089832e+00 4.405997e-15
1.149132e+00 4.366855e-15
1.211658e+00 4.297472e-15
1.277587e+00 4.223097e-15
1.347103e+00 4.126759e-15
1.420401e+00 4.005151e-15
1.497688e+00 3.874059e-15
1.579180e+00 3.725878e-15
1.665106e+00 3.569374e-15
1.755708e+00 3.403776e-15
1.851239e+00 3.237893e-15
1.951969e+00 3.053204e-15
2.058179e+00 2.879654e-15
2.170169e+00 2.693262e-15
2.288252e+00 2.513851e-15
2.412760e+00 2.330336e-15
2.544043e+00 2.158392e-15
2.682469e+00 1.983974e-15
2.828427e+00 1.835002e-15
2.982327e+00 1.689577e-15
3.144601e+00 1.596318e-15
3.315705e+00 1.505161e-15
3.496119e+00 1.437743e-15
3.686349e+00 1.364147e-15
3.886931e+00 1.289057e-15
4.098426e+00 1.220923e-15
4.321429e+00 1.155843e-15
4.556566e+00 1.101090e-15
4.804498e+00 1.030569e-15
5.065920e+00 9.662914e-16
5.341566e+00 8.849960e-16
5.632211e+00 8.167175e-16
5.938670e+00 7.380180e-16
6.261804e+00 6.703348e-16
6.602521e+00 5.926506e-16
6.961777e+00 5.272323e-16
7.340580e+00 4.562306e-16
7.739995e+00 3.944416e-16
8.161143e+00 3.309382e-16
8.605206e+00 2.736195e-16
9.073432e+00 2.112213e-16
9.567135e+00 1.626444e-16
1.008770e+01 1.174500e-16
1.063659e+01 6.978411e-17
1.121535e+01 3.954187e-17
1.182560e+01 2.107223e-17
1.246905e+01 9.740418e-18
1.314752e+01 1.065443e-18
1.386290e+01 4.596819e-68
1.461720e+01 5.301680e-68
1.541255e+01 5.974303e-68
1.625118e+01 6.875245e-68
1.713544e+01 7.733858e-68
1.806781e+01 8.877766e-68
1.905091e+01 9.966294e-68
2.008751e+01 1.140748e-67
2.118051e+01 1.277673e-67
2.233298e+01 1.457677e-67
2.354816e+01 1.628440e-67
2.482946e+01 1.817061e-67
2.618048e+01 2.062227e-67
2.760501e+01 2.294436e-67
2.910705e+01 2.593701e-67
3.069082e+01 2.877015e-67
3.236077e+01 3.238991e-67
3.412158e+01 3.443007e-67
3.597820e+01 3.630347e-67
Loading

0 comments on commit b6e7e5b

Please sign in to comment.