Skip to content

Commit

Permalink
Removed output from documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvSondhi committed Dec 13, 2021
1 parent 361aa04 commit d1729db
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 136 deletions.
157 changes: 22 additions & 135 deletions docs/io/output/rpacket_tracking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"id": "a0e975b6",
"metadata": {},
"outputs": [],
Expand All @@ -103,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"id": "adbf5f75",
"metadata": {},
"outputs": [],
Expand All @@ -115,21 +115,10 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"id": "975766e9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'track_rpacket': False, 'initial_array_length': 10}"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# Checking the `tracking` section via the Schema\n",
"\n",
Expand All @@ -138,7 +127,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"id": "b00bc2ca",
"metadata": {},
"outputs": [],
Expand All @@ -150,28 +139,17 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"id": "3ece2c10",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'track_rpacket': True, 'initial_array_length': 10}"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"config[\"montecarlo\"][\"tracking\"]"
]
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"id": "b25271d6",
"metadata": {},
"outputs": [],
Expand All @@ -181,22 +159,12 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"id": "f9e51fd3",
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /home/dhruvs/Repositories/tardis/tardis/plasma/properties/radiative_properties.py:92: RuntimeWarning: invalid value encountered in true_divide\n",
" (g_lower * n_upper) / (g_upper * n_lower)\n",
" (\u001b[1mwarnings.py\u001b[0m:110)\n"
]
}
],
"outputs": [],
"source": [
"# Running the simulation from the config\n",
"\n",
Expand All @@ -213,21 +181,10 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": null,
"id": "f8b3424f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"numba.typed.typedlist.List"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"type(sim.runner.rpacket_tracker)"
]
Expand Down Expand Up @@ -262,21 +219,10 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": null,
"id": "a3ea2f54",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"100000"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"len(sim.runner.rpacket_tracker)"
]
Expand All @@ -300,24 +246,10 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": null,
"id": "de7b8877",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n",
" 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n",
" 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n",
" 10, 10])"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"sim.runner.rpacket_tracker[10].index"
]
Expand All @@ -332,31 +264,10 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": null,
"id": "39e2dbd2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521, 2729103521, 2729103521,\n",
" 2729103521, 2729103521, 2729103521])"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"sim.runner.rpacket_tracker[10].seed"
]
Expand All @@ -371,23 +282,10 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": null,
"id": "e82427ea",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 1])"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"sim.runner.rpacket_tracker[10].status"
]
Expand All @@ -410,21 +308,10 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": null,
"id": "090b1517",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"53"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"len(sim.runner.rpacket_tracker[10].shell_id)"
]
Expand Down
10 changes: 9 additions & 1 deletion tardis/montecarlo/tests/test_montecarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ def test_compute_distance2line_relativistic(
Tests for Tracking RPacket Properties
"""


# Test for Tracking RPacket
@pytest.mark.parametrize("seed", [2274437677])
@pytest.mark.parametrize(
["index", "r", "nu", "mu", "energy"],
Expand Down Expand Up @@ -862,3 +862,11 @@ def test_rpacket_tracking(index, seed, r, nu, mu, energy):
assert test_rpacket.mu == tracked_rpacket_properties.mu
assert test_rpacket.energy == tracked_rpacket_properties.energy
assert tracked_rpacket_properties.interact_id == 1


# Test for generation of Data Frame & comparision with reference data
def test_rpacket_tracking_dataframe():
pass

def test_rpacket_tracking_parallel():
pass

0 comments on commit d1729db

Please sign in to comment.