From 7c544e21502bc5c678eda824286e6a26917d6d5d Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Wed, 18 Nov 2020 11:08:26 -0500 Subject: [PATCH 01/19] experimental notebook --- tardis/grid/tardis_grid.ipynb | 153 ++++++++++++++++++++++++++++++++++ tardis/grid/test.yml | 65 +++++++++++++++ 2 files changed, 218 insertions(+) create mode 100644 tardis/grid/tardis_grid.ipynb create mode 100644 tardis/grid/test.yml diff --git a/tardis/grid/tardis_grid.ipynb b/tardis/grid/tardis_grid.ipynb new file mode 100644 index 00000000000..d3c0e7752a2 --- /dev/null +++ b/tardis/grid/tardis_grid.ipynb @@ -0,0 +1,153 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'sklearn'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0msklearn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtardis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfig_reader\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mConfiguration\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'sklearn'" + ] + } + ], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import sklearn\n", + "\n", + "from tardis.io.config_reader import Configuration" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [], + "source": [ + "class tardisGrid:\n", + " \n", + " def __init__(self, config, axesdict):\n", + " try:\n", + " tardis_config = Configuration.from_yaml(config)\n", + " except TypeError:\n", + " tardis_config = Configuration.from_config_dict(config)\n", + "\n", + " self.config = tardis_config\n", + " self.axesdict = axesdict\n", + " \n", + " return\n", + " \n", + " def getconfigitem(self, key):\n", + " keyitems = key.split('.')\n", + " val = self.config[keyitems[0]]\n", + " for k in keyitems[1:]:\n", + " val = val[k]\n", + " return val" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "axesdict = {'model.structure.velocity.start':np.arange(10000,15000,1000), 'model.abundances.He':np.arange(0,1,10)}" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [], + "source": [ + "grid = tardisGrid('test.yml', axesdict)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$10000 \\; \\mathrm{\\frac{km}{s}}$" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "grid.getconfigitem('model.structure.velocity.start')" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'sklearn'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0msklearn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmodel_selection\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mParameterGrid\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'sklearn'" + ] + } + ], + "source": [ + "from sklearn.model_selection import ParameterGrid" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.7" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tardis/grid/test.yml b/tardis/grid/test.yml new file mode 100644 index 00000000000..b66aa28cfe7 --- /dev/null +++ b/tardis/grid/test.yml @@ -0,0 +1,65 @@ +# Example YAML configuration for TARDIS +tardis_config_version: v1.0 + +supernova: + luminosity_requested: 5.679e41 erg/s + luminosity_wavelength_start: 3481.82000178 angstrom + luminosity_wavelength_end: 9947.78776065 angstrom + time_explosion: 10 day + +atom_data: /Users/marcwilliamson/Research/TARDIS/tardis-refdata/atom_data/kurucz_cd23_chianti_H_He.h5 + +model: + structure: + type: specific + velocity: + start: 1.0e4 km/s + stop: 20000 km/s + num: 20 + density: + type: branch85_w7 + + abundances: + type: uniform + He: 0.6658 + H: 0.0 + N: 0.05 + Fe: 0.015 + O: 0.00 + Ni: 0.2505 + C: 0.008 + Si: 0.001 + Ca: 0.0102 + + +plasma: + initial_t_inner: 7000 K + disable_electron_scattering: no + ionization: nebular + excitation: dilute-lte + radiative_rates_type: dilute-blackbody + line_interaction_type: macroatom + helium_treatment: recomb-nlte + +montecarlo: + seed: 23111963 + no_of_packets: 4.0e+4 + iterations: 20 + nthreads: 16 + + last_no_of_packets: 1.e+5 + no_of_virtual_packets: 10 + + convergence_strategy: + type: damped + damping_constant: 0.5 + threshold: 0.05 + fraction: 0.8 + hold_iterations: 3 + t_inner: + damping_constant: 0.5 + +spectrum: + start: 500 angstrom + stop: 20000 angstrom + num: 10000 From 8f59db7e4061636d9b49a447b2c32506455263e0 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Sun, 29 Nov 2020 20:28:49 -0500 Subject: [PATCH 02/19] init grid dataframe --- tardis/grid/tardis_grid.ipynb | 175 ++++++++++++++++++++++++++++------ 1 file changed, 148 insertions(+), 27 deletions(-) diff --git a/tardis/grid/tardis_grid.ipynb b/tardis/grid/tardis_grid.ipynb index d3c0e7752a2..be6c15990f4 100644 --- a/tardis/grid/tardis_grid.ipynb +++ b/tardis/grid/tardis_grid.ipynb @@ -2,18 +2,15 @@ "cells": [ { "cell_type": "code", - "execution_count": 43, + "execution_count": 2, "metadata": {}, "outputs": [ { - "ename": "ModuleNotFoundError", - "evalue": "No module named 'sklearn'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0msklearn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtardis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfig_reader\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mConfiguration\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'sklearn'" + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", + " return f(*args, **kwds)\n" ] } ], @@ -27,10 +24,22 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 118, "metadata": {}, "outputs": [], "source": [ + "def constructGrid(axesdict):\n", + " axes = []\n", + " dim = 1\n", + " for key in axesdict:\n", + " ax = axesdict[key]\n", + " axes.append(ax)\n", + " dim = dim * len(ax)\n", + " axesmesh = np.meshgrid(*axes)\n", + " tmp = np.dstack(axesmesh)\n", + " gridpoints = tmp.reshape((dim, len(axes)), order='F')\n", + " return gridpoints\n", + "\n", "class tardisGrid:\n", " \n", " def __init__(self, config, axesdict):\n", @@ -42,6 +51,9 @@ " self.config = tardis_config\n", " self.axesdict = axesdict\n", " \n", + " gridpoints = constructGrid(self.axesdict)\n", + " self.grid = pd.DataFrame(data=gridpoints, columns=self.axesdict.keys())\n", + " \n", " return\n", " \n", " def getconfigitem(self, key):\n", @@ -54,16 +66,17 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 119, "metadata": {}, "outputs": [], "source": [ - "axesdict = {'model.structure.velocity.start':np.arange(10000,15000,1000), 'model.abundances.He':np.arange(0,1,10)}" + "axesdict = {'model.structure.velocity.start':np.arange(10000,15000,1000), 'model.abundances.He':np.arange(0,1,0.1),\n", + " 'model.abundances.H':np.arange(0,1,0.25)}" ] }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 120, "metadata": {}, "outputs": [], "source": [ @@ -72,7 +85,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 121, "metadata": {}, "outputs": [ { @@ -84,7 +97,7 @@ "" ] }, - "execution_count": 41, + "execution_count": 121, "metadata": {}, "output_type": "execute_result" } @@ -95,23 +108,131 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 122, "metadata": {}, "outputs": [ { - "ename": "ModuleNotFoundError", - "evalue": "No module named 'sklearn'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0msklearn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmodel_selection\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mParameterGrid\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'sklearn'" - ] + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
model.structure.velocity.startmodel.abundances.Hemodel.abundances.H
010000.00.00.00
110000.00.10.00
210000.00.20.00
310000.00.30.00
410000.00.40.00
............
19514000.00.50.75
19614000.00.60.75
19714000.00.70.75
19814000.00.80.75
19914000.00.90.75
\n", + "

200 rows × 3 columns

\n", + "
" + ], + "text/plain": [ + " model.structure.velocity.start model.abundances.He model.abundances.H\n", + "0 10000.0 0.0 0.00\n", + "1 10000.0 0.1 0.00\n", + "2 10000.0 0.2 0.00\n", + "3 10000.0 0.3 0.00\n", + "4 10000.0 0.4 0.00\n", + ".. ... ... ...\n", + "195 14000.0 0.5 0.75\n", + "196 14000.0 0.6 0.75\n", + "197 14000.0 0.7 0.75\n", + "198 14000.0 0.8 0.75\n", + "199 14000.0 0.9 0.75\n", + "\n", + "[200 rows x 3 columns]" + ] + }, + "execution_count": 122, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "from sklearn.model_selection import ParameterGrid" + "grid.grid" ] }, { @@ -145,7 +266,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.7.8" } }, "nbformat": 4, From bb4c6802f0df7332b76b6591440cd7ff2b979347 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Mon, 14 Dec 2020 11:02:05 -0500 Subject: [PATCH 03/19] config changes --- tardis/grid/tardis_grid.ipynb | 493 ++++++++++++++++++++++++++++++++-- 1 file changed, 478 insertions(+), 15 deletions(-) diff --git a/tardis/grid/tardis_grid.ipynb b/tardis/grid/tardis_grid.ipynb index be6c15990f4..39c0fedcc03 100644 --- a/tardis/grid/tardis_grid.ipynb +++ b/tardis/grid/tardis_grid.ipynb @@ -2,14 +2,14 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", + "/Users/marcwilliamson/miniconda3/envs/tardis/lib/python3.6/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", " return f(*args, **kwds)\n" ] } @@ -17,14 +17,14 @@ "source": [ "import pandas as pd\n", "import numpy as np\n", - "import sklearn\n", + "\n", "\n", "from tardis.io.config_reader import Configuration" ] }, { "cell_type": "code", - "execution_count": 118, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -40,6 +40,13 @@ " gridpoints = tmp.reshape((dim, len(axes)), order='F')\n", " return gridpoints\n", "\n", + "def setconfigitem(tardisconfig, key, value):\n", + " keyitems = key.split('.')\n", + " val = self.tardisconfig[keyitems[0]]\n", + " for k in keyitems[1:]:\n", + " val = val[k]\n", + " \n", + "\n", "class tardisGrid:\n", " \n", " def __init__(self, config, axesdict):\n", @@ -48,7 +55,8 @@ " except TypeError:\n", " tardis_config = Configuration.from_config_dict(config)\n", "\n", - " self.config = tardis_config\n", + " self.tardisconfig = tardis_config\n", + " self.config = config\n", " self.axesdict = axesdict\n", " \n", " gridpoints = constructGrid(self.axesdict)\n", @@ -58,15 +66,21 @@ " \n", " def getconfigitem(self, key):\n", " keyitems = key.split('.')\n", - " val = self.config[keyitems[0]]\n", + " val = self.tardisconfig[keyitems[0]]\n", " for k in keyitems[1:]:\n", " val = val[k]\n", - " return val" + " return val\n", + " \n", + " \n", + " def tardis_config_from_row(row_index):\n", + " tardis_config = Configuration.from_yaml(self.config)\n", + " for col in self.grid.columns:\n", + " " ] }, { "cell_type": "code", - "execution_count": 119, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -76,7 +90,7 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -85,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -97,7 +111,7 @@ "" ] }, - "execution_count": 121, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -108,7 +122,7 @@ }, { "cell_type": "code", - "execution_count": 122, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -169,12 +183,312 @@ " 0.00\n", " \n", " \n", + " 5\n", + " 10000.0\n", + " 0.5\n", + " 0.00\n", + " \n", + " \n", + " 6\n", + " 10000.0\n", + " 0.6\n", + " 0.00\n", + " \n", + " \n", + " 7\n", + " 10000.0\n", + " 0.7\n", + " 0.00\n", + " \n", + " \n", + " 8\n", + " 10000.0\n", + " 0.8\n", + " 0.00\n", + " \n", + " \n", + " 9\n", + " 10000.0\n", + " 0.9\n", + " 0.00\n", + " \n", + " \n", + " 10\n", + " 11000.0\n", + " 0.0\n", + " 0.00\n", + " \n", + " \n", + " 11\n", + " 11000.0\n", + " 0.1\n", + " 0.00\n", + " \n", + " \n", + " 12\n", + " 11000.0\n", + " 0.2\n", + " 0.00\n", + " \n", + " \n", + " 13\n", + " 11000.0\n", + " 0.3\n", + " 0.00\n", + " \n", + " \n", + " 14\n", + " 11000.0\n", + " 0.4\n", + " 0.00\n", + " \n", + " \n", + " 15\n", + " 11000.0\n", + " 0.5\n", + " 0.00\n", + " \n", + " \n", + " 16\n", + " 11000.0\n", + " 0.6\n", + " 0.00\n", + " \n", + " \n", + " 17\n", + " 11000.0\n", + " 0.7\n", + " 0.00\n", + " \n", + " \n", + " 18\n", + " 11000.0\n", + " 0.8\n", + " 0.00\n", + " \n", + " \n", + " 19\n", + " 11000.0\n", + " 0.9\n", + " 0.00\n", + " \n", + " \n", + " 20\n", + " 12000.0\n", + " 0.0\n", + " 0.00\n", + " \n", + " \n", + " 21\n", + " 12000.0\n", + " 0.1\n", + " 0.00\n", + " \n", + " \n", + " 22\n", + " 12000.0\n", + " 0.2\n", + " 0.00\n", + " \n", + " \n", + " 23\n", + " 12000.0\n", + " 0.3\n", + " 0.00\n", + " \n", + " \n", + " 24\n", + " 12000.0\n", + " 0.4\n", + " 0.00\n", + " \n", + " \n", + " 25\n", + " 12000.0\n", + " 0.5\n", + " 0.00\n", + " \n", + " \n", + " 26\n", + " 12000.0\n", + " 0.6\n", + " 0.00\n", + " \n", + " \n", + " 27\n", + " 12000.0\n", + " 0.7\n", + " 0.00\n", + " \n", + " \n", + " 28\n", + " 12000.0\n", + " 0.8\n", + " 0.00\n", + " \n", + " \n", + " 29\n", + " 12000.0\n", + " 0.9\n", + " 0.00\n", + " \n", + " \n", " ...\n", " ...\n", " ...\n", " ...\n", " \n", " \n", + " 170\n", + " 12000.0\n", + " 0.0\n", + " 0.75\n", + " \n", + " \n", + " 171\n", + " 12000.0\n", + " 0.1\n", + " 0.75\n", + " \n", + " \n", + " 172\n", + " 12000.0\n", + " 0.2\n", + " 0.75\n", + " \n", + " \n", + " 173\n", + " 12000.0\n", + " 0.3\n", + " 0.75\n", + " \n", + " \n", + " 174\n", + " 12000.0\n", + " 0.4\n", + " 0.75\n", + " \n", + " \n", + " 175\n", + " 12000.0\n", + " 0.5\n", + " 0.75\n", + " \n", + " \n", + " 176\n", + " 12000.0\n", + " 0.6\n", + " 0.75\n", + " \n", + " \n", + " 177\n", + " 12000.0\n", + " 0.7\n", + " 0.75\n", + " \n", + " \n", + " 178\n", + " 12000.0\n", + " 0.8\n", + " 0.75\n", + " \n", + " \n", + " 179\n", + " 12000.0\n", + " 0.9\n", + " 0.75\n", + " \n", + " \n", + " 180\n", + " 13000.0\n", + " 0.0\n", + " 0.75\n", + " \n", + " \n", + " 181\n", + " 13000.0\n", + " 0.1\n", + " 0.75\n", + " \n", + " \n", + " 182\n", + " 13000.0\n", + " 0.2\n", + " 0.75\n", + " \n", + " \n", + " 183\n", + " 13000.0\n", + " 0.3\n", + " 0.75\n", + " \n", + " \n", + " 184\n", + " 13000.0\n", + " 0.4\n", + " 0.75\n", + " \n", + " \n", + " 185\n", + " 13000.0\n", + " 0.5\n", + " 0.75\n", + " \n", + " \n", + " 186\n", + " 13000.0\n", + " 0.6\n", + " 0.75\n", + " \n", + " \n", + " 187\n", + " 13000.0\n", + " 0.7\n", + " 0.75\n", + " \n", + " \n", + " 188\n", + " 13000.0\n", + " 0.8\n", + " 0.75\n", + " \n", + " \n", + " 189\n", + " 13000.0\n", + " 0.9\n", + " 0.75\n", + " \n", + " \n", + " 190\n", + " 14000.0\n", + " 0.0\n", + " 0.75\n", + " \n", + " \n", + " 191\n", + " 14000.0\n", + " 0.1\n", + " 0.75\n", + " \n", + " \n", + " 192\n", + " 14000.0\n", + " 0.2\n", + " 0.75\n", + " \n", + " \n", + " 193\n", + " 14000.0\n", + " 0.3\n", + " 0.75\n", + " \n", + " \n", + " 194\n", + " 14000.0\n", + " 0.4\n", + " 0.75\n", + " \n", + " \n", " 195\n", " 14000.0\n", " 0.5\n", @@ -216,7 +530,57 @@ "2 10000.0 0.2 0.00\n", "3 10000.0 0.3 0.00\n", "4 10000.0 0.4 0.00\n", + "5 10000.0 0.5 0.00\n", + "6 10000.0 0.6 0.00\n", + "7 10000.0 0.7 0.00\n", + "8 10000.0 0.8 0.00\n", + "9 10000.0 0.9 0.00\n", + "10 11000.0 0.0 0.00\n", + "11 11000.0 0.1 0.00\n", + "12 11000.0 0.2 0.00\n", + "13 11000.0 0.3 0.00\n", + "14 11000.0 0.4 0.00\n", + "15 11000.0 0.5 0.00\n", + "16 11000.0 0.6 0.00\n", + "17 11000.0 0.7 0.00\n", + "18 11000.0 0.8 0.00\n", + "19 11000.0 0.9 0.00\n", + "20 12000.0 0.0 0.00\n", + "21 12000.0 0.1 0.00\n", + "22 12000.0 0.2 0.00\n", + "23 12000.0 0.3 0.00\n", + "24 12000.0 0.4 0.00\n", + "25 12000.0 0.5 0.00\n", + "26 12000.0 0.6 0.00\n", + "27 12000.0 0.7 0.00\n", + "28 12000.0 0.8 0.00\n", + "29 12000.0 0.9 0.00\n", ".. ... ... ...\n", + "170 12000.0 0.0 0.75\n", + "171 12000.0 0.1 0.75\n", + "172 12000.0 0.2 0.75\n", + "173 12000.0 0.3 0.75\n", + "174 12000.0 0.4 0.75\n", + "175 12000.0 0.5 0.75\n", + "176 12000.0 0.6 0.75\n", + "177 12000.0 0.7 0.75\n", + "178 12000.0 0.8 0.75\n", + "179 12000.0 0.9 0.75\n", + "180 13000.0 0.0 0.75\n", + "181 13000.0 0.1 0.75\n", + "182 13000.0 0.2 0.75\n", + "183 13000.0 0.3 0.75\n", + "184 13000.0 0.4 0.75\n", + "185 13000.0 0.5 0.75\n", + "186 13000.0 0.6 0.75\n", + "187 13000.0 0.7 0.75\n", + "188 13000.0 0.8 0.75\n", + "189 13000.0 0.9 0.75\n", + "190 14000.0 0.0 0.75\n", + "191 14000.0 0.1 0.75\n", + "192 14000.0 0.2 0.75\n", + "193 14000.0 0.3 0.75\n", + "194 14000.0 0.4 0.75\n", "195 14000.0 0.5 0.75\n", "196 14000.0 0.6 0.75\n", "197 14000.0 0.7 0.75\n", @@ -226,7 +590,7 @@ "[200 rows x 3 columns]" ] }, - "execution_count": 122, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -237,9 +601,108 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['model.structure.velocity.start', 'model.abundances.He',\n", + " 'model.abundances.H'],\n", + " dtype='object')" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "grid.grid.columns" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'type': 'specific',\n", + " 'velocity': {'start': ,\n", + " 'stop': ,\n", + " 'num': 20},\n", + " 'density': {'type': 'branch85_w7',\n", + " 'w7_time_0': ,\n", + " 'w7_rho_0': ,\n", + " 'w7_v_0': }}" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "grid.tardisconfig['model']['structure']" + ] + }, + { + "cell_type": "code", + "execution_count": 30, "metadata": {}, "outputs": [], + "source": [ + "a={'a':{'b':2}}" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a['a']['b']" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [], + "source": [ + "l=['a','b']" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "ename": "TypeError", + "evalue": "eval() arg 1 must be a string, bytes or code object", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0meval\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ml\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m: eval() arg 1 must be a string, bytes or code object" + ] + } + ], "source": [] }, { @@ -266,7 +729,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.8" + "version": "3.6.7" } }, "nbformat": 4, From 0c2d3be90e97f395897ed81f0460345a8fc6a28d Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Fri, 26 Feb 2021 09:10:35 -0500 Subject: [PATCH 04/19] added grid module --- tardis/grid/tardis_grid.ipynb | 1402 ++++++++++++++++++++++----------- tardis/grid/tardisgrid.py | 62 ++ 2 files changed, 991 insertions(+), 473 deletions(-) create mode 100644 tardis/grid/tardisgrid.py diff --git a/tardis/grid/tardis_grid.ipynb b/tardis/grid/tardis_grid.ipynb index 39c0fedcc03..d80a512793f 100644 --- a/tardis/grid/tardis_grid.ipynb +++ b/tardis/grid/tardis_grid.ipynb @@ -2,14 +2,14 @@ "cells": [ { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/Users/marcwilliamson/miniconda3/envs/tardis/lib/python3.6/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", + "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", " return f(*args, **kwds)\n" ] } @@ -17,70 +17,78 @@ "source": [ "import pandas as pd\n", "import numpy as np\n", - "\n", + "import copy\n", + "import tardis\n", "\n", "from tardis.io.config_reader import Configuration" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ - "def constructGrid(axesdict):\n", - " axes = []\n", - " dim = 1\n", - " for key in axesdict:\n", - " ax = axesdict[key]\n", - " axes.append(ax)\n", - " dim = dim * len(ax)\n", - " axesmesh = np.meshgrid(*axes)\n", - " tmp = np.dstack(axesmesh)\n", - " gridpoints = tmp.reshape((dim, len(axes)), order='F')\n", - " return gridpoints\n", - "\n", - "def setconfigitem(tardisconfig, key, value):\n", + "def set_tardis_config_property(tardis_config, key, value):\n", " keyitems = key.split('.')\n", - " val = self.tardisconfig[keyitems[0]]\n", - " for k in keyitems[1:]:\n", - " val = val[k]\n", + " tmp_dict = getattr(tardis_config, keyitems[0])\n", + " for key in keyitems[1:-1]:\n", + " tmp_dict = getattr(tmp_dict, key)\n", + " setattr(tmp_dict, keyitems[-1], value)\n", + " return\n", " \n", "\n", "class tardisGrid:\n", " \n", - " def __init__(self, config, axesdict):\n", + " def __init__(self, configFile, gridFrame):\n", " try:\n", - " tardis_config = Configuration.from_yaml(config)\n", + " tardis_config = Configuration.from_yaml(configFile)\n", " except TypeError:\n", - " tardis_config = Configuration.from_config_dict(config)\n", - "\n", - " self.tardisconfig = tardis_config\n", - " self.config = config\n", - " self.axesdict = axesdict\n", - " \n", - " gridpoints = constructGrid(self.axesdict)\n", - " self.grid = pd.DataFrame(data=gridpoints, columns=self.axesdict.keys())\n", + " tardis_config = Configuration.from_config_dict(configFile)\n", + " \n", + " self.config = tardis_config\n", + " self.grid = gridFrame\n", " \n", " return\n", " \n", - " def getconfigitem(self, key):\n", - " keyitems = key.split('.')\n", - " val = self.tardisconfig[keyitems[0]]\n", - " for k in keyitems[1:]:\n", - " val = val[k]\n", - " return val\n", + " def grid_row_to_config(self, row_index):\n", + " tmp_config = copy.deepcopy(self.config)\n", + " grid_row = self.grid.iloc[row_index]\n", + " for colname, value in zip(self.grid.columns, grid_row.values):\n", + " set_tardis_config_property(tmp_config, colname, value)\n", + " return tmp_config\n", + " \n", + " \n", + " def run_sim_from_grid(self, row_index):\n", + " tardis_config = self.grid_row_to_config(row_index)\n", + " tardis_config.pop('config_dirname')\n", + " sim = tardis.run_tardis(tardis_config)\n", + " return sim\n", " \n", + " def save_grid(self, filename):\n", + " self.grid.to_csv(filename, index=False)\n", + " return\n", " \n", - " def tardis_config_from_row(row_index):\n", - " tardis_config = Configuration.from_yaml(self.config)\n", - " for col in self.grid.columns:\n", - " " + " @classmethod\n", + " def from_axes(cls, configFile, axesdict):\n", + " axes = []\n", + " dim = 1\n", + " for key in axesdict:\n", + " ax = axesdict[key]\n", + " axes.append(ax)\n", + " dim = dim * len(ax)\n", + " axesmesh = np.meshgrid(*axes)\n", + " tmp = np.dstack(axesmesh)\n", + " gridpoints = tmp.reshape((dim, len(axes)), order='F')\n", + " df = pd.DataFrame(data=gridpoints, columns=axesdict.keys())\n", + " return cls(configFile=configFile, gridFrame=df)\n", + " \n", + " " ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -90,39 +98,16 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ - "grid = tardisGrid('test.yml', axesdict)" + "grid = tardisGrid.from_axes('test.yml', axesdict)" ] }, { "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "data": { - "text/latex": [ - "$10000 \\; \\mathrm{\\frac{km}{s}}$" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "grid.getconfigitem('model.structure.velocity.start')" - ] - }, - { - "cell_type": "code", - "execution_count": 20, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -183,312 +168,12 @@ " 0.00\n", " \n", " \n", - " 5\n", - " 10000.0\n", - " 0.5\n", - " 0.00\n", - " \n", - " \n", - " 6\n", - " 10000.0\n", - " 0.6\n", - " 0.00\n", - " \n", - " \n", - " 7\n", - " 10000.0\n", - " 0.7\n", - " 0.00\n", - " \n", - " \n", - " 8\n", - " 10000.0\n", - " 0.8\n", - " 0.00\n", - " \n", - " \n", - " 9\n", - " 10000.0\n", - " 0.9\n", - " 0.00\n", - " \n", - " \n", - " 10\n", - " 11000.0\n", - " 0.0\n", - " 0.00\n", - " \n", - " \n", - " 11\n", - " 11000.0\n", - " 0.1\n", - " 0.00\n", - " \n", - " \n", - " 12\n", - " 11000.0\n", - " 0.2\n", - " 0.00\n", - " \n", - " \n", - " 13\n", - " 11000.0\n", - " 0.3\n", - " 0.00\n", - " \n", - " \n", - " 14\n", - " 11000.0\n", - " 0.4\n", - " 0.00\n", - " \n", - " \n", - " 15\n", - " 11000.0\n", - " 0.5\n", - " 0.00\n", - " \n", - " \n", - " 16\n", - " 11000.0\n", - " 0.6\n", - " 0.00\n", - " \n", - " \n", - " 17\n", - " 11000.0\n", - " 0.7\n", - " 0.00\n", - " \n", - " \n", - " 18\n", - " 11000.0\n", - " 0.8\n", - " 0.00\n", - " \n", - " \n", - " 19\n", - " 11000.0\n", - " 0.9\n", - " 0.00\n", - " \n", - " \n", - " 20\n", - " 12000.0\n", - " 0.0\n", - " 0.00\n", - " \n", - " \n", - " 21\n", - " 12000.0\n", - " 0.1\n", - " 0.00\n", - " \n", - " \n", - " 22\n", - " 12000.0\n", - " 0.2\n", - " 0.00\n", - " \n", - " \n", - " 23\n", - " 12000.0\n", - " 0.3\n", - " 0.00\n", - " \n", - " \n", - " 24\n", - " 12000.0\n", - " 0.4\n", - " 0.00\n", - " \n", - " \n", - " 25\n", - " 12000.0\n", - " 0.5\n", - " 0.00\n", - " \n", - " \n", - " 26\n", - " 12000.0\n", - " 0.6\n", - " 0.00\n", - " \n", - " \n", - " 27\n", - " 12000.0\n", - " 0.7\n", - " 0.00\n", - " \n", - " \n", - " 28\n", - " 12000.0\n", - " 0.8\n", - " 0.00\n", - " \n", - " \n", - " 29\n", - " 12000.0\n", - " 0.9\n", - " 0.00\n", - " \n", - " \n", " ...\n", " ...\n", " ...\n", " ...\n", " \n", " \n", - " 170\n", - " 12000.0\n", - " 0.0\n", - " 0.75\n", - " \n", - " \n", - " 171\n", - " 12000.0\n", - " 0.1\n", - " 0.75\n", - " \n", - " \n", - " 172\n", - " 12000.0\n", - " 0.2\n", - " 0.75\n", - " \n", - " \n", - " 173\n", - " 12000.0\n", - " 0.3\n", - " 0.75\n", - " \n", - " \n", - " 174\n", - " 12000.0\n", - " 0.4\n", - " 0.75\n", - " \n", - " \n", - " 175\n", - " 12000.0\n", - " 0.5\n", - " 0.75\n", - " \n", - " \n", - " 176\n", - " 12000.0\n", - " 0.6\n", - " 0.75\n", - " \n", - " \n", - " 177\n", - " 12000.0\n", - " 0.7\n", - " 0.75\n", - " \n", - " \n", - " 178\n", - " 12000.0\n", - " 0.8\n", - " 0.75\n", - " \n", - " \n", - " 179\n", - " 12000.0\n", - " 0.9\n", - " 0.75\n", - " \n", - " \n", - " 180\n", - " 13000.0\n", - " 0.0\n", - " 0.75\n", - " \n", - " \n", - " 181\n", - " 13000.0\n", - " 0.1\n", - " 0.75\n", - " \n", - " \n", - " 182\n", - " 13000.0\n", - " 0.2\n", - " 0.75\n", - " \n", - " \n", - " 183\n", - " 13000.0\n", - " 0.3\n", - " 0.75\n", - " \n", - " \n", - " 184\n", - " 13000.0\n", - " 0.4\n", - " 0.75\n", - " \n", - " \n", - " 185\n", - " 13000.0\n", - " 0.5\n", - " 0.75\n", - " \n", - " \n", - " 186\n", - " 13000.0\n", - " 0.6\n", - " 0.75\n", - " \n", - " \n", - " 187\n", - " 13000.0\n", - " 0.7\n", - " 0.75\n", - " \n", - " \n", - " 188\n", - " 13000.0\n", - " 0.8\n", - " 0.75\n", - " \n", - " \n", - " 189\n", - " 13000.0\n", - " 0.9\n", - " 0.75\n", - " \n", - " \n", - " 190\n", - " 14000.0\n", - " 0.0\n", - " 0.75\n", - " \n", - " \n", - " 191\n", - " 14000.0\n", - " 0.1\n", - " 0.75\n", - " \n", - " \n", - " 192\n", - " 14000.0\n", - " 0.2\n", - " 0.75\n", - " \n", - " \n", - " 193\n", - " 14000.0\n", - " 0.3\n", - " 0.75\n", - " \n", - " \n", - " 194\n", - " 14000.0\n", - " 0.4\n", - " 0.75\n", - " \n", - " \n", " 195\n", " 14000.0\n", " 0.5\n", @@ -530,57 +215,7 @@ "2 10000.0 0.2 0.00\n", "3 10000.0 0.3 0.00\n", "4 10000.0 0.4 0.00\n", - "5 10000.0 0.5 0.00\n", - "6 10000.0 0.6 0.00\n", - "7 10000.0 0.7 0.00\n", - "8 10000.0 0.8 0.00\n", - "9 10000.0 0.9 0.00\n", - "10 11000.0 0.0 0.00\n", - "11 11000.0 0.1 0.00\n", - "12 11000.0 0.2 0.00\n", - "13 11000.0 0.3 0.00\n", - "14 11000.0 0.4 0.00\n", - "15 11000.0 0.5 0.00\n", - "16 11000.0 0.6 0.00\n", - "17 11000.0 0.7 0.00\n", - "18 11000.0 0.8 0.00\n", - "19 11000.0 0.9 0.00\n", - "20 12000.0 0.0 0.00\n", - "21 12000.0 0.1 0.00\n", - "22 12000.0 0.2 0.00\n", - "23 12000.0 0.3 0.00\n", - "24 12000.0 0.4 0.00\n", - "25 12000.0 0.5 0.00\n", - "26 12000.0 0.6 0.00\n", - "27 12000.0 0.7 0.00\n", - "28 12000.0 0.8 0.00\n", - "29 12000.0 0.9 0.00\n", ".. ... ... ...\n", - "170 12000.0 0.0 0.75\n", - "171 12000.0 0.1 0.75\n", - "172 12000.0 0.2 0.75\n", - "173 12000.0 0.3 0.75\n", - "174 12000.0 0.4 0.75\n", - "175 12000.0 0.5 0.75\n", - "176 12000.0 0.6 0.75\n", - "177 12000.0 0.7 0.75\n", - "178 12000.0 0.8 0.75\n", - "179 12000.0 0.9 0.75\n", - "180 13000.0 0.0 0.75\n", - "181 13000.0 0.1 0.75\n", - "182 13000.0 0.2 0.75\n", - "183 13000.0 0.3 0.75\n", - "184 13000.0 0.4 0.75\n", - "185 13000.0 0.5 0.75\n", - "186 13000.0 0.6 0.75\n", - "187 13000.0 0.7 0.75\n", - "188 13000.0 0.8 0.75\n", - "189 13000.0 0.9 0.75\n", - "190 14000.0 0.0 0.75\n", - "191 14000.0 0.1 0.75\n", - "192 14000.0 0.2 0.75\n", - "193 14000.0 0.3 0.75\n", - "194 14000.0 0.4 0.75\n", "195 14000.0 0.5 0.75\n", "196 14000.0 0.6 0.75\n", "197 14000.0 0.7 0.75\n", @@ -590,7 +225,7 @@ "[200 rows x 3 columns]" ] }, - "execution_count": 20, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -601,108 +236,929 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "newconfig = grid.grid_row_to_config(195)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "Index(['model.structure.velocity.start', 'model.abundances.He',\n", - " 'model.abundances.H'],\n", - " dtype='object')" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "{'type': 'uniform', 'He': 0.5, 'H': 0.75, 'N': 0.05, 'Fe': 0.015, 'O': 0.0, 'Ni': 0.2505, 'C': 0.008, 'Si': 0.001, 'Ca': 0.0102}\n", + "{'type': 'uniform', 'He': 0.6658, 'H': 0.0, 'N': 0.05, 'Fe': 0.015, 'O': 0.0, 'Ni': 0.2505, 'C': 0.008, 'Si': 0.001, 'Ca': 0.0102}\n" + ] } ], "source": [ - "grid.grid.columns" + "print(newconfig.model.abundances)\n", + "print(grid.config.model.abundances)" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 12, "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "{'type': 'specific',\n", - " 'velocity': {'start': ,\n", - " 'stop': ,\n", - " 'num': 20},\n", - " 'density': {'type': 'branch85_w7',\n", - " 'w7_time_0': ,\n", - " 'w7_rho_0': ,\n", - " 'w7_v_0': }}" - ] - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mtardis.model.base \u001b[0m][\u001b[1;33mWARNING\u001b[0m] Abundances have not been normalized to 1. - normalizing (\u001b[1mbase.py\u001b[0m:440)\n", + "[\u001b[1mtardis.plasma.standard_plasmas\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Reading Atomic Data from /Users/marcwilliamson/Research/TARDIS/tardis-refdata/atom_data/kurucz_cd23_chianti_H_He.h5 (\u001b[1mstandard_plasmas.py\u001b[0m:87)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/ipykernel_launcher.py:1: PerformanceWarning: indexing past lexsort depth may impact performance.\n", + " \"\"\"Entry point for launching an IPython kernel.\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mtardis.io.atom_data.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Read Atom Data with UUID=6f7b09e887a311e7a06b246e96350010 and MD5=864f1753714343c41f99cb065710cace. (\u001b[1mbase.py\u001b[0m:172)\n", + "[\u001b[1mtardis.io.atom_data.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Non provided atomic data: synpp_refs, photoionization_data (\u001b[1mbase.py\u001b[0m:178)\n", + "[\u001b[1mtardis.plasma.properties.atomic\u001b[0m][\u001b[1;33mWARNING\u001b[0m] Zeta_data missing - replaced with 1s. Missing ions: [(14, 15), (20, 21), (26, 27), (28, 29)] (\u001b[1matomic.py\u001b[0m:257)\n", + "[\u001b[1mtardis.plasma.properties.atomic\u001b[0m][\u001b[1;33mWARNING\u001b[0m] Zeta_data missing - replaced with 1s. Missing ions: [(14, 15), (20, 21), (26, 27), (28, 29)] (\u001b[1matomic.py\u001b[0m:257)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 1/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/interaction.py\", line 21:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef thomson_scatter(r_packet, time_explosion):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/interaction.py\", line 54:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef line_scatter(r_packet, time_explosion, line_interaction_type, numba_plasma):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 342:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef trace_packet(r_packet, numba_model, numba_plasma, estimators):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 497:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef move_r_packet(r_packet, distance, time_explosion, numba_estimator):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 569:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef move_packet_across_shell_boundary(packet, delta_shell, no_of_shells):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/vpacket.py\", line 193:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef trace_vpacket_volley(\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/interaction.py\", line 88:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef line_emission(r_packet, emission_line_id, time_explosion, numba_plasma):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/macro_atom.py\", line 22:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef macro_atom(r_packet, numba_plasma):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 130:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calculate_distance_line(\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 206:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calculate_distance_electron(electron_density, tau_event):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 233:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef get_doppler_factor(r, mu, time_explosion):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 254:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef get_inverse_doppler_factor(r, mu, time_explosion):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 284:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef get_random_mu():\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 289:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef update_line_estimators(\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 544:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef set_estimators(r_packet, distance, numba_estimator, comov_nu, comov_energy):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 557:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef set_estimators_full_relativity(\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 597:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef angle_aberration_CMF_to_LF(r_packet, time_explosion, mu):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 608:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef angle_aberration_LF_to_CMF(r_packet, time_explosion, mu):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 621:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef test_for_close_line(r_packet, line_id, nu_line, numba_plasma):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/vpacket.py\", line 138:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef trace_vpacket(v_packet, numba_model, numba_plasma):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 181:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calculate_distance_line_full_relativity(\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 244:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef get_doppler_factor_partial_relativity(mu, beta):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 249:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef get_doppler_factor_full_relativity(mu, beta):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 274:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef get_inverse_doppler_factor_partial_relativity(mu, beta):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 279:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef get_inverse_doppler_factor_full_relativity(mu, beta):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 326:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calc_packet_energy_full_relativity(r_packet):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 332:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calc_packet_energy(r_packet, distance_trace, time_explosion):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 569:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef move_packet_across_shell_boundary(packet, delta_shell, no_of_shells):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/vpacket.py\", line 62:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef trace_vpacket_within_shell(v_packet, numba_model, numba_plasma):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 130:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calculate_distance_line(\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 220:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calculate_tau_electron(electron_density, distance):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 86:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calculate_distance_boundary(r, mu, r_inner, r_outer):\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", + "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", + "\n", + "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", + "\u001b[1m\n", + "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 181:\u001b[0m\n", + "\u001b[1m@njit(**njit_dict)\n", + "\u001b[1mdef calculate_distance_line_full_relativity(\n", + "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", + "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", + " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 7.92183e+41 erg / s Luminosity absorbed = 8.27209e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 6996.499329 7349.490364 0.427390 0.456755\n", + "\t5 6961.684230 7421.633545 0.276535 0.253515\n", + "\t10 6927.213900 7308.543382 0.211205 0.181286\n", + "\t15 6893.083244 7017.562145 0.169661 0.145029\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 7000.000 K -- next t_inner 6463.406 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 2/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.47283e+41 erg / s Luminosity absorbed = 6.13378e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7349.490364 7280.057555 0.456755 0.463605\n", + "\t5 7421.633545 7511.777399 0.253515 0.227786\n", + "\t10 7308.543382 7395.724036 0.181286 0.151817\n", + "\t15 7017.562145 7004.314505 0.145029 0.118845\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6463.406 K -- next t_inner 6523.715 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 3/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.67616e+41 erg / s Luminosity absorbed = 6.41029e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7280.057555 7286.627850 0.463605 0.467261\n", + "\t5 7511.777399 7603.816722 0.227786 0.212858\n", + "\t10 7395.724036 7536.425746 0.151817 0.133557\n", + "\t15 7004.314505 7015.579172 0.118845 0.105709\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6523.715 K -- next t_inner 6524.531 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 4/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.71835e+41 erg / s Luminosity absorbed = 6.39362e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7286.627850 7294.175454 0.467261 0.467411\n", + "\t5 7603.816722 7698.527537 0.212858 0.203341\n", + "\t10 7536.425746 7588.006687 0.133557 0.124956\n", + "\t15 7015.579172 7056.900874 0.105709 0.096968\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6524.531 K -- next t_inner 6513.288 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 5/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68517e+41 erg / s Luminosity absorbed = 6.41560e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7294.175454 7257.004504 0.467411 0.476609\n", + "\t5 7698.527537 7693.931801 0.203341 0.202042\n", + "\t10 7588.006687 7567.957143 0.124956 0.122476\n", + "\t15 7056.900874 7080.109027 0.096968 0.092205\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6513.288 K -- next t_inner 6511.520 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 6/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.60855e+41 erg / s Luminosity absorbed = 6.33644e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7257.004504 7258.307219 0.476609 0.474024\n", + "\t5 7693.931801 7678.803979 0.202042 0.204688\n", + "\t10 7567.957143 7597.061739 0.122476 0.120789\n", + "\t15 7080.109027 7053.134912 0.092205 0.091919\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6511.520 K -- next t_inner 6531.906 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 7/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.61263e+41 erg / s Luminosity absorbed = 6.48085e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7258.307219 7267.632743 0.474024 0.474849\n", + "\t5 7678.803979 7711.869677 0.204688 0.199750\n", + "\t10 7597.061739 7608.899235 0.120789 0.119465\n", + "\t15 7053.134912 7072.255664 0.091919 0.089825\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6531.906 K -- next t_inner 6551.160 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 8/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.73581e+41 erg / s Luminosity absorbed = 6.57023e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7267.632743 7287.134698 0.474849 0.477064\n", + "\t5 7711.869677 7751.994159 0.199750 0.198575\n", + "\t10 7608.899235 7630.972637 0.119465 0.118624\n", + "\t15 7072.255664 7100.240486 0.089825 0.089267\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6551.160 K -- next t_inner 6534.899 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 9/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68337e+41 erg / s Luminosity absorbed = 6.43416e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 2/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7287.134698 7292.490423 0.477064 0.475907\n", + "\t5 7751.994159 7753.448845 0.198575 0.198668\n", + "\t10 7630.972637 7625.595562 0.118624 0.118831\n", + "\t15 7100.240486 7091.420916 0.089267 0.088621\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6534.899 K -- next t_inner 6533.643 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 10/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.73870e+41 erg / s Luminosity absorbed = 6.42273e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7292.490423 7283.098423 0.475907 0.476797\n", + "\t5 7753.448845 7754.507037 0.198668 0.198592\n", + "\t10 7625.595562 7600.612088 0.118831 0.119891\n", + "\t15 7091.420916 7184.091547 0.088621 0.084498\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6533.643 K -- next t_inner 6516.605 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 11/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.64107e+41 erg / s Luminosity absorbed = 6.37373e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7283.098423 7268.586773 0.476797 0.477291\n", + "\t5 7754.507037 7729.016674 0.198592 0.199526\n", + "\t10 7600.612088 7581.799768 0.119891 0.120435\n", + "\t15 7184.091547 7161.096924 0.084498 0.084749\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6516.605 K -- next t_inner 6527.540 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 12/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.59421e+41 erg / s Luminosity absorbed = 6.48924e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7268.586773 7275.898266 0.477291 0.475630\n", + "\t5 7729.016674 7725.848240 0.199526 0.199523\n", + "\t10 7581.799768 7612.233112 0.120435 0.118086\n", + "\t15 7161.096924 7192.886909 0.084749 0.082936\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6527.540 K -- next t_inner 6552.181 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 13/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.70806e+41 erg / s Luminosity absorbed = 6.56171e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7275.898266 7297.320605 0.475630 0.473261\n", + "\t5 7725.848240 7740.784851 0.199523 0.200228\n", + "\t10 7612.233112 7605.616035 0.118086 0.119467\n", + "\t15 7192.886909 7139.106568 0.082936 0.086149\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6552.181 K -- next t_inner 6543.830 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 14/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.71210e+41 erg / s Luminosity absorbed = 6.48187e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7297.320605 7279.506950 0.473261 0.477163\n", + "\t5 7740.784851 7738.982356 0.200228 0.201584\n", + "\t10 7605.616035 7610.088876 0.119467 0.120119\n", + "\t15 7139.106568 7164.904123 0.086149 0.085933\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6543.830 K -- next t_inner 6534.336 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 15/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.72245e+41 erg / s Luminosity absorbed = 6.46690e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7279.506950 7280.808946 0.477163 0.478163\n", + "\t5 7738.982356 7738.510409 0.201584 0.200897\n", + "\t10 7610.088876 7636.499177 0.120119 0.118251\n", + "\t15 7164.904123 7141.326964 0.085933 0.086785\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6534.336 K -- next t_inner 6521.909 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 16/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.61140e+41 erg / s Luminosity absorbed = 6.48863e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7280.808946 7285.135849 0.478163 0.475635\n", + "\t5 7738.510409 7689.944493 0.200897 0.203372\n", + "\t10 7636.499177 7614.049463 0.118251 0.117519\n", + "\t15 7141.326964 7207.942077 0.086785 0.083257\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6521.909 K -- next t_inner 6541.494 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 17/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68185e+41 erg / s Luminosity absorbed = 6.52783e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7285.135849 7297.636965 0.475635 0.472922\n", + "\t5 7689.944493 7732.812013 0.203372 0.199880\n", + "\t10 7614.049463 7619.455989 0.117519 0.118843\n", + "\t15 7207.942077 7178.818268 0.083257 0.084649\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6541.494 K -- next t_inner 6540.674 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 18/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.67955e+41 erg / s Luminosity absorbed = 6.49580e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 2/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7297.636965 7296.934143 0.472922 0.472727\n", + "\t5 7732.812013 7744.923250 0.199880 0.200945\n", + "\t10 7619.455989 7688.985280 0.118843 0.115224\n", + "\t15 7178.818268 7182.769552 0.084649 0.085187\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6540.674 K -- next t_inner 6540.517 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 19/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68870e+41 erg / s Luminosity absorbed = 6.49791e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", + "\t t_rad next_t_rad w next_w\n", + "\tShell \n", + "\t0 7296.934143 7296.394657 0.472727 0.472682\n", + "\t5 7744.923250 7758.743398 0.200945 0.200026\n", + "\t10 7688.985280 7618.315463 0.115224 0.118548\n", + "\t15 7182.769552 7144.145522 0.085187 0.086512\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:436)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6540.517 K -- next t_inner 6537.729 K (\u001b[1mbase.py\u001b[0m:439)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 20/20 (\u001b[1mbase.py\u001b[0m:326)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "Running post-merge numba montecarlo (with C close lines)!\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.61190e+41 erg / s Luminosity absorbed = 6.56179e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Simulation finished in 20 iterations and took 189.73 s (\u001b[1mbase.py\u001b[0m:384)\n" + ] } ], "source": [ - "grid.tardisconfig['model']['structure']" + "sim = grid.run_sim_from_grid(195)" ] }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'tardis_config_version': 'v1.0',\n", + " 'supernova': {'luminosity_requested': ,\n", + " 'luminosity_wavelength_start': ,\n", + " 'luminosity_wavelength_end': ,\n", + " 'time_explosion': },\n", + " 'atom_data': '/Users/marcwilliamson/Research/TARDIS/tardis-refdata/atom_data/kurucz_cd23_chianti_H_He.h5',\n", + " 'model': {'structure': {'type': 'specific',\n", + " 'velocity': {'start': ,\n", + " 'stop': ,\n", + " 'num': 20},\n", + " 'density': {'type': 'branch85_w7',\n", + " 'w7_time_0': ,\n", + " 'w7_rho_0': ,\n", + " 'w7_v_0': }},\n", + " 'abundances': {'type': 'uniform',\n", + " 'He': 0.6658,\n", + " 'H': 0.0,\n", + " 'N': 0.05,\n", + " 'Fe': 0.015,\n", + " 'O': 0.0,\n", + " 'Ni': 0.2505,\n", + " 'C': 0.008,\n", + " 'Si': 0.001,\n", + " 'Ca': 0.0102}},\n", + " 'plasma': {'initial_t_inner': ,\n", + " 'disable_electron_scattering': False,\n", + " 'ionization': 'nebular',\n", + " 'excitation': 'dilute-lte',\n", + " 'radiative_rates_type': 'dilute-blackbody',\n", + " 'line_interaction_type': 'macroatom',\n", + " 'helium_treatment': 'recomb-nlte',\n", + " 'initial_t_rad': ,\n", + " 'disable_line_scattering': False,\n", + " 'w_epsilon': 1e-10,\n", + " 'nlte': {'species': [],\n", + " 'coronal_approximation': False,\n", + " 'classical_nebular': False},\n", + " 'continuum_interaction': {'species': []},\n", + " 'heating_rate_data_file': 'none'},\n", + " 'montecarlo': {'seed': 23111963,\n", + " 'no_of_packets': 40000.0,\n", + " 'iterations': 2,\n", + " 'nthreads': 1,\n", + " 'last_no_of_packets': 1000.0,\n", + " 'no_of_virtual_packets': 3,\n", + " 'convergence_strategy': {'type': 'damped',\n", + " 'damping_constant': 0.5,\n", + " 'threshold': 0.05,\n", + " 'fraction': 0.8,\n", + " 'hold_iterations': 3,\n", + " 't_inner': {'damping_constant': 0.5, 'threshold': 0.05},\n", + " 'stop_if_converged': False,\n", + " 'lock_t_inner_cycles': 1,\n", + " 't_inner_update_exponent': -0.5,\n", + " 't_rad': {'damping_constant': 0.5, 'threshold': 0.05},\n", + " 'w': {'damping_constant': 0.5, 'threshold': 0.05}},\n", + " 'virtual_spectrum_spawn_range': {'start': ,\n", + " 'end': },\n", + " 'enable_reflective_inner_boundary': False,\n", + " 'inner_boundary_albedo': 0.0,\n", + " 'enable_full_relativity': False,\n", + " 'debug_packets': False,\n", + " 'logger_buffer': 1,\n", + " 'single_packet_seed': -1},\n", + " 'spectrum': {'start': ,\n", + " 'stop': ,\n", + " 'num': 10000,\n", + " 'method': 'virtual',\n", + " 'integrated': {'points': 1000, 'interpolate_shells': -1},\n", + " 'virtual': {'tau_russian': 10.0,\n", + " 'survival_probability': 0.0,\n", + " 'enable_biasing': False,\n", + " 'virtual_packet_logging': False}},\n", + " 'config_dirname': ''}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "a={'a':{'b':2}}" + "grid.config" ] }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 7, "metadata": {}, "outputs": [ { "data": { + "text/latex": [ + "$7000 \\; \\mathrm{K}$" + ], "text/plain": [ - "2" + "" ] }, - "execution_count": 32, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "a['a']['b']" + "grid.config.plasma.initial_t_inner" ] }, { "cell_type": "code", - "execution_count": 33, + "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "l=['a','b']" - ] + "source": [] }, { "cell_type": "code", - "execution_count": 37, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "eval() arg 1 must be a string, bytes or code object", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0meval\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ml\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m: eval() arg 1 must be a string, bytes or code object" - ] - } - ], + "outputs": [], "source": [] }, { @@ -729,7 +1185,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.7.9" } }, "nbformat": 4, diff --git a/tardis/grid/tardisgrid.py b/tardis/grid/tardisgrid.py new file mode 100644 index 00000000000..33e7e9a614c --- /dev/null +++ b/tardis/grid/tardisgrid.py @@ -0,0 +1,62 @@ +import pandas as pd +import numpy as np +import copy +import tardis + +from tardis.io.config_reader import Configuration + +def set_tardis_config_property(tardis_config, key, value): + keyitems = key.split('.') + tmp_dict = getattr(tardis_config, keyitems[0]) + for key in keyitems[1:-1]: + tmp_dict = getattr(tmp_dict, key) + setattr(tmp_dict, keyitems[-1], value) + return + + +class tardisGrid: + + def __init__(self, configFile, gridFrame): + try: + tardis_config = Configuration.from_yaml(configFile) + except TypeError: + tardis_config = Configuration.from_config_dict(configFile) + + self.config = tardis_config + self.grid = gridFrame + + return + + def grid_row_to_config(self, row_index): + tmp_config = copy.deepcopy(self.config) + grid_row = self.grid.iloc[row_index] + for colname, value in zip(self.grid.columns, grid_row.values): + set_tardis_config_property(tmp_config, colname, value) + return tmp_config + + + def run_sim_from_grid(self, row_index): + tardis_config = self.grid_row_to_config(row_index) + tardis_config.pop('config_dirname') + sim = tardis.run_tardis(tardis_config) + return sim + + def save_grid(self, filename): + self.grid.to_csv(filename, index=False) + return + + @classmethod + def from_axes(cls, configFile, axesdict): + axes = [] + dim = 1 + for key in axesdict: + ax = axesdict[key] + axes.append(ax) + dim = dim * len(ax) + axesmesh = np.meshgrid(*axes) + tmp = np.dstack(axesmesh) + gridpoints = tmp.reshape((dim, len(axes)), order='F') + df = pd.DataFrame(data=gridpoints, columns=axesdict.keys()) + return cls(configFile=configFile, gridFrame=df) + + From 7ee101e2ee3e68027b3303d2b49bbc81663db258 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Fri, 26 Feb 2021 09:12:41 -0500 Subject: [PATCH 05/19] updated test --- tardis/grid/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tardis/grid/test.yml b/tardis/grid/test.yml index b66aa28cfe7..89a627c3e0d 100644 --- a/tardis/grid/test.yml +++ b/tardis/grid/test.yml @@ -44,11 +44,11 @@ plasma: montecarlo: seed: 23111963 no_of_packets: 4.0e+4 - iterations: 20 - nthreads: 16 + iterations: 2 + nthreads: 1 - last_no_of_packets: 1.e+5 - no_of_virtual_packets: 10 + last_no_of_packets: 1.e+3 + no_of_virtual_packets: 3 convergence_strategy: type: damped From 792807f15c01d7a35e0606dd144601889039648a Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Thu, 15 Jul 2021 13:47:07 -0400 Subject: [PATCH 06/19] added docstrings --- tardis/grid/tardisgrid.py | 122 +++++++++++++++++++++++++++++++++----- 1 file changed, 108 insertions(+), 14 deletions(-) diff --git a/tardis/grid/tardisgrid.py b/tardis/grid/tardisgrid.py index 33e7e9a614c..2ce35f13012 100644 --- a/tardis/grid/tardisgrid.py +++ b/tardis/grid/tardisgrid.py @@ -5,48 +5,141 @@ from tardis.io.config_reader import Configuration -def set_tardis_config_property(tardis_config, key, value): + +def _set_tardis_config_property(tardis_config, key, value): + """ + Sets tardis_config[key] = value for a TARDIS config + dictionary. Recursively searches for the deepest + dictionary and sets the corresponding value. + + Parameters + ---------- + tardis_config : tardis.io.config_reader.Configuration + The config where the key,value pair should be set. + key : str + The key in the tardis_config. Should be of the format + 'property.property.property' + value : object + The value to assign to the config dict for the + corresponding key. + """ keyitems = key.split('.') tmp_dict = getattr(tardis_config, keyitems[0]) for key in keyitems[1:-1]: tmp_dict = getattr(tmp_dict, key) setattr(tmp_dict, keyitems[-1], value) return - + class tardisGrid: - + """ + A class that stores a grid of TARDIS parameters and + facilitates running large numbers of simulations + easily. + + Parameters + ---------- + configFile : str + path to TARDIS yml file. + gridFrame : pandas.core.frame.DataFrame + dataframe where each row is a set of parameters for + a TARDIS simulation. + + Attributes + ---------- + config : tardis.io.config_reader.Configuration + The validated config dict read from the user provided + configFile. This provides the base properties for the + TARDIS simulation which the rows of the grid modify. + grid : pandas.core.frame.DataFrame + Dataframe where each row is a set of parameters for + a TARDIS simulation. + """ + def __init__(self, configFile, gridFrame): try: tardis_config = Configuration.from_yaml(configFile) except TypeError: tardis_config = Configuration.from_config_dict(configFile) - + self.config = tardis_config self.grid = gridFrame - + return - + def grid_row_to_config(self, row_index): + """ + Converts a grid row to a TARDIS config dict. + Modifies the base self.config according to the + row in self.grid accessed at the provided row_index. + Returns a deep copy so that the base config is + not changed. + + Parameters + ---------- + row_index : int + Row index in grid. + + Returns + ------- + tmp_config : tardis.io.config_reader.Configuration + Deep copy of the base self.config with modified + properties according to the selected row in the grid. + """ tmp_config = copy.deepcopy(self.config) grid_row = self.grid.iloc[row_index] for colname, value in zip(self.grid.columns, grid_row.values): - set_tardis_config_property(tmp_config, colname, value) + _set_tardis_config_property(tmp_config, colname, value) return tmp_config - - + def run_sim_from_grid(self, row_index): + """ + Runs a full TARDIS simulation using the base self.config + modified by the user specified row_index. + + Parameters + ---------- + row_index : int + Row index in grid. + + Returns + ------- + sim : tardis.simulation.base.Simulation + Completed TARDIS simulation object. + """ tardis_config = self.grid_row_to_config(row_index) - tardis_config.pop('config_dirname') sim = tardis.run_tardis(tardis_config) return sim - + def save_grid(self, filename): + """ + Saves the parameter grid. Does not save the base + self.config in any way. + + Parameters + ---------- + filename : str + File name to save grid. + """ self.grid.to_csv(filename, index=False) return - + @classmethod def from_axes(cls, configFile, axesdict): + """ + Creates a grid from a set of axes. The axes are provided + as a dictionary, where each key is a valid tardis config + key, and the value is an iterable of values. + + Parameters + ---------- + configFile : str + Path to TARDIS yml file. + axesdict : dict() + Dictionary containing tardis config keys and the + corresponding values to define a grid of tardis + parameters. + """ axes = [] dim = 1 for key in axesdict: @@ -58,5 +151,6 @@ def from_axes(cls, configFile, axesdict): gridpoints = tmp.reshape((dim, len(axes)), order='F') df = pd.DataFrame(data=gridpoints, columns=axesdict.keys()) return cls(configFile=configFile, gridFrame=df) - - + + + From 9d3a2487a3b340423fdca47ddc77e3d302750129 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Thu, 15 Jul 2021 13:58:07 -0400 Subject: [PATCH 07/19] Added grid_row_to_model() class function. --- tardis/grid/tardisgrid.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tardis/grid/tardisgrid.py b/tardis/grid/tardisgrid.py index 2ce35f13012..e0286b5336f 100644 --- a/tardis/grid/tardisgrid.py +++ b/tardis/grid/tardisgrid.py @@ -4,6 +4,7 @@ import tardis from tardis.io.config_reader import Configuration +from tardis.model import Radial1DModel def _set_tardis_config_property(tardis_config, key, value): @@ -92,6 +93,24 @@ def grid_row_to_config(self, row_index): _set_tardis_config_property(tmp_config, colname, value) return tmp_config + def grid_row_to_model(self, row_index): + """ + Generates a TARDIS Radial1DModel object using the base + self.config modified by the specified grid row. + + Parameters + ---------- + row_index : int + Row index in grid. + + Returns + ------- + model : tardis.model.base.Radial1DModel + """ + rowconfig = self.grid_row_to_config(row_index) + model = Radial1DModel.from_config(rowconfig) + return model + def run_sim_from_grid(self, row_index): """ Runs a full TARDIS simulation using the base self.config From beaa2c587ffc56716098bd50fe6570bd71add15f Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Fri, 16 Jul 2021 15:02:46 -0400 Subject: [PATCH 08/19] Added docs for grid [build docs] --- docs/io/grid/TardisGridTutorial.ipynb | 518 +++++++++++ docs/io/grid/example.yml | 57 ++ docs/io/grid/example_grid.txt | 4 + tardis/grid/__init__.py | 1 + tardis/grid/tardis_grid.ipynb | 1193 ------------------------- 5 files changed, 580 insertions(+), 1193 deletions(-) create mode 100644 docs/io/grid/TardisGridTutorial.ipynb create mode 100644 docs/io/grid/example.yml create mode 100644 docs/io/grid/example_grid.txt create mode 100644 tardis/grid/__init__.py delete mode 100644 tardis/grid/tardis_grid.ipynb diff --git a/docs/io/grid/TardisGridTutorial.ipynb b/docs/io/grid/TardisGridTutorial.ipynb new file mode 100644 index 00000000000..3e7c43657d3 --- /dev/null +++ b/docs/io/grid/TardisGridTutorial.ipynb @@ -0,0 +1,518 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# TARDIS Grid Tutorial\n", + "\n", + "This notebook demonstrates the capabilities of the TARDIS grid. The grid facilitates users running large numbers of TARDIS simulations." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", + " return f(*args, **kwds)\n", + "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.material is not yet QA compliant.\n", + " return f(*args, **kwds)\n" + ] + } + ], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "\n", + "import tardis.grid as grid" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Creating A Grid\n", + "\n", + "There are 2 ways of creating a TARDIS grid: directly from a dataframe, or by defining a set of axes over which the grid should be defined. In both cases, a config.yml file is required. **Note that for the dataframe, the column names are in the form of valid keys in a tardis Configuration dictionary. For the axes, the keys must similarly be valid tardis Configuration keys.**" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
model.abundances.Hmodel.abundances.Hemodel.structure.velocity.startplasma.initial_t_inner
01.00.0100005000
10.40.6120006000
20.70.3150007000
\n", + "
" + ], + "text/plain": [ + " model.abundances.H model.abundances.He model.structure.velocity.start \\\n", + "0 1.0 0.0 10000 \n", + "1 0.4 0.6 12000 \n", + "2 0.7 0.3 15000 \n", + "\n", + " plasma.initial_t_inner \n", + "0 5000 \n", + "1 6000 \n", + "2 7000 " + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Load a DataFrame\n", + "df = pd.read_csv('example_grid.txt')\n", + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Create a tardis grid directly from a dataframe.\n", + "grid.tardisGrid(configFile='example.yml', gridFrame=df)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "# Create an axes dictionary\n", + "axesdict = {'model.structure.velocity.start':np.arange(10000,15000,1000), \n", + " 'model.abundances.He':np.arange(0,1,0.1),\n", + " 'model.abundances.H':np.arange(0,1,0.25)}" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Create a tardis grid from an axes dict using the classmethod.\n", + "grid.tardisGrid.from_axes(configFile='example.yml', axesdict=axesdict)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## TARDIS Grid Attributes\n", + "\n", + "The TARDIS grid only has 2 attributes. It creates a TARDIS Configuration object from the user specified config.yml file and saves this to the `self.config` attribute. The grid also stores the parameters of every grid point in a Dataframe accessed by `self.grid`" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "tg = grid.tardisGrid(configFile='example.yml', gridFrame=df)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tardis_config_version': 'v1.0',\n", + " 'supernova': {'luminosity_requested': ,\n", + " 'luminosity_wavelength_start': ,\n", + " 'luminosity_wavelength_end': ,\n", + " 'time_explosion': },\n", + " 'atom_data': 'kurucz_cd23_chianti_H_He.h5',\n", + " 'model': {'structure': {'type': 'specific',\n", + " 'velocity': {'start': ,\n", + " 'stop': ,\n", + " 'num': 20},\n", + " 'density': {'type': 'branch85_w7',\n", + " 'w7_time_0': ,\n", + " 'w7_rho_0': ,\n", + " 'w7_v_0': }},\n", + " 'abundances': {'type': 'uniform', 'He': 0.2, 'H': 0.8}},\n", + " 'plasma': {'initial_t_inner': ,\n", + " 'disable_electron_scattering': False,\n", + " 'ionization': 'nebular',\n", + " 'excitation': 'dilute-lte',\n", + " 'radiative_rates_type': 'dilute-blackbody',\n", + " 'line_interaction_type': 'macroatom',\n", + " 'initial_t_rad': ,\n", + " 'disable_line_scattering': False,\n", + " 'w_epsilon': 1e-10,\n", + " 'nlte': {'species': [],\n", + " 'coronal_approximation': False,\n", + " 'classical_nebular': False},\n", + " 'continuum_interaction': {'species': [],\n", + " 'enable_adiabatic_cooling': False,\n", + " 'enable_two_photon_decay': False},\n", + " 'helium_treatment': 'none',\n", + " 'heating_rate_data_file': 'none'},\n", + " 'montecarlo': {'seed': 23111963,\n", + " 'no_of_packets': 40000.0,\n", + " 'iterations': 2,\n", + " 'nthreads': 1,\n", + " 'last_no_of_packets': 1000.0,\n", + " 'no_of_virtual_packets': 3,\n", + " 'convergence_strategy': {'type': 'damped',\n", + " 'damping_constant': 0.5,\n", + " 'threshold': 0.05,\n", + " 'fraction': 0.8,\n", + " 'hold_iterations': 3,\n", + " 't_inner': {'damping_constant': 0.5, 'threshold': 0.05},\n", + " 'stop_if_converged': False,\n", + " 'lock_t_inner_cycles': 1,\n", + " 't_inner_update_exponent': -0.5,\n", + " 't_rad': {'damping_constant': 0.5, 'threshold': 0.05},\n", + " 'w': {'damping_constant': 0.5, 'threshold': 0.05}},\n", + " 'virtual_spectrum_spawn_range': {'start': ,\n", + " 'end': },\n", + " 'enable_reflective_inner_boundary': False,\n", + " 'inner_boundary_albedo': 0.0,\n", + " 'enable_full_relativity': False,\n", + " 'debug_packets': False,\n", + " 'logger_buffer': 1,\n", + " 'single_packet_seed': -1},\n", + " 'spectrum': {'start': ,\n", + " 'stop': ,\n", + " 'num': 10000,\n", + " 'method': 'virtual',\n", + " 'integrated': {'points': 1000, 'interpolate_shells': 0},\n", + " 'virtual': {'tau_russian': 10.0,\n", + " 'survival_probability': 0.0,\n", + " 'enable_biasing': False,\n", + " 'virtual_packet_logging': False}},\n", + " 'config_dirname': ''}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# The config generated from the user's yml file.\n", + "tg.config" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
model.abundances.Hmodel.abundances.Hemodel.structure.velocity.startplasma.initial_t_inner
01.00.0100005000
10.40.6120006000
20.70.3150007000
\n", + "
" + ], + "text/plain": [ + " model.abundances.H model.abundances.He model.structure.velocity.start \\\n", + "0 1.0 0.0 10000 \n", + "1 0.4 0.6 12000 \n", + "2 0.7 0.3 15000 \n", + "\n", + " plasma.initial_t_inner \n", + "0 5000 \n", + "1 6000 \n", + "2 7000 " + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# The user specified grid.\n", + "tg.grid" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## TARDIS Grid Functionality\n", + "\n", + "The TARDIS Grid provides a variety of functions for using the grid to generate new Configurations, return new Radial1DModel objects, or directly run simulations using the parameters specified by the grid. This functionality is particularly useful for running large numbers of simulations and easily works with JobArrays where the row_index is the JobArray index." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tg.config is the original config: {'type': 'uniform', 'He': 0.2, 'H': 0.8}\n", + "The new config is modified: {'type': 'uniform', 'He': 0.0, 'H': 1.0}\n" + ] + } + ], + "source": [ + "# Easily get a new TARDIS Configuration object \n", + "# which has the properties of the base self.config\n", + "# but with properties modified by a row of the grid.\n", + "new_grid = tg.grid_row_to_config(row_index=0);\n", + "print(\"tg.config is the original config:\",tg.config.model.abundances)\n", + "print(\"The new config is modified: \",new_grid.model.abundances)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# In case a user needs to make more complicated changes\n", + "# to the base TARDIS model (i.e. using parameters that \n", + "# are not valid TARDIS Configuration keys), the grid\n", + "# can return a Radial1DModel object for a given row.\n", + "model = tg.grid_row_to_model(row_index=0)\n", + "model" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:195: NumbaTypeSafetyWarning: \u001b[1m\u001b[1m\u001b[1munsafe cast from uint64 to int64. Precision may be lost.\u001b[0m\u001b[0m\u001b[0m\n", + " vpacket_collection = vpacket_collections[i]\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Shell No. t_rad next_t_rad w next_w
05e+035.01e+030.390.4
54.95e+034.95e+030.190.195
104.91e+034.9e+030.1230.127
154.87e+034.86e+030.08690.0907
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", + " (si.m, si.Hz, lambda x: _si.c.value / x),\n", + " (\u001b[1mwarnings.py\u001b[0m:110)\n" + ] + } + ], + "source": [ + "# Users can easily run a full TARDIS simulation\n", + "# using the grid.\n", + "sim = tg.run_sim_from_grid(row_index=0)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/io/grid/example.yml b/docs/io/grid/example.yml new file mode 100644 index 00000000000..2161d31f9bf --- /dev/null +++ b/docs/io/grid/example.yml @@ -0,0 +1,57 @@ +# Example YAML configuration for TARDIS +tardis_config_version: v1.0 + +supernova: + luminosity_requested: 5.679e41 erg/s + luminosity_wavelength_start: 3481.82000178 angstrom + luminosity_wavelength_end: 9947.78776065 angstrom + time_explosion: 10 day + +atom_data: kurucz_cd23_chianti_H_He.h5 + +model: + structure: + type: specific + velocity: + start: 1.0e4 km/s + stop: 20000 km/s + num: 20 + density: + type: branch85_w7 + + abundances: + type: uniform + He: 0.2 + H: 0.8 + + +plasma: + initial_t_inner: 7000 K + disable_electron_scattering: no + ionization: nebular + excitation: dilute-lte + radiative_rates_type: dilute-blackbody + line_interaction_type: macroatom + +montecarlo: + seed: 23111963 + no_of_packets: 4.0e+4 + iterations: 2 + nthreads: 1 + + last_no_of_packets: 1.e+3 + no_of_virtual_packets: 3 + + convergence_strategy: + type: damped + damping_constant: 0.5 + threshold: 0.05 + fraction: 0.8 + hold_iterations: 3 + t_inner: + damping_constant: 0.5 + +spectrum: + start: 500 angstrom + stop: 20000 angstrom + num: 10000 diff --git a/docs/io/grid/example_grid.txt b/docs/io/grid/example_grid.txt new file mode 100644 index 00000000000..86815cf0e59 --- /dev/null +++ b/docs/io/grid/example_grid.txt @@ -0,0 +1,4 @@ +model.abundances.H,model.abundances.He,model.structure.velocity.start,plasma.initial_t_inner +1.0,0.0,10000,5000 +0.4,0.6,12000,6000 +0.7,0.3,15000,7000 diff --git a/tardis/grid/__init__.py b/tardis/grid/__init__.py new file mode 100644 index 00000000000..8b555bca910 --- /dev/null +++ b/tardis/grid/__init__.py @@ -0,0 +1 @@ +from tardis.grid.tardisgrid import * diff --git a/tardis/grid/tardis_grid.ipynb b/tardis/grid/tardis_grid.ipynb deleted file mode 100644 index d80a512793f..00000000000 --- a/tardis/grid/tardis_grid.ipynb +++ /dev/null @@ -1,1193 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", - " return f(*args, **kwds)\n" - ] - } - ], - "source": [ - "import pandas as pd\n", - "import numpy as np\n", - "import copy\n", - "import tardis\n", - "\n", - "from tardis.io.config_reader import Configuration" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "def set_tardis_config_property(tardis_config, key, value):\n", - " keyitems = key.split('.')\n", - " tmp_dict = getattr(tardis_config, keyitems[0])\n", - " for key in keyitems[1:-1]:\n", - " tmp_dict = getattr(tmp_dict, key)\n", - " setattr(tmp_dict, keyitems[-1], value)\n", - " return\n", - " \n", - "\n", - "class tardisGrid:\n", - " \n", - " def __init__(self, configFile, gridFrame):\n", - " try:\n", - " tardis_config = Configuration.from_yaml(configFile)\n", - " except TypeError:\n", - " tardis_config = Configuration.from_config_dict(configFile)\n", - " \n", - " self.config = tardis_config\n", - " self.grid = gridFrame\n", - " \n", - " return\n", - " \n", - " def grid_row_to_config(self, row_index):\n", - " tmp_config = copy.deepcopy(self.config)\n", - " grid_row = self.grid.iloc[row_index]\n", - " for colname, value in zip(self.grid.columns, grid_row.values):\n", - " set_tardis_config_property(tmp_config, colname, value)\n", - " return tmp_config\n", - " \n", - " \n", - " def run_sim_from_grid(self, row_index):\n", - " tardis_config = self.grid_row_to_config(row_index)\n", - " tardis_config.pop('config_dirname')\n", - " sim = tardis.run_tardis(tardis_config)\n", - " return sim\n", - " \n", - " def save_grid(self, filename):\n", - " self.grid.to_csv(filename, index=False)\n", - " return\n", - " \n", - " @classmethod\n", - " def from_axes(cls, configFile, axesdict):\n", - " axes = []\n", - " dim = 1\n", - " for key in axesdict:\n", - " ax = axesdict[key]\n", - " axes.append(ax)\n", - " dim = dim * len(ax)\n", - " axesmesh = np.meshgrid(*axes)\n", - " tmp = np.dstack(axesmesh)\n", - " gridpoints = tmp.reshape((dim, len(axes)), order='F')\n", - " df = pd.DataFrame(data=gridpoints, columns=axesdict.keys())\n", - " return cls(configFile=configFile, gridFrame=df)\n", - " \n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "axesdict = {'model.structure.velocity.start':np.arange(10000,15000,1000), 'model.abundances.He':np.arange(0,1,0.1),\n", - " 'model.abundances.H':np.arange(0,1,0.25)}" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "grid = tardisGrid.from_axes('test.yml', axesdict)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
model.structure.velocity.startmodel.abundances.Hemodel.abundances.H
010000.00.00.00
110000.00.10.00
210000.00.20.00
310000.00.30.00
410000.00.40.00
............
19514000.00.50.75
19614000.00.60.75
19714000.00.70.75
19814000.00.80.75
19914000.00.90.75
\n", - "

200 rows × 3 columns

\n", - "
" - ], - "text/plain": [ - " model.structure.velocity.start model.abundances.He model.abundances.H\n", - "0 10000.0 0.0 0.00\n", - "1 10000.0 0.1 0.00\n", - "2 10000.0 0.2 0.00\n", - "3 10000.0 0.3 0.00\n", - "4 10000.0 0.4 0.00\n", - ".. ... ... ...\n", - "195 14000.0 0.5 0.75\n", - "196 14000.0 0.6 0.75\n", - "197 14000.0 0.7 0.75\n", - "198 14000.0 0.8 0.75\n", - "199 14000.0 0.9 0.75\n", - "\n", - "[200 rows x 3 columns]" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "grid.grid" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "newconfig = grid.grid_row_to_config(195)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'type': 'uniform', 'He': 0.5, 'H': 0.75, 'N': 0.05, 'Fe': 0.015, 'O': 0.0, 'Ni': 0.2505, 'C': 0.008, 'Si': 0.001, 'Ca': 0.0102}\n", - "{'type': 'uniform', 'He': 0.6658, 'H': 0.0, 'N': 0.05, 'Fe': 0.015, 'O': 0.0, 'Ni': 0.2505, 'C': 0.008, 'Si': 0.001, 'Ca': 0.0102}\n" - ] - } - ], - "source": [ - "print(newconfig.model.abundances)\n", - "print(grid.config.model.abundances)" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[\u001b[1mtardis.model.base \u001b[0m][\u001b[1;33mWARNING\u001b[0m] Abundances have not been normalized to 1. - normalizing (\u001b[1mbase.py\u001b[0m:440)\n", - "[\u001b[1mtardis.plasma.standard_plasmas\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Reading Atomic Data from /Users/marcwilliamson/Research/TARDIS/tardis-refdata/atom_data/kurucz_cd23_chianti_H_He.h5 (\u001b[1mstandard_plasmas.py\u001b[0m:87)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/ipykernel_launcher.py:1: PerformanceWarning: indexing past lexsort depth may impact performance.\n", - " \"\"\"Entry point for launching an IPython kernel.\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mtardis.io.atom_data.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Read Atom Data with UUID=6f7b09e887a311e7a06b246e96350010 and MD5=864f1753714343c41f99cb065710cace. (\u001b[1mbase.py\u001b[0m:172)\n", - "[\u001b[1mtardis.io.atom_data.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Non provided atomic data: synpp_refs, photoionization_data (\u001b[1mbase.py\u001b[0m:178)\n", - "[\u001b[1mtardis.plasma.properties.atomic\u001b[0m][\u001b[1;33mWARNING\u001b[0m] Zeta_data missing - replaced with 1s. Missing ions: [(14, 15), (20, 21), (26, 27), (28, 29)] (\u001b[1matomic.py\u001b[0m:257)\n", - "[\u001b[1mtardis.plasma.properties.atomic\u001b[0m][\u001b[1;33mWARNING\u001b[0m] Zeta_data missing - replaced with 1s. Missing ions: [(14, 15), (20, 21), (26, 27), (28, 29)] (\u001b[1matomic.py\u001b[0m:257)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 1/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/interaction.py\", line 21:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef thomson_scatter(r_packet, time_explosion):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/interaction.py\", line 54:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef line_scatter(r_packet, time_explosion, line_interaction_type, numba_plasma):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 342:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef trace_packet(r_packet, numba_model, numba_plasma, estimators):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 497:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef move_r_packet(r_packet, distance, time_explosion, numba_estimator):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 569:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef move_packet_across_shell_boundary(packet, delta_shell, no_of_shells):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/vpacket.py\", line 193:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef trace_vpacket_volley(\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/interaction.py\", line 88:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef line_emission(r_packet, emission_line_id, time_explosion, numba_plasma):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/macro_atom.py\", line 22:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef macro_atom(r_packet, numba_plasma):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 130:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calculate_distance_line(\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 206:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calculate_distance_electron(electron_density, tau_event):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 233:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef get_doppler_factor(r, mu, time_explosion):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 254:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef get_inverse_doppler_factor(r, mu, time_explosion):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 284:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef get_random_mu():\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 289:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef update_line_estimators(\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 544:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef set_estimators(r_packet, distance, numba_estimator, comov_nu, comov_energy):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 557:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef set_estimators_full_relativity(\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 597:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef angle_aberration_CMF_to_LF(r_packet, time_explosion, mu):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 608:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef angle_aberration_LF_to_CMF(r_packet, time_explosion, mu):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 621:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef test_for_close_line(r_packet, line_id, nu_line, numba_plasma):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/vpacket.py\", line 138:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef trace_vpacket(v_packet, numba_model, numba_plasma):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 181:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calculate_distance_line_full_relativity(\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 244:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef get_doppler_factor_partial_relativity(mu, beta):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 249:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef get_doppler_factor_full_relativity(mu, beta):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 274:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef get_inverse_doppler_factor_partial_relativity(mu, beta):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 279:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef get_inverse_doppler_factor_full_relativity(mu, beta):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 326:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calc_packet_energy_full_relativity(r_packet):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 332:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calc_packet_energy(r_packet, distance_trace, time_explosion):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 569:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef move_packet_across_shell_boundary(packet, delta_shell, no_of_shells):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/vpacket.py\", line 62:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef trace_vpacket_within_shell(v_packet, numba_model, numba_plasma):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 130:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calculate_distance_line(\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 220:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calculate_tau_electron(electron_density, distance):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 86:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calculate_distance_boundary(r, mu, r_inner, r_outer):\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:178: NumbaPerformanceWarning: \u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n", - "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.\n", - "\n", - "To find out why, try turning on parallel diagnostics, see http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.\n", - "\u001b[1m\n", - "File \"../montecarlo/montecarlo_numba/r_packet.py\", line 181:\u001b[0m\n", - "\u001b[1m@njit(**njit_dict)\n", - "\u001b[1mdef calculate_distance_line_full_relativity(\n", - "\u001b[0m\u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n", - " r_packet, numba_model, numba_plasma, estimators, vpacket_collection\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 7.92183e+41 erg / s Luminosity absorbed = 8.27209e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 6996.499329 7349.490364 0.427390 0.456755\n", - "\t5 6961.684230 7421.633545 0.276535 0.253515\n", - "\t10 6927.213900 7308.543382 0.211205 0.181286\n", - "\t15 6893.083244 7017.562145 0.169661 0.145029\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 7000.000 K -- next t_inner 6463.406 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 2/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.47283e+41 erg / s Luminosity absorbed = 6.13378e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7349.490364 7280.057555 0.456755 0.463605\n", - "\t5 7421.633545 7511.777399 0.253515 0.227786\n", - "\t10 7308.543382 7395.724036 0.181286 0.151817\n", - "\t15 7017.562145 7004.314505 0.145029 0.118845\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6463.406 K -- next t_inner 6523.715 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 3/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.67616e+41 erg / s Luminosity absorbed = 6.41029e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7280.057555 7286.627850 0.463605 0.467261\n", - "\t5 7511.777399 7603.816722 0.227786 0.212858\n", - "\t10 7395.724036 7536.425746 0.151817 0.133557\n", - "\t15 7004.314505 7015.579172 0.118845 0.105709\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6523.715 K -- next t_inner 6524.531 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 4/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.71835e+41 erg / s Luminosity absorbed = 6.39362e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7286.627850 7294.175454 0.467261 0.467411\n", - "\t5 7603.816722 7698.527537 0.212858 0.203341\n", - "\t10 7536.425746 7588.006687 0.133557 0.124956\n", - "\t15 7015.579172 7056.900874 0.105709 0.096968\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6524.531 K -- next t_inner 6513.288 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 5/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68517e+41 erg / s Luminosity absorbed = 6.41560e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7294.175454 7257.004504 0.467411 0.476609\n", - "\t5 7698.527537 7693.931801 0.203341 0.202042\n", - "\t10 7588.006687 7567.957143 0.124956 0.122476\n", - "\t15 7056.900874 7080.109027 0.096968 0.092205\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6513.288 K -- next t_inner 6511.520 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 6/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.60855e+41 erg / s Luminosity absorbed = 6.33644e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7257.004504 7258.307219 0.476609 0.474024\n", - "\t5 7693.931801 7678.803979 0.202042 0.204688\n", - "\t10 7567.957143 7597.061739 0.122476 0.120789\n", - "\t15 7080.109027 7053.134912 0.092205 0.091919\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6511.520 K -- next t_inner 6531.906 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 7/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.61263e+41 erg / s Luminosity absorbed = 6.48085e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7258.307219 7267.632743 0.474024 0.474849\n", - "\t5 7678.803979 7711.869677 0.204688 0.199750\n", - "\t10 7597.061739 7608.899235 0.120789 0.119465\n", - "\t15 7053.134912 7072.255664 0.091919 0.089825\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6531.906 K -- next t_inner 6551.160 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 8/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.73581e+41 erg / s Luminosity absorbed = 6.57023e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7267.632743 7287.134698 0.474849 0.477064\n", - "\t5 7711.869677 7751.994159 0.199750 0.198575\n", - "\t10 7608.899235 7630.972637 0.119465 0.118624\n", - "\t15 7072.255664 7100.240486 0.089825 0.089267\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6551.160 K -- next t_inner 6534.899 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 9/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68337e+41 erg / s Luminosity absorbed = 6.43416e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 2/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7287.134698 7292.490423 0.477064 0.475907\n", - "\t5 7751.994159 7753.448845 0.198575 0.198668\n", - "\t10 7630.972637 7625.595562 0.118624 0.118831\n", - "\t15 7100.240486 7091.420916 0.089267 0.088621\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6534.899 K -- next t_inner 6533.643 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 10/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.73870e+41 erg / s Luminosity absorbed = 6.42273e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7292.490423 7283.098423 0.475907 0.476797\n", - "\t5 7753.448845 7754.507037 0.198668 0.198592\n", - "\t10 7625.595562 7600.612088 0.118831 0.119891\n", - "\t15 7091.420916 7184.091547 0.088621 0.084498\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6533.643 K -- next t_inner 6516.605 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 11/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.64107e+41 erg / s Luminosity absorbed = 6.37373e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7283.098423 7268.586773 0.476797 0.477291\n", - "\t5 7754.507037 7729.016674 0.198592 0.199526\n", - "\t10 7600.612088 7581.799768 0.119891 0.120435\n", - "\t15 7184.091547 7161.096924 0.084498 0.084749\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6516.605 K -- next t_inner 6527.540 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 12/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.59421e+41 erg / s Luminosity absorbed = 6.48924e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7268.586773 7275.898266 0.477291 0.475630\n", - "\t5 7729.016674 7725.848240 0.199526 0.199523\n", - "\t10 7581.799768 7612.233112 0.120435 0.118086\n", - "\t15 7161.096924 7192.886909 0.084749 0.082936\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6527.540 K -- next t_inner 6552.181 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 13/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.70806e+41 erg / s Luminosity absorbed = 6.56171e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7275.898266 7297.320605 0.475630 0.473261\n", - "\t5 7725.848240 7740.784851 0.199523 0.200228\n", - "\t10 7612.233112 7605.616035 0.118086 0.119467\n", - "\t15 7192.886909 7139.106568 0.082936 0.086149\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6552.181 K -- next t_inner 6543.830 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 14/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.71210e+41 erg / s Luminosity absorbed = 6.48187e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7297.320605 7279.506950 0.473261 0.477163\n", - "\t5 7740.784851 7738.982356 0.200228 0.201584\n", - "\t10 7605.616035 7610.088876 0.119467 0.120119\n", - "\t15 7139.106568 7164.904123 0.086149 0.085933\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6543.830 K -- next t_inner 6534.336 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 15/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.72245e+41 erg / s Luminosity absorbed = 6.46690e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7279.506950 7280.808946 0.477163 0.478163\n", - "\t5 7738.982356 7738.510409 0.201584 0.200897\n", - "\t10 7610.088876 7636.499177 0.120119 0.118251\n", - "\t15 7164.904123 7141.326964 0.085933 0.086785\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6534.336 K -- next t_inner 6521.909 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 16/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.61140e+41 erg / s Luminosity absorbed = 6.48863e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7280.808946 7285.135849 0.478163 0.475635\n", - "\t5 7738.510409 7689.944493 0.200897 0.203372\n", - "\t10 7636.499177 7614.049463 0.118251 0.117519\n", - "\t15 7141.326964 7207.942077 0.086785 0.083257\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6521.909 K -- next t_inner 6541.494 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 17/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68185e+41 erg / s Luminosity absorbed = 6.52783e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 1/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7285.135849 7297.636965 0.475635 0.472922\n", - "\t5 7689.944493 7732.812013 0.203372 0.199880\n", - "\t10 7614.049463 7619.455989 0.117519 0.118843\n", - "\t15 7207.942077 7178.818268 0.083257 0.084649\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6541.494 K -- next t_inner 6540.674 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 18/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.67955e+41 erg / s Luminosity absorbed = 6.49580e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Iteration converged 2/4 consecutive times. (\u001b[1mbase.py\u001b[0m:229)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7297.636965 7296.934143 0.472922 0.472727\n", - "\t5 7732.812013 7744.923250 0.199880 0.200945\n", - "\t10 7619.455989 7688.985280 0.118843 0.115224\n", - "\t15 7178.818268 7182.769552 0.084649 0.085187\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6540.674 K -- next t_inner 6540.517 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 19/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.68870e+41 erg / s Luminosity absorbed = 6.49791e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Plasma stratification:\n", - "\t t_rad next_t_rad w next_w\n", - "\tShell \n", - "\t0 7296.934143 7296.394657 0.472727 0.472682\n", - "\t5 7744.923250 7758.743398 0.200945 0.200026\n", - "\t10 7688.985280 7618.315463 0.115224 0.118548\n", - "\t15 7182.769552 7144.145522 0.085187 0.086512\n", - "\n", - " (\u001b[1mbase.py\u001b[0m:436)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 6540.517 K -- next t_inner 6537.729 K (\u001b[1mbase.py\u001b[0m:439)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 20/20 (\u001b[1mbase.py\u001b[0m:326)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "Running post-merge numba montecarlo (with C close lines)!\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 5.61190e+41 erg / s Luminosity absorbed = 6.56179e+41 erg / s Luminosity requested = 5.67900e+41 erg / s (\u001b[1mbase.py\u001b[0m:450)\n", - "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Simulation finished in 20 iterations and took 189.73 s (\u001b[1mbase.py\u001b[0m:384)\n" - ] - } - ], - "source": [ - "sim = grid.run_sim_from_grid(195)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'tardis_config_version': 'v1.0',\n", - " 'supernova': {'luminosity_requested': ,\n", - " 'luminosity_wavelength_start': ,\n", - " 'luminosity_wavelength_end': ,\n", - " 'time_explosion': },\n", - " 'atom_data': '/Users/marcwilliamson/Research/TARDIS/tardis-refdata/atom_data/kurucz_cd23_chianti_H_He.h5',\n", - " 'model': {'structure': {'type': 'specific',\n", - " 'velocity': {'start': ,\n", - " 'stop': ,\n", - " 'num': 20},\n", - " 'density': {'type': 'branch85_w7',\n", - " 'w7_time_0': ,\n", - " 'w7_rho_0': ,\n", - " 'w7_v_0': }},\n", - " 'abundances': {'type': 'uniform',\n", - " 'He': 0.6658,\n", - " 'H': 0.0,\n", - " 'N': 0.05,\n", - " 'Fe': 0.015,\n", - " 'O': 0.0,\n", - " 'Ni': 0.2505,\n", - " 'C': 0.008,\n", - " 'Si': 0.001,\n", - " 'Ca': 0.0102}},\n", - " 'plasma': {'initial_t_inner': ,\n", - " 'disable_electron_scattering': False,\n", - " 'ionization': 'nebular',\n", - " 'excitation': 'dilute-lte',\n", - " 'radiative_rates_type': 'dilute-blackbody',\n", - " 'line_interaction_type': 'macroatom',\n", - " 'helium_treatment': 'recomb-nlte',\n", - " 'initial_t_rad': ,\n", - " 'disable_line_scattering': False,\n", - " 'w_epsilon': 1e-10,\n", - " 'nlte': {'species': [],\n", - " 'coronal_approximation': False,\n", - " 'classical_nebular': False},\n", - " 'continuum_interaction': {'species': []},\n", - " 'heating_rate_data_file': 'none'},\n", - " 'montecarlo': {'seed': 23111963,\n", - " 'no_of_packets': 40000.0,\n", - " 'iterations': 2,\n", - " 'nthreads': 1,\n", - " 'last_no_of_packets': 1000.0,\n", - " 'no_of_virtual_packets': 3,\n", - " 'convergence_strategy': {'type': 'damped',\n", - " 'damping_constant': 0.5,\n", - " 'threshold': 0.05,\n", - " 'fraction': 0.8,\n", - " 'hold_iterations': 3,\n", - " 't_inner': {'damping_constant': 0.5, 'threshold': 0.05},\n", - " 'stop_if_converged': False,\n", - " 'lock_t_inner_cycles': 1,\n", - " 't_inner_update_exponent': -0.5,\n", - " 't_rad': {'damping_constant': 0.5, 'threshold': 0.05},\n", - " 'w': {'damping_constant': 0.5, 'threshold': 0.05}},\n", - " 'virtual_spectrum_spawn_range': {'start': ,\n", - " 'end': },\n", - " 'enable_reflective_inner_boundary': False,\n", - " 'inner_boundary_albedo': 0.0,\n", - " 'enable_full_relativity': False,\n", - " 'debug_packets': False,\n", - " 'logger_buffer': 1,\n", - " 'single_packet_seed': -1},\n", - " 'spectrum': {'start': ,\n", - " 'stop': ,\n", - " 'num': 10000,\n", - " 'method': 'virtual',\n", - " 'integrated': {'points': 1000, 'interpolate_shells': -1},\n", - " 'virtual': {'tau_russian': 10.0,\n", - " 'survival_probability': 0.0,\n", - " 'enable_biasing': False,\n", - " 'virtual_packet_logging': False}},\n", - " 'config_dirname': ''}" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "grid.config" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "data": { - "text/latex": [ - "$7000 \\; \\mathrm{K}$" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "grid.config.plasma.initial_t_inner" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} From 075e4218296c5acf8fd4c2554c34dc498b8a919a Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Fri, 16 Jul 2021 15:54:00 -0400 Subject: [PATCH 09/19] [build docs] From f1b8c1431d91aae16d0a9283f7e77515bce5dbc1 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Fri, 16 Jul 2021 15:56:44 -0400 Subject: [PATCH 10/19] [build docs] From 341668aacb2f3409747cfb3903941422ca540b18 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Mon, 19 Jul 2021 10:16:37 -0400 Subject: [PATCH 11/19] [build docs] From 953927009658c130a08ac7ad33535d0f1c15240b Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Mon, 19 Jul 2021 10:55:58 -0400 Subject: [PATCH 12/19] [build docs] From 78d82648c12798aa588bdaad587fc2dc82da1d0a Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Mon, 19 Jul 2021 11:12:25 -0400 Subject: [PATCH 13/19] added grid doc to sidebar. [build docs] --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 619f3f191ec..613e3fdab72 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -61,7 +61,7 @@ Mission Statement io/optional/index io/visualization/index io/output/index - + io/grid/TardisGridTutorial .. toctree:: :maxdepth: 2 From edbb0e98761c213116867895615b36eb0121921e Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Wed, 21 Jul 2021 11:50:44 -0400 Subject: [PATCH 14/19] Added tests --- tardis/grid/tests/data/example.yml | 57 +++++++++++++++++++++++++ tardis/grid/tests/data/example_grid.txt | 4 ++ tardis/grid/tests/test_grid.py | 38 +++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 tardis/grid/tests/data/example.yml create mode 100644 tardis/grid/tests/data/example_grid.txt create mode 100644 tardis/grid/tests/test_grid.py diff --git a/tardis/grid/tests/data/example.yml b/tardis/grid/tests/data/example.yml new file mode 100644 index 00000000000..2161d31f9bf --- /dev/null +++ b/tardis/grid/tests/data/example.yml @@ -0,0 +1,57 @@ +# Example YAML configuration for TARDIS +tardis_config_version: v1.0 + +supernova: + luminosity_requested: 5.679e41 erg/s + luminosity_wavelength_start: 3481.82000178 angstrom + luminosity_wavelength_end: 9947.78776065 angstrom + time_explosion: 10 day + +atom_data: kurucz_cd23_chianti_H_He.h5 + +model: + structure: + type: specific + velocity: + start: 1.0e4 km/s + stop: 20000 km/s + num: 20 + density: + type: branch85_w7 + + abundances: + type: uniform + He: 0.2 + H: 0.8 + + +plasma: + initial_t_inner: 7000 K + disable_electron_scattering: no + ionization: nebular + excitation: dilute-lte + radiative_rates_type: dilute-blackbody + line_interaction_type: macroatom + +montecarlo: + seed: 23111963 + no_of_packets: 4.0e+4 + iterations: 2 + nthreads: 1 + + last_no_of_packets: 1.e+3 + no_of_virtual_packets: 3 + + convergence_strategy: + type: damped + damping_constant: 0.5 + threshold: 0.05 + fraction: 0.8 + hold_iterations: 3 + t_inner: + damping_constant: 0.5 + +spectrum: + start: 500 angstrom + stop: 20000 angstrom + num: 10000 diff --git a/tardis/grid/tests/data/example_grid.txt b/tardis/grid/tests/data/example_grid.txt new file mode 100644 index 00000000000..86815cf0e59 --- /dev/null +++ b/tardis/grid/tests/data/example_grid.txt @@ -0,0 +1,4 @@ +model.abundances.H,model.abundances.He,model.structure.velocity.start,plasma.initial_t_inner +1.0,0.0,10000,5000 +0.4,0.6,12000,6000 +0.7,0.3,15000,7000 diff --git a/tardis/grid/tests/test_grid.py b/tardis/grid/tests/test_grid.py new file mode 100644 index 00000000000..fae0a9e535f --- /dev/null +++ b/tardis/grid/tests/test_grid.py @@ -0,0 +1,38 @@ +import pandas as pd +import numpy as np +import tardis +import os +import pytest +import tardis.grid as grid + + +DATA_PATH = os.path.join(tardis.__path__[0], "grid", "tests", "data") + +def test_grid(): + """Tests the basic functionality of the TARDIS grid module.""" + dfpath = os.path.join(DATA_PATH, 'example_grid.txt') + ymlpath = os.path.join(DATA_PATH, 'example.yml') + axesdict = {'model.structure.velocity.start':np.arange(10000,15000,1000), + 'model.abundances.He':np.arange(0,1,0.1), + 'model.abundances.H':np.arange(0,1,0.25)} + + df = pd.read_csv(os.path.join(dfpath)) + g = grid.tardisGrid(configFile=ymlpath, gridFrame=df) + g2 = grid.tardisGrid.from_axes(configFile=ymlpath, axesdict=axesdict) + + # Check that grid attribute has the right shape + assert g.grid.shape == df.shape + ax_len = 1 + for key in axesdict: + ax_len *= len(axesdict[key]) + assert g2.grid.shape[0] == ax_len + + newconf = g.grid_row_to_config(row_index=0) + # Verify that grid_row_to_config modifies the base config attribute + assert g.config != newconf + + # Verify that a model can be returned. + model = g.grid_row_to_model(row_index=0) + assert model.velocity[0].to('km/s').value == df.iloc[0]['model.structure.velocity.start'] + + From 49c4e352dff90e64cfc0e36af0dece68f92b63d9 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Wed, 21 Jul 2021 11:54:36 -0400 Subject: [PATCH 15/19] black formatting --- tardis/grid/tardisgrid.py | 7 ++----- tardis/grid/tests/test_grid.py | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tardis/grid/tardisgrid.py b/tardis/grid/tardisgrid.py index e0286b5336f..14f2c4227c0 100644 --- a/tardis/grid/tardisgrid.py +++ b/tardis/grid/tardisgrid.py @@ -24,7 +24,7 @@ def _set_tardis_config_property(tardis_config, key, value): The value to assign to the config dict for the corresponding key. """ - keyitems = key.split('.') + keyitems = key.split(".") tmp_dict = getattr(tardis_config, keyitems[0]) for key in keyitems[1:-1]: tmp_dict = getattr(tmp_dict, key) @@ -167,9 +167,6 @@ def from_axes(cls, configFile, axesdict): dim = dim * len(ax) axesmesh = np.meshgrid(*axes) tmp = np.dstack(axesmesh) - gridpoints = tmp.reshape((dim, len(axes)), order='F') + gridpoints = tmp.reshape((dim, len(axes)), order="F") df = pd.DataFrame(data=gridpoints, columns=axesdict.keys()) return cls(configFile=configFile, gridFrame=df) - - - diff --git a/tardis/grid/tests/test_grid.py b/tardis/grid/tests/test_grid.py index fae0a9e535f..5676c6782fb 100644 --- a/tardis/grid/tests/test_grid.py +++ b/tardis/grid/tests/test_grid.py @@ -8,13 +8,16 @@ DATA_PATH = os.path.join(tardis.__path__[0], "grid", "tests", "data") + def test_grid(): """Tests the basic functionality of the TARDIS grid module.""" - dfpath = os.path.join(DATA_PATH, 'example_grid.txt') - ymlpath = os.path.join(DATA_PATH, 'example.yml') - axesdict = {'model.structure.velocity.start':np.arange(10000,15000,1000), - 'model.abundances.He':np.arange(0,1,0.1), - 'model.abundances.H':np.arange(0,1,0.25)} + dfpath = os.path.join(DATA_PATH, "example_grid.txt") + ymlpath = os.path.join(DATA_PATH, "example.yml") + axesdict = { + "model.structure.velocity.start": np.arange(10000, 15000, 1000), + "model.abundances.He": np.arange(0, 1, 0.1), + "model.abundances.H": np.arange(0, 1, 0.25), + } df = pd.read_csv(os.path.join(dfpath)) g = grid.tardisGrid(configFile=ymlpath, gridFrame=df) @@ -33,6 +36,7 @@ def test_grid(): # Verify that a model can be returned. model = g.grid_row_to_model(row_index=0) - assert model.velocity[0].to('km/s').value == df.iloc[0]['model.structure.velocity.start'] - - + assert ( + model.velocity[0].to("km/s").value + == df.iloc[0]["model.structure.velocity.start"] + ) From 5ff82e6fd820832f26d8fac1e4502dc65089d64b Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Thu, 22 Jul 2021 14:13:54 -0400 Subject: [PATCH 16/19] renamed to base.py --- tardis/grid/__init__.py | 2 +- tardis/grid/{tardisgrid.py => base.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tardis/grid/{tardisgrid.py => base.py} (100%) diff --git a/tardis/grid/__init__.py b/tardis/grid/__init__.py index 8b555bca910..eb8bb8410b2 100644 --- a/tardis/grid/__init__.py +++ b/tardis/grid/__init__.py @@ -1 +1 @@ -from tardis.grid.tardisgrid import * +from tardis.grid.base import * diff --git a/tardis/grid/tardisgrid.py b/tardis/grid/base.py similarity index 100% rename from tardis/grid/tardisgrid.py rename to tardis/grid/base.py From 58aa21b2d500771036f94bc6b9bb26f6e5e940e4 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Thu, 22 Jul 2021 14:16:18 -0400 Subject: [PATCH 17/19] cleared output so notebook is run when building docs --- docs/io/grid/TardisGridTutorial.ipynb | 374 ++------------------------ 1 file changed, 20 insertions(+), 354 deletions(-) diff --git a/docs/io/grid/TardisGridTutorial.ipynb b/docs/io/grid/TardisGridTutorial.ipynb index 3e7c43657d3..bc4393bb4b6 100644 --- a/docs/io/grid/TardisGridTutorial.ipynb +++ b/docs/io/grid/TardisGridTutorial.ipynb @@ -11,20 +11,9 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", - " return f(*args, **kwds)\n", - "/Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.material is not yet QA compliant.\n", - " return f(*args, **kwds)\n" - ] - } - ], + "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", @@ -43,79 +32,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
model.abundances.Hmodel.abundances.Hemodel.structure.velocity.startplasma.initial_t_inner
01.00.0100005000
10.40.6120006000
20.70.3150007000
\n", - "
" - ], - "text/plain": [ - " model.abundances.H model.abundances.He model.structure.velocity.start \\\n", - "0 1.0 0.0 10000 \n", - "1 0.4 0.6 12000 \n", - "2 0.7 0.3 15000 \n", - "\n", - " plasma.initial_t_inner \n", - "0 5000 \n", - "1 6000 \n", - "2 7000 " - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Load a DataFrame\n", "df = pd.read_csv('example_grid.txt')\n", @@ -124,20 +43,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Create a tardis grid directly from a dataframe.\n", "grid.tardisGrid(configFile='example.yml', gridFrame=df)" @@ -145,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -157,20 +65,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "#Create a tardis grid from an axes dict using the classmethod.\n", "grid.tardisGrid.from_axes(configFile='example.yml', axesdict=axesdict)" @@ -187,7 +84,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -196,86 +93,9 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'tardis_config_version': 'v1.0',\n", - " 'supernova': {'luminosity_requested': ,\n", - " 'luminosity_wavelength_start': ,\n", - " 'luminosity_wavelength_end': ,\n", - " 'time_explosion': },\n", - " 'atom_data': 'kurucz_cd23_chianti_H_He.h5',\n", - " 'model': {'structure': {'type': 'specific',\n", - " 'velocity': {'start': ,\n", - " 'stop': ,\n", - " 'num': 20},\n", - " 'density': {'type': 'branch85_w7',\n", - " 'w7_time_0': ,\n", - " 'w7_rho_0': ,\n", - " 'w7_v_0': }},\n", - " 'abundances': {'type': 'uniform', 'He': 0.2, 'H': 0.8}},\n", - " 'plasma': {'initial_t_inner': ,\n", - " 'disable_electron_scattering': False,\n", - " 'ionization': 'nebular',\n", - " 'excitation': 'dilute-lte',\n", - " 'radiative_rates_type': 'dilute-blackbody',\n", - " 'line_interaction_type': 'macroatom',\n", - " 'initial_t_rad': ,\n", - " 'disable_line_scattering': False,\n", - " 'w_epsilon': 1e-10,\n", - " 'nlte': {'species': [],\n", - " 'coronal_approximation': False,\n", - " 'classical_nebular': False},\n", - " 'continuum_interaction': {'species': [],\n", - " 'enable_adiabatic_cooling': False,\n", - " 'enable_two_photon_decay': False},\n", - " 'helium_treatment': 'none',\n", - " 'heating_rate_data_file': 'none'},\n", - " 'montecarlo': {'seed': 23111963,\n", - " 'no_of_packets': 40000.0,\n", - " 'iterations': 2,\n", - " 'nthreads': 1,\n", - " 'last_no_of_packets': 1000.0,\n", - " 'no_of_virtual_packets': 3,\n", - " 'convergence_strategy': {'type': 'damped',\n", - " 'damping_constant': 0.5,\n", - " 'threshold': 0.05,\n", - " 'fraction': 0.8,\n", - " 'hold_iterations': 3,\n", - " 't_inner': {'damping_constant': 0.5, 'threshold': 0.05},\n", - " 'stop_if_converged': False,\n", - " 'lock_t_inner_cycles': 1,\n", - " 't_inner_update_exponent': -0.5,\n", - " 't_rad': {'damping_constant': 0.5, 'threshold': 0.05},\n", - " 'w': {'damping_constant': 0.5, 'threshold': 0.05}},\n", - " 'virtual_spectrum_spawn_range': {'start': ,\n", - " 'end': },\n", - " 'enable_reflective_inner_boundary': False,\n", - " 'inner_boundary_albedo': 0.0,\n", - " 'enable_full_relativity': False,\n", - " 'debug_packets': False,\n", - " 'logger_buffer': 1,\n", - " 'single_packet_seed': -1},\n", - " 'spectrum': {'start': ,\n", - " 'stop': ,\n", - " 'num': 10000,\n", - " 'method': 'virtual',\n", - " 'integrated': {'points': 1000, 'interpolate_shells': 0},\n", - " 'virtual': {'tau_russian': 10.0,\n", - " 'survival_probability': 0.0,\n", - " 'enable_biasing': False,\n", - " 'virtual_packet_logging': False}},\n", - " 'config_dirname': ''}" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# The config generated from the user's yml file.\n", "tg.config" @@ -283,79 +103,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
model.abundances.Hmodel.abundances.Hemodel.structure.velocity.startplasma.initial_t_inner
01.00.0100005000
10.40.6120006000
20.70.3150007000
\n", - "
" - ], - "text/plain": [ - " model.abundances.H model.abundances.He model.structure.velocity.start \\\n", - "0 1.0 0.0 10000 \n", - "1 0.4 0.6 12000 \n", - "2 0.7 0.3 15000 \n", - "\n", - " plasma.initial_t_inner \n", - "0 5000 \n", - "1 6000 \n", - "2 7000 " - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# The user specified grid.\n", "tg.grid" @@ -372,18 +122,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "tg.config is the original config: {'type': 'uniform', 'He': 0.2, 'H': 0.8}\n", - "The new config is modified: {'type': 'uniform', 'He': 0.0, 'H': 1.0}\n" - ] - } - ], + "outputs": [], "source": [ "# Easily get a new TARDIS Configuration object \n", "# which has the properties of the base self.config\n", @@ -395,20 +136,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# In case a user needs to make more complicated changes\n", "# to the base TARDIS model (i.e. using parameters that \n", @@ -420,73 +150,9 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/src/dev/tardis/tardis/montecarlo/montecarlo_numba/base.py:195: NumbaTypeSafetyWarning: \u001b[1m\u001b[1m\u001b[1munsafe cast from uint64 to int64. Precision may be lost.\u001b[0m\u001b[0m\u001b[0m\n", - " vpacket_collection = vpacket_collections[i]\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n" - ] - }, - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Shell No. t_rad next_t_rad w next_w
05e+035.01e+030.390.4
54.95e+034.95e+030.190.195
104.91e+034.9e+030.1230.127
154.87e+034.86e+030.08690.0907
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/marcwilliamson/miniconda3/envs/numbatardis/lib/python3.7/site-packages/astropy/units/equivalencies.py:124: RuntimeWarning: divide by zero encountered in double_scalars\n", - " (si.m, si.Hz, lambda x: _si.c.value / x),\n", - " (\u001b[1mwarnings.py\u001b[0m:110)\n" - ] - } - ], + "outputs": [], "source": [ "# Users can easily run a full TARDIS simulation\n", "# using the grid.\n", From 28dc1424523fe78cb6f8d28febdc6285df93ece3 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Thu, 22 Jul 2021 14:26:32 -0400 Subject: [PATCH 18/19] added kwarg pass through for run_tardis kwargs. --- tardis/grid/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tardis/grid/base.py b/tardis/grid/base.py index 14f2c4227c0..8f27e218431 100644 --- a/tardis/grid/base.py +++ b/tardis/grid/base.py @@ -111,7 +111,7 @@ def grid_row_to_model(self, row_index): model = Radial1DModel.from_config(rowconfig) return model - def run_sim_from_grid(self, row_index): + def run_sim_from_grid(self, row_index, **tardiskwargs): """ Runs a full TARDIS simulation using the base self.config modified by the user specified row_index. @@ -127,7 +127,7 @@ def run_sim_from_grid(self, row_index): Completed TARDIS simulation object. """ tardis_config = self.grid_row_to_config(row_index) - sim = tardis.run_tardis(tardis_config) + sim = tardis.run_tardis(tardis_config, **tardiskwargs) return sim def save_grid(self, filename): From d853ec39c300725fb2fc756c4f4331b58b754653 Mon Sep 17 00:00:00 2001 From: Marc Williamson Date: Wed, 28 Jul 2021 10:28:40 -0400 Subject: [PATCH 19/19] Fixed docstring --- tardis/grid/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tardis/grid/base.py b/tardis/grid/base.py index 8f27e218431..28ac97bf864 100644 --- a/tardis/grid/base.py +++ b/tardis/grid/base.py @@ -40,8 +40,8 @@ class tardisGrid: Parameters ---------- - configFile : str - path to TARDIS yml file. + configFile : str or dict + path to TARDIS yml file, or a pre-validated config dictionary. gridFrame : pandas.core.frame.DataFrame dataframe where each row is a set of parameters for a TARDIS simulation.