From 397ffb687379f192424770a497d87e68a7b5245a Mon Sep 17 00:00:00 2001 From: hrocho Date: Thu, 8 Feb 2018 00:39:19 +0100 Subject: [PATCH] den eff --- calculations.cpp | 6 +++++- data_atima.h | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/calculations.cpp b/calculations.cpp index 3d25c1d..e6e2c94 100644 --- a/calculations.cpp +++ b/calculations.cpp @@ -134,9 +134,13 @@ double bethek_barkas(double zp_eff,double eta, double zt){ double bethek_density_effect(double beta, int zt){ double gamma = 1/sqrt(1-(beta*beta)); double x = log(beta * gamma) / 2.3025851; - int i = zt-1; + int i; double del = 0; + if(zt>97){ // check if data are available, if not take highest z data + zt=97; + } + i = zt-1; if (x < density_effect::x0[i] ){ if(density_effect::del_0[i] > 0.)del = density_effect::del_0[i] * pow(10.0,(2.*(x-density_effect::x0[i]))); } diff --git a/data_atima.h b/data_atima.h index 9ff3849..0a336de 100644 --- a/data_atima.h +++ b/data_atima.h @@ -292,7 +292,7 @@ const double atima_lambda_screening[92]= { } namespace density_effect{ -const double x0[92]= { +const double x0[97]= { 1.8639, 2.2017, 0.1304, 0.0592, 0.0305, -.0178, 1.7378, 1.7541, 1.8433, 2.0735, 0.2880, 0.1499, 0.1708, 0.2014, 0.1696, 0.1580, 1.5555, 1.7635, 0.3851, 0.3228, 0.1640, 0.0957, 0.0691, 0.0340, 0.0447, -.0012, -.0187, -.0566, -.0254, 0.0049, @@ -302,9 +302,9 @@ const double x0[92]= { 0.1627, 0.1520, 0.1888, 0.1058, 0.0947, 0.0822, 0.0761, 0.0648, 0.0812, 0.1199, 0.1560, 0.1965, 0.2117, 0.2167, 0.0559, 0.0891, 0.0819, 0.1484, 0.2021, 0.2756, 0.3491, 0.3776, 0.4152, 0.4267, 0.4300, 1.5368, 0.6000, 0.5991, 0.4559, 0.4202, -0.3144, 0.2260 }; +0.3144, 0.2260, 0.1869, 0.1557, 0.2274, 0.2484, 0.2378}; -const double x1[92]= { +const double x1[97]= { 3.2718, 3.6122, 1.6397, 1.6922, 1.9688, 2.3415, 4.1323, 4.3213, 4.4096, 4.6421, 3.1962, 3.0668, 3.0127, 2.8715, 2.7815, 2.7159, 4.2994, 4.4855, 3.1724, 3.1191, 3.0593, 3.0386, 3.0322, 3.0451, 3.1074, 3.1531, 3.1790, 3.1851, 3.2792, 3.3668, @@ -314,9 +314,9 @@ const double x1[92]= { 3.3199, 3.3460, 3.4633, 3.3932, 3.4224, 3.4474, 3.4782, 3.4922, 3.5085, 3.6246, 3.5218, 3.4337, 3.4805, 3.4960, 3.4845, 3.5414, 3.5480, 3.6212, 3.6979, 3.7275, 3.8044, 3.8073, 3.8248, 3.8293, 4.0000, 4.9889, 4.0000, 3.9428, 3.7966, 3.7681, -3.5079, 3.3721 }; +3.5079, 3.3721, 3.3690, 3.3981, 3.5021, 3.5160, 3.5186 }; -const double a[92]= { +const double a[97]= { 0.14092, 0.13443, 0.95136, 0.80392, 0.56224, 0.26142, 0.15349, 0.11778, 0.11083, .08064, 0.07772, 0.08163, 0.08024, 0.14921, 0.23610, 0.33992, 0.19849, 0.19714, 0.19827, .15643, 0.15754, 0.15662, 0.15436, 0.15419, 0.14973, 0.14680, 0.14474, 0.16496, 0.14339, .14714, @@ -326,9 +326,9 @@ const double a[92]= { 0.24280, 0.24698, 0.24448, 0.25109, 0.24453, 0.24665, 0.24638, 0.24823, 0.24889, .25295, 0.24033, 0.22918, 0.17798, 0.15509, 0.15184, 0.12751, 0.12690, 0.11128, 0.09756, .11014, 0.09455, 0.09359, 0.09410, 0.09282, 0.09000, 0.20798, 0.08000, 0.08804, 0.08567, 0.08655, - 0.14770, 0.19677 }; + 0.14770, 0.19677, 0.19741, 0.20419, 0.20308, 0.20257, 0.20192 }; -const double c[92]= { +const double c[97]= { 9.5835, 11.1393, 3.1221, 2.7847, 2.8477, 2.8680, 10.5400, 10.7004, 10.9653, 11.9041, 5.0526, 4.5297, 4.2395, 4.4351, 4.5214, 4.6659, 11.1421, 11.9480, 5.6423, 5.0396, 4.6949, 4.4450, 4.2659, 4.1781, 4.2702, 4.2911, 4.2601, 4.3115, 4.4190, 4.6906, @@ -338,9 +338,9 @@ const double c[92]= { 5.8224, 5.8597, 6.2278, 5.8738, 5.9045, 5.9183, 5.9587, 5.9521, 5.9677, 6.3325, 5.9785, 5.7139, 5.5262, 5.4059, 5.3445, 5.3083, 5.3418, 5.4732, 5.5747, 5.9605, 6.1365, 6.2018, 6.3505, 6.4003, 6.4, 13.2839, 7., 7.0452, 6.3742, 6.2473, -6.0327, 5.8694 }; +6.0327, 5.8694, 5.8149, 5.8748, 6.2813, 6.3097, 6.2912 }; -const double m[92]= { +const double m[97]= { 5.7273, 5.8347, 2.4993, 2.4339, 2.4512, 2.8697, 3.2125, 3.2913, 3.2962, 3.5771, 3.6452, 3.6166, 3.6345, 3.2546, 2.9158, 2.6456, 2.9702, 2.9618, 2.9233, 3.0745, 3.0517, 3.0302, 3.0163, 2.9896, 2.9796, 2.9632, 2.9502, 2.8430, 2.9044, 2.8652, @@ -350,9 +350,9 @@ const double m[92]= { 2.6674, 2.6403, 2.6245, 2.5977, 2.6056, 2.5849, 2.5726, 2.5573, 2.5469, 2.5141, 2.5643, 2.6155, 2.7623, 2.8447, 2.8627, 2.9608, 2.9658, 3.0417, 3.1101, 3.0519, 3.1450, 3.1608, 3.1671, 3.1830, 1.1111, 2.7409, 1.1111, 3.2454, 3.2683, 3.2610, -2.9845, 2.8171 }; +2.9845, 2.8171, 2.8082, 2.7679, 2.7615, 2.7579, 2.7560 }; -const double del_0[92]= { +const double del_0[97]= { 0.0, 0.00, 0.14, 0.14, 0.14, 0.12, 0.00, 0.00, 0.00, 0.00, 0.08, 0.08, 0.12, 0.14, 0.14, 0.14, 0.00, 0.00, 0.10, 0.14, 0.10, 0.12, 0.14, 0.14, 0.14, 0.12, 0.12, 0.10, 0.08, 0.08, @@ -362,7 +362,7 @@ const double del_0[92]= { 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.08, 0.10, 0.10, 0.12, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.00, 0.00, 0.00, 0.14, 0.14, 0.14, -0.14, 0.14 }; +0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14 }; } #endif