Skip to content

Commit b2b5957

Browse files
committed
bugfix
Signed-off-by: Anto Idicherian Lonappan <[email protected]>
1 parent b59f268 commit b2b5957

File tree

7 files changed

+80
-22
lines changed

7 files changed

+80
-22
lines changed

Notebooks/Validation.ipynb

+20-11
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
{
1515
"cell_type": "code",
16-
"execution_count": 2,
16+
"execution_count": 1,
1717
"id": "e75a5d21-676b-4c16-92a7-b1d9e8e3a3f0",
1818
"metadata": {},
1919
"outputs": [],
@@ -27,15 +27,24 @@
2727
"execution_count": 3,
2828
"id": "a53c96d1-5fb0-42ed-b5f0-4f0e1d88f856",
2929
"metadata": {},
30-
"outputs": [],
30+
"outputs": [
31+
{
32+
"name": "stdout",
33+
"output_type": "stream",
34+
"text": [
35+
"The autoreload extension is already loaded. To reload it, use:\n",
36+
" %reload_ext autoreload\n"
37+
]
38+
}
39+
],
3140
"source": [
3241
"%load_ext autoreload\n",
3342
"%autoreload 2\n",
3443
"from marcia import Cosmology\n",
3544
"from marcia import Data\n",
3645
"from marcia import Likelihood\n",
3746
"from marcia import Sampler\n",
38-
"from marcia import Kernels"
47+
"#from marcia import Kernels"
3948
]
4049
},
4150
{
@@ -49,15 +58,15 @@
4958
},
5059
{
5160
"cell_type": "code",
52-
"execution_count": 8,
61+
"execution_count": 10,
5362
"id": "b53aa1cb-b55c-4ef2-b814-ce68fd25098f",
5463
"metadata": {},
5564
"outputs": [],
5665
"source": [
5766
"cParIni = [70.0, 0.3,] \n",
5867
"params = ['H0','Omega_m',]\n",
5968
"\n",
60-
"theory = Cosmology('wCDM',['H0','Omega_m','w0'])\n",
69+
"theory = Cosmology('CPL',['H0','Omega_m','w0','wa'])\n",
6170
"\n",
6271
"z_min = 0.001\n",
6372
"z_max = 10.0\n",
@@ -66,25 +75,25 @@
6675
},
6776
{
6877
"cell_type": "code",
69-
"execution_count": 9,
78+
"execution_count": 11,
7079
"id": "93d41a3c",
7180
"metadata": {},
7281
"outputs": [
7382
{
7483
"data": {
7584
"text/plain": [
76-
"array([4.27307206e+00, 3.56727608e+03, 5.48514650e+03, 6.65657529e+03,\n",
77-
" 7.45774195e+03, 8.04816315e+03, 8.50601569e+03, 8.87429913e+03,\n",
78-
" 9.17878548e+03, 9.43595655e+03])"
85+
"array([4.28178503e+00, 3.56727678e+03, 5.48514701e+03, 6.65657992e+03,\n",
86+
" 7.45774819e+03, 8.04816928e+03, 8.50602051e+03, 8.87430412e+03,\n",
87+
" 9.17879009e+03, 9.43596034e+03])"
7988
]
8089
},
81-
"execution_count": 9,
90+
"execution_count": 11,
8291
"metadata": {},
8392
"output_type": "execute_result"
8493
}
8594
],
8695
"source": [
87-
"theory.transverse_distance( [70, 0.3, -1.2], zlist)"
96+
"theory.transverse_distance( [70, 0.3,-1.2, 0.2], zlist)"
8897
]
8998
},
9099
{

marcia/Data/Alam2016/CovDmh.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
0.022897139953075716 0.013486742325690302 0.006502654223638555 #0.00003240048153579633 0.00001618136104010995 8.118749938665901e-6
2+
0.013486742325690302 0.03215812548751247 0.01981553270718173 #0.0000258694299774546 0.00003993729555397954 0.00002240600062060267
3+
0.006502654223638555 0.01981553270718173 0.046576461141747225 #0.00001994369718266895 0.00003246192404213184 0.00005360675217519982
4+
#0.00003240048153579633 0.0000258694299774546 0.00001994369718266895 8.821758476913688e-7 4.381270803495946e-7 2.2351318860322552e-7
5+
#0.00001618136104010995 0.00003993729555397954 0.00003246192404213184 4.381270803495946e-7 9.164302676867557e-7 5.381542633750683e-7
6+
#8.118749938665901e-6 0.00002240600062060267 0.00005360675217519982 2.2351318860322552e-7 5.381542633750683e-7 1.0642561806355646e-6

marcia/Data/Alam2016/DmH.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#z DM(z)/rd 'or' H(z)rd/c
2+
0.38 10.274462038164838
3+
0.51 13.380971714711055
4+
0.61 15.44985789687373
5+
#0.38 0.04017937606022096
6+
#0.51 0.04458523360184064
7+
#0.61 0.047941274653413725

marcia/Data/Alam2016/Readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BAO-DR12 data from Alam 2016 ..

marcia/Data/Cosmic_Clocks/CC.txt

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
0.0708 69. 19.68
2+
0.09 69. 12.
3+
0.12 68.6 26.2
4+
0.17 83. 8.
5+
0.1791 75. 4.
6+
0.1993 75. 5.
7+
0.2 72.9 29.6
8+
0.27 77. 14.
9+
0.28 88.8 36.6
10+
0.3519 83. 14.
11+
0.4 95. 17.
12+
0.48 97. 62.
13+
0.5929 104. 13.
14+
0.6797 92. 8.
15+
0.7812 105. 12.
16+
0.8754 125. 17.
17+
0.88 90. 40.
18+
0.9 117. 23.
19+
1.037 154. 20.
20+
1.3 168. 17.
21+
1.363 160. 33.6
22+
1.43 177. 18.
23+
1.53 140. 14.
24+
1.75 202. 40.
25+
1.965 186.5 50.4
26+
0.3802 83. 13.5
27+
0.4004 77. 10.2
28+
0.4247 87.1 11.2
29+
0.4497 92.8 12.9
30+
0.4783 80.9 9.
31+
0.47 89. 34.

setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99
name='marcia',
1010
packages=find_packages(),
1111
version='0.1.0.dev0',
12-
install_requires=['numpy', 'scipy', 'emcee', 'toml', 'tqdm'],
12+
install_requires=['numpy', 'scipy', 'emcee', 'toml', 'tqdm','chainconsumer','getdist','numba'],
1313
description='Multi tasking Gaussian Process for cosmological inference',
1414
author='Anto Idicherian Lonappan, Balakrishna Sandeep Haridasu',
1515
1616
url='https://github.com/antolonappan/marcia',
1717
long_description=long_description,
1818
long_description_content_type="text/markdown",
19-
package_data={'marcia': ['params.ini','GPconfig.ini','constants.ini','Data/Pantheon+/*.dat', 'Data/Pantheon+/*.cov']},
19+
package_data={'marcia': ['params.ini','GPconfig.ini','constants.ini',
20+
'Data/Pantheon+/*.dat', 'Data/Pantheon+/*.cov',
21+
'Data/Cosmic_Clocks/*.txt',
22+
'Data/Alam2016/*.txt',
23+
]},
2024
include_package_data=True,
2125
)

tests/cosmology.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def test_hubble_rate(self):
2020
assert np.allclose(self.theory.hubble_rate( [70, 0.3], self.zlist), arr)
2121

2222
def test_transverse_distance(self):
23-
arr = np.array([4.27307206e+00, 3.56727608e+03, 5.48514650e+03, 6.65657529e+03,
24-
7.45774195e+03, 8.04816315e+03, 8.50601569e+03, 8.87429913e+03,
25-
9.17878548e+03, 9.43595655e+03])
23+
arr = np.array([4.28178503e+00, 3.56727678e+03, 5.48514701e+03, 6.65657992e+03,
24+
7.45774819e+03, 8.04816928e+03, 8.50602051e+03, 8.87430412e+03,
25+
9.17879009e+03, 9.43596034e+03])
2626
assert np.allclose(self.theory.transverse_distance( [70, 0.3], self.zlist), arr)
2727

2828
def test_rd(self):
@@ -44,9 +44,9 @@ def test_hubble_rate(self):
4444
assert np.allclose(self.theory.hubble_rate( [70, 0.3, -1.2], self.zlist), arr)
4545

4646
def test_transverse_distance(self):
47-
arr = np.array([4.27307206e+00, 3.56727608e+03, 5.48514650e+03, 6.65657529e+03,
48-
7.45774195e+03, 8.04816315e+03, 8.50601569e+03, 8.87429913e+03,
49-
9.17878548e+03, 9.43595655e+03])
47+
arr = np.array([4.28178503e+00, 3.56727678e+03, 5.48514701e+03, 6.65657992e+03,
48+
7.45774819e+03, 8.04816928e+03, 8.50602051e+03, 8.87430412e+03,
49+
9.17879009e+03, 9.43596034e+03])
5050
assert np.allclose(self.theory.transverse_distance( [70, 0.3, -1.2], self.zlist), arr)
5151

5252
def test_rd(self):
@@ -67,9 +67,9 @@ def test_hubble_rate(self):
6767
assert np.allclose(self.theory.hubble_rate( [70, 0.3, -1.2, 0.2], self.zlist), arr)
6868

6969
def test_transverse_distance(self):
70-
arr = np.array([4.27307206e+00, 3.56727608e+03, 5.48514650e+03, 6.65657529e+03,
71-
7.45774195e+03, 8.04816315e+03, 8.50601569e+03, 8.87429913e+03,
72-
9.17878548e+03, 9.43595655e+03])
70+
arr = np.array([4.28178503e+00, 3.56727678e+03, 5.48514701e+03, 6.65657992e+03,
71+
7.45774819e+03, 8.04816928e+03, 8.50602051e+03, 8.87430412e+03,
72+
9.17879009e+03, 9.43596034e+03])
7373
assert np.allclose(self.theory.transverse_distance( [70, 0.3, -1.2, 0.2], self.zlist), arr)
7474

7575
def test_rd(self):

0 commit comments

Comments
 (0)