Skip to content

Commit

Permalink
correcting test
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetanfacchinetti committed Apr 8, 2024
1 parent 2d882c3 commit 1b79bb8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
19 changes: 10 additions & 9 deletions example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -39,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -64,16 +64,16 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x128507040>"
"<matplotlib.legend.Legend at 0x10837e9b0>"
]
},
"execution_count": 11,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -107,16 +107,16 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x13812a080>"
"<matplotlib.legend.Legend at 0x13a937b50>"
]
},
"execution_count": 12,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -147,6 +147,7 @@
"ax.set_xscale(\"log\")\n",
"ax.set_yscale(\"log\")\n",
"ax.set_ylabel('Tm [K]')\n",
"#ax.set_xlim(800, 1200)\n",
"#ax.set_xlabel('z')\n",
"ax.legend()"
]
Expand Down
4 changes: 2 additions & 2 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

# Test that we can define INJ_PARAMS and COSMOPARAMS objects
def test_load():
pyhy.init_INPUT_INJ_PARAMS(0., 0., 0., 0., 0., 0., 0., 0, 0., 1., 0.)
pyhy.init_INPUT_INJ_PARAMS(0., 0., 0., 0., 0., 0., 0., 0, 0., 1., 0., 0., -2.0, 31.0)
pyhy.init_INPUT_COSMOPARAMS(6.735837e-01, 2.7255, 0.0494142797907188, 0.31242079216478097, 0., -1, 0, 3.046, 1.0, 0.06, 0., 0., 0.245, 1., 1.)

# Test that we can run the HYREC C code
def test_call_run():
inj_params = pyhy.init_INPUT_INJ_PARAMS(0., 0., 0., 0., 0., 0., 0., 0, 0., 1., 0.)
inj_params = pyhy.init_INPUT_INJ_PARAMS(0., 0., 0., 0., 0., 0., 0., 0, 0., 1., 0., 0., -2.0, 31.0)
cosmo_params = pyhy.init_INPUT_COSMOPARAMS(6.735837e-01, 2.7255, 0.0494142797907188, 0.31242079216478097, 0., -1, 0, 3.046, 1.0, 0.06, 0., 0., 0.245, 1., 1.)
pyhy.call_run_hyrec(cosmo_params, inj_params)

Expand Down

0 comments on commit 1b79bb8

Please sign in to comment.