diff --git a/docs/installation.rst b/docs/installation.rst index 58dd31d4e60..3304b8a5622 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -68,8 +68,12 @@ and after you are done with TARDIS you can deactivate:: One does not need to recreate the environment, but simply activate it every time TARDIS is used. -Since TARDIS has reached a mature state, we recommend always installing the -latest development version:: +For TARDIS development purposes please follow the steps :ref:`here ` +until the step to install TARDIS in the development mode +``python setup.py develop``. + +You can also install TARDIS for the latest development version +(but this is only recommended for pure users):: pip install git+https://github.com/tardis-sn/tardis diff --git a/docs/research/code_comparison/index.rst b/docs/research/code_comparison/index.rst index 2b26737bf3a..ea34b681d3c 100644 --- a/docs/research/code_comparison/index.rst +++ b/docs/research/code_comparison/index.rst @@ -6,6 +6,12 @@ codes to understand systematics uncertainties and different strategies. The first meeting is summarized `here `_. +The description of file formats used can be found here +``_. + +For our code comparison, we will calculate spectra at 5, 10, 15, 20 days post +explosion. + .. toctree:: toy_models/reading blondin toymodel diff --git a/docs/research/code_comparison/toy_models/reading blondin toymodel.ipynb b/docs/research/code_comparison/toy_models/reading blondin toymodel.ipynb index 13db7a52b0b..81764f130cc 100644 --- a/docs/research/code_comparison/toy_models/reading blondin toymodel.ipynb +++ b/docs/research/code_comparison/toy_models/reading blondin toymodel.ipynb @@ -22,16 +22,20 @@ } ], "source": [ - "import pandas as pd\n", "import re\n", - "from tardis.util.base import parse_quantity\n", + "import base64\n", + "\n", + "import pandas as pd\n", "import numpy as np\n", + "\n", "import yaml\n", + "\n", "from tardis import run_tardis\n", "from astropy import units as u\n", - "import base64\n", + "\n", "from IPython.display import HTML\n", - "\n" + "\n", + "from tardis.io.parsers import read_blondin_toymodel, convert_blondin_toymodel\n" ] }, { @@ -64,53 +68,7 @@ " return HTML(html)\n", "\n", "pattern_remove_bracket = re.compile('\\[.+\\]')\n", - "t0_pattern = re.compile('tend = (.+)\\n')\n", - "\n", - "\n", - "def read_blondin_toymodel(fname):\n", - " with open(fname, 'r') as fh:\n", - " for line in fh:\n", - " if line.startswith(\"#idx\"):\n", - " break\n", - " else:\n", - " raise ValueError('File {0} does not conform to Toy Model format as it does not contain #idx')\n", - " columns = [pattern_remove_bracket.sub('', item) for item in line[1:].split()]\n", - " \n", - " raw_blondin_csv = pd.read_csv(fname, delim_whitespace=True, comment='#', header=None, names=columns)\n", - " raw_blondin_csv.set_index('idx', inplace=True)\n", - " \n", - " blondin_csv = raw_blondin_csv.loc[:, ['vel', 'dens', 'temp', 'X_56Ni0', 'X_Ti', 'X_Ca', 'X_S', 'X_Si', 'X_O', 'X_C']]\n", - " rename_col_dict = {'vel':'velocity', 'dens':'density', 'temp':'t_rad'}\n", - " rename_col_dict.update({item:item[2:] for item in blondin_csv.columns[3:]})\n", - " rename_col_dict['X_56Ni0'] = 'Ni56'\n", - " blondin_csv.rename(columns=rename_col_dict, inplace=True)\n", - " blondin_csv.iloc[:, 3:] = blondin_csv.iloc[:,3:].divide(blondin_csv.iloc[:,3:].sum(axis=1), axis=0)\n", - " \n", - " \n", - " #changing velocities to outer boundary\n", - " new_velocities = 0.5 * (blondin_csv.velocity.iloc[:-1].values + blondin_csv.velocity.iloc[1:].values)\n", - " new_velocities = np.hstack((new_velocities, [2 * new_velocities[-1] - new_velocities[-2]]))\n", - " blondin_csv['velocity'] = new_velocities\n", - " \n", - " \n", - " \n", - " with open(fname, 'r') as fh:\n", - " t0_string = t0_pattern.findall(fh.read())[0]\n", - " \n", - " t0 = parse_quantity(t0_string.replace('DAYS', 'day'))\n", - " blondin_dict = {}\n", - " blondin_dict['model_density_time_0'] = str(t0)\n", - " blondin_dict['description'] = 'Converted {0} to csvy format'.format(fname)\n", - " blondin_dict['tardis_model_config_version'] = 'v1.0'\n", - " blondin_dict_fields = [dict(name='velocity', unit='km/s', desc='velocities of shell outer bounderies.')]\n", - " blondin_dict_fields.append(dict(name='density', unit='g/cm^3', desc='mean density of shell.'))\n", - " blondin_dict_fields.append(dict(name='t_rad', unit='K', desc='radiative temperature.'))\n", - " \n", - " for abund in blondin_csv.columns[3:]:\n", - " blondin_dict_fields.append(dict(name=abund, desc='Fraction {0} abundance'.format(abund)))\n", - " blondin_dict['datatype'] = {'fields':blondin_dict_fields}\n", - " \n", - " return blondin_dict, blondin_csv" + "t0_pattern = re.compile('tend = (.+)\\n')" ] }, { @@ -126,7 +84,16 @@ "metadata": {}, "outputs": [], "source": [ - "blondin_dict, blondin_csv = read_blondin_toymodel('snia_toy01.dat')" + "convert_blondin_toymodel('snia_toy01.dat', 'snia_toy01.test.csvy', 9000, 30000, conversion_t_electron_rad=1/0.9)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "!code snia_toy01.test.csvy" ] }, { @@ -4385,6 +4352,2017 @@ "create_df_download_link(spectrum, title='Download Spectrum', filename='spectrum.csv', type='csv')" ] }, + { + "cell_type": "code", + "execution_count": 23, + "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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + "
0123456789...210211212213214215216217218219
atomic_numberion_number
1403.371573e-152.836444e-152.419784e-152.136677e-151.999989e-152.054821e-152.110358e-152.153097e-152.178870e-152.396495e-15...3.099967e-093.105191e-093.119057e-093.211761e-093.355139e-093.226573e-093.442658e-093.458125e-093.453447e-093.465355e-09
12.022453e-061.705701e-061.462930e-061.291823e-061.208121e-061.225786e-061.248424e-061.263770e-061.269590e-061.375301e-06...7.935683e-027.986164e-028.051595e-028.248215e-028.528176e-028.360084e-028.762037e-028.833458e-028.872181e-028.938419e-02
23.887190e-013.393144e-013.008827e-012.707304e-012.546273e-012.514531e-012.505741e-012.486651e-012.454469e-012.545289e-01...9.206432e-019.201384e-019.194840e-019.175178e-019.147182e-019.163992e-019.123796e-019.116654e-019.112782e-019.106158e-01
36.112531e-016.606446e-016.990609e-017.291956e-017.452862e-017.484558e-017.493327e-017.512385e-017.544522e-017.453764e-01...3.653376e-093.585998e-093.481458e-093.266309e-092.989207e-093.137543e-092.781066e-092.722738e-092.685372e-092.637792e-09
42.587464e-053.930435e-055.492756e-057.275498e-058.533674e-058.983376e-059.201249e-059.513098e-059.956385e-059.331045e-05...3.671725e-253.512867e-253.268472e-252.814316e-252.286085e-252.557571e-251.930661e-251.837662e-251.778037e-251.706548e-25
50.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
60.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
70.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
80.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
90.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
100.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
110.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
120.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
130.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
140.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
1602.016802e-121.658852e-121.393517e-121.205457e-121.110193e-121.112130e-121.121180e-121.122548e-121.114228e-121.198344e-12...1.249653e-061.246017e-061.245134e-061.258252e-061.280630e-061.251831e-061.286763e-061.284397e-061.278783e-061.275507e-06
12.394294e-042.040317e-041.771086e-041.569568e-041.464626e-041.456358e-041.459572e-041.454903e-041.440266e-041.517962e-04...9.957734e-019.958178e-019.958872e-019.960498e-019.962669e-019.961392e-019.964290e-019.964735e-019.964994e-019.965363e-01
28.434871e-018.111234e-017.807144e-017.526197e-017.357674e-017.320337e-017.308866e-017.286039e-017.248339e-017.346920e-01...4.225326e-034.180994e-034.111542e-033.948930e-033.731861e-033.859506e-033.569744e-033.525171e-033.499367e-033.462394e-03
31.562730e-011.886718e-012.191073e-012.472216e-012.640839e-012.678184e-012.689651e-012.712481e-012.750194e-012.651538e-01...8.812221e-138.555966e-138.161771e-137.350285e-136.352517e-136.895675e-135.650228e-135.461861e-135.345989e-135.195702e-13
44.416652e-077.660508e-071.195779e-061.740700e-062.154429e-062.302852e-062.373892e-062.478209e-062.630008e-062.404086e-06...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
51.740392e-205.708941e-201.493104e-193.421705e-195.532661e-196.679461e-197.371750e-198.355242e-199.808088e-198.453664e-19...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
60.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
70.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
80.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
90.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
100.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
110.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
120.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
130.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
140.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...0.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
.....................................................................
27270.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
2803.867508e-153.345109e-152.918472e-152.607352e-152.446026e-152.476290e-152.512104e-152.533291e-152.535729e-152.725434e-15...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
14.768144e-064.199161e-063.730841e-063.373334e-063.185213e-063.198249e-063.225992e-063.237521e-063.228287e-063.416276e-06...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
27.608692e-017.150802e-016.735910e-016.363741e-016.145266e-016.092583e-016.073952e-016.041015e-015.989427e-016.108105e-01...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
32.391261e-012.849156e-013.264053e-013.636225e-013.854702e-013.907384e-013.926015e-013.958952e-014.010540e-013.891860e-01...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
45.988713e-091.116299e-081.840678e-082.814457e-083.588567e-083.917661e-084.094012e-084.337653e-084.679478e-084.298233e-08...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
51.638349e-246.005792e-241.712472e-234.242307e-237.190971e-238.956895e-231.008317e-221.168034e-221.405184e-221.216072e-22...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
60.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
70.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
80.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
90.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
100.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
110.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
120.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
130.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
140.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
150.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
160.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
170.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
180.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
190.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
200.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
210.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
220.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
230.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
240.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
250.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
260.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
270.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
280.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
\n", + "

137 rows × 220 columns

\n", + "
" + ], + "text/plain": [ + " 0 1 2 \\\n", + "atomic_number ion_number \n", + "14 0 3.371573e-15 2.836444e-15 2.419784e-15 \n", + " 1 2.022453e-06 1.705701e-06 1.462930e-06 \n", + " 2 3.887190e-01 3.393144e-01 3.008827e-01 \n", + " 3 6.112531e-01 6.606446e-01 6.990609e-01 \n", + " 4 2.587464e-05 3.930435e-05 5.492756e-05 \n", + " 5 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "16 0 2.016802e-12 1.658852e-12 1.393517e-12 \n", + " 1 2.394294e-04 2.040317e-04 1.771086e-04 \n", + " 2 8.434871e-01 8.111234e-01 7.807144e-01 \n", + " 3 1.562730e-01 1.886718e-01 2.191073e-01 \n", + " 4 4.416652e-07 7.660508e-07 1.195779e-06 \n", + " 5 1.740392e-20 5.708941e-20 1.493104e-19 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "... ... ... ... \n", + "27 27 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "28 0 3.867508e-15 3.345109e-15 2.918472e-15 \n", + " 1 4.768144e-06 4.199161e-06 3.730841e-06 \n", + " 2 7.608692e-01 7.150802e-01 6.735910e-01 \n", + " 3 2.391261e-01 2.849156e-01 3.264053e-01 \n", + " 4 5.988713e-09 1.116299e-08 1.840678e-08 \n", + " 5 1.638349e-24 6.005792e-24 1.712472e-23 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 15 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 16 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 17 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 18 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 19 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 20 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 21 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 22 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 23 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 24 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 25 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 26 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 27 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 28 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "\n", + " 3 4 5 \\\n", + "atomic_number ion_number \n", + "14 0 2.136677e-15 1.999989e-15 2.054821e-15 \n", + " 1 1.291823e-06 1.208121e-06 1.225786e-06 \n", + " 2 2.707304e-01 2.546273e-01 2.514531e-01 \n", + " 3 7.291956e-01 7.452862e-01 7.484558e-01 \n", + " 4 7.275498e-05 8.533674e-05 8.983376e-05 \n", + " 5 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "16 0 1.205457e-12 1.110193e-12 1.112130e-12 \n", + " 1 1.569568e-04 1.464626e-04 1.456358e-04 \n", + " 2 7.526197e-01 7.357674e-01 7.320337e-01 \n", + " 3 2.472216e-01 2.640839e-01 2.678184e-01 \n", + " 4 1.740700e-06 2.154429e-06 2.302852e-06 \n", + " 5 3.421705e-19 5.532661e-19 6.679461e-19 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "... ... ... ... \n", + "27 27 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "28 0 2.607352e-15 2.446026e-15 2.476290e-15 \n", + " 1 3.373334e-06 3.185213e-06 3.198249e-06 \n", + " 2 6.363741e-01 6.145266e-01 6.092583e-01 \n", + " 3 3.636225e-01 3.854702e-01 3.907384e-01 \n", + " 4 2.814457e-08 3.588567e-08 3.917661e-08 \n", + " 5 4.242307e-23 7.190971e-23 8.956895e-23 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 15 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 16 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 17 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 18 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 19 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 20 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 21 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 22 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 23 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 24 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 25 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 26 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 27 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 28 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "\n", + " 6 7 8 \\\n", + "atomic_number ion_number \n", + "14 0 2.110358e-15 2.153097e-15 2.178870e-15 \n", + " 1 1.248424e-06 1.263770e-06 1.269590e-06 \n", + " 2 2.505741e-01 2.486651e-01 2.454469e-01 \n", + " 3 7.493327e-01 7.512385e-01 7.544522e-01 \n", + " 4 9.201249e-05 9.513098e-05 9.956385e-05 \n", + " 5 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "16 0 1.121180e-12 1.122548e-12 1.114228e-12 \n", + " 1 1.459572e-04 1.454903e-04 1.440266e-04 \n", + " 2 7.308866e-01 7.286039e-01 7.248339e-01 \n", + " 3 2.689651e-01 2.712481e-01 2.750194e-01 \n", + " 4 2.373892e-06 2.478209e-06 2.630008e-06 \n", + " 5 7.371750e-19 8.355242e-19 9.808088e-19 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "... ... ... ... \n", + "27 27 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "28 0 2.512104e-15 2.533291e-15 2.535729e-15 \n", + " 1 3.225992e-06 3.237521e-06 3.228287e-06 \n", + " 2 6.073952e-01 6.041015e-01 5.989427e-01 \n", + " 3 3.926015e-01 3.958952e-01 4.010540e-01 \n", + " 4 4.094012e-08 4.337653e-08 4.679478e-08 \n", + " 5 1.008317e-22 1.168034e-22 1.405184e-22 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 15 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 16 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 17 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 18 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 19 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 20 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 21 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 22 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 23 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 24 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 25 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 26 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 27 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 28 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "\n", + " 9 ... 210 211 \\\n", + "atomic_number ion_number ... \n", + "14 0 2.396495e-15 ... 3.099967e-09 3.105191e-09 \n", + " 1 1.375301e-06 ... 7.935683e-02 7.986164e-02 \n", + " 2 2.545289e-01 ... 9.206432e-01 9.201384e-01 \n", + " 3 7.453764e-01 ... 3.653376e-09 3.585998e-09 \n", + " 4 9.331045e-05 ... 3.671725e-25 3.512867e-25 \n", + " 5 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + "16 0 1.198344e-12 ... 1.249653e-06 1.246017e-06 \n", + " 1 1.517962e-04 ... 9.957734e-01 9.958178e-01 \n", + " 2 7.346920e-01 ... 4.225326e-03 4.180994e-03 \n", + " 3 2.651538e-01 ... 8.812221e-13 8.555966e-13 \n", + " 4 2.404086e-06 ... 0.000000e+00 0.000000e+00 \n", + " 5 8.453664e-19 ... 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 ... 0.000000e+00 0.000000e+00 \n", + "... ... ... ... ... \n", + "27 27 0.000000e+00 ... NaN NaN \n", + "28 0 2.725434e-15 ... NaN NaN \n", + " 1 3.416276e-06 ... NaN NaN \n", + " 2 6.108105e-01 ... NaN NaN \n", + " 3 3.891860e-01 ... NaN NaN \n", + " 4 4.298233e-08 ... NaN NaN \n", + " 5 1.216072e-22 ... NaN NaN \n", + " 6 0.000000e+00 ... NaN NaN \n", + " 7 0.000000e+00 ... NaN NaN \n", + " 8 0.000000e+00 ... NaN NaN \n", + " 9 0.000000e+00 ... NaN NaN \n", + " 10 0.000000e+00 ... NaN NaN \n", + " 11 0.000000e+00 ... NaN NaN \n", + " 12 0.000000e+00 ... NaN NaN \n", + " 13 0.000000e+00 ... NaN NaN \n", + " 14 0.000000e+00 ... NaN NaN \n", + " 15 0.000000e+00 ... NaN NaN \n", + " 16 0.000000e+00 ... NaN NaN \n", + " 17 0.000000e+00 ... NaN NaN \n", + " 18 0.000000e+00 ... NaN NaN \n", + " 19 0.000000e+00 ... NaN NaN \n", + " 20 0.000000e+00 ... NaN NaN \n", + " 21 0.000000e+00 ... NaN NaN \n", + " 22 0.000000e+00 ... NaN NaN \n", + " 23 0.000000e+00 ... NaN NaN \n", + " 24 0.000000e+00 ... NaN NaN \n", + " 25 0.000000e+00 ... NaN NaN \n", + " 26 0.000000e+00 ... NaN NaN \n", + " 27 0.000000e+00 ... NaN NaN \n", + " 28 0.000000e+00 ... NaN NaN \n", + "\n", + " 212 213 214 \\\n", + "atomic_number ion_number \n", + "14 0 3.119057e-09 3.211761e-09 3.355139e-09 \n", + " 1 8.051595e-02 8.248215e-02 8.528176e-02 \n", + " 2 9.194840e-01 9.175178e-01 9.147182e-01 \n", + " 3 3.481458e-09 3.266309e-09 2.989207e-09 \n", + " 4 3.268472e-25 2.814316e-25 2.286085e-25 \n", + " 5 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "16 0 1.245134e-06 1.258252e-06 1.280630e-06 \n", + " 1 9.958872e-01 9.960498e-01 9.962669e-01 \n", + " 2 4.111542e-03 3.948930e-03 3.731861e-03 \n", + " 3 8.161771e-13 7.350285e-13 6.352517e-13 \n", + " 4 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 5 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "... ... ... ... \n", + "27 27 NaN NaN NaN \n", + "28 0 NaN NaN NaN \n", + " 1 NaN NaN NaN \n", + " 2 NaN NaN NaN \n", + " 3 NaN NaN NaN \n", + " 4 NaN NaN NaN \n", + " 5 NaN NaN NaN \n", + " 6 NaN NaN NaN \n", + " 7 NaN NaN NaN \n", + " 8 NaN NaN NaN \n", + " 9 NaN NaN NaN \n", + " 10 NaN NaN NaN \n", + " 11 NaN NaN NaN \n", + " 12 NaN NaN NaN \n", + " 13 NaN NaN NaN \n", + " 14 NaN NaN NaN \n", + " 15 NaN NaN NaN \n", + " 16 NaN NaN NaN \n", + " 17 NaN NaN NaN \n", + " 18 NaN NaN NaN \n", + " 19 NaN NaN NaN \n", + " 20 NaN NaN NaN \n", + " 21 NaN NaN NaN \n", + " 22 NaN NaN NaN \n", + " 23 NaN NaN NaN \n", + " 24 NaN NaN NaN \n", + " 25 NaN NaN NaN \n", + " 26 NaN NaN NaN \n", + " 27 NaN NaN NaN \n", + " 28 NaN NaN NaN \n", + "\n", + " 215 216 217 \\\n", + "atomic_number ion_number \n", + "14 0 3.226573e-09 3.442658e-09 3.458125e-09 \n", + " 1 8.360084e-02 8.762037e-02 8.833458e-02 \n", + " 2 9.163992e-01 9.123796e-01 9.116654e-01 \n", + " 3 3.137543e-09 2.781066e-09 2.722738e-09 \n", + " 4 2.557571e-25 1.930661e-25 1.837662e-25 \n", + " 5 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "16 0 1.251831e-06 1.286763e-06 1.284397e-06 \n", + " 1 9.961392e-01 9.964290e-01 9.964735e-01 \n", + " 2 3.859506e-03 3.569744e-03 3.525171e-03 \n", + " 3 6.895675e-13 5.650228e-13 5.461861e-13 \n", + " 4 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 5 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "... ... ... ... \n", + "27 27 NaN NaN NaN \n", + "28 0 NaN NaN NaN \n", + " 1 NaN NaN NaN \n", + " 2 NaN NaN NaN \n", + " 3 NaN NaN NaN \n", + " 4 NaN NaN NaN \n", + " 5 NaN NaN NaN \n", + " 6 NaN NaN NaN \n", + " 7 NaN NaN NaN \n", + " 8 NaN NaN NaN \n", + " 9 NaN NaN NaN \n", + " 10 NaN NaN NaN \n", + " 11 NaN NaN NaN \n", + " 12 NaN NaN NaN \n", + " 13 NaN NaN NaN \n", + " 14 NaN NaN NaN \n", + " 15 NaN NaN NaN \n", + " 16 NaN NaN NaN \n", + " 17 NaN NaN NaN \n", + " 18 NaN NaN NaN \n", + " 19 NaN NaN NaN \n", + " 20 NaN NaN NaN \n", + " 21 NaN NaN NaN \n", + " 22 NaN NaN NaN \n", + " 23 NaN NaN NaN \n", + " 24 NaN NaN NaN \n", + " 25 NaN NaN NaN \n", + " 26 NaN NaN NaN \n", + " 27 NaN NaN NaN \n", + " 28 NaN NaN NaN \n", + "\n", + " 218 219 \n", + "atomic_number ion_number \n", + "14 0 3.453447e-09 3.465355e-09 \n", + " 1 8.872181e-02 8.938419e-02 \n", + " 2 9.112782e-01 9.106158e-01 \n", + " 3 2.685372e-09 2.637792e-09 \n", + " 4 1.778037e-25 1.706548e-25 \n", + " 5 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 \n", + "16 0 1.278783e-06 1.275507e-06 \n", + " 1 9.964994e-01 9.965363e-01 \n", + " 2 3.499367e-03 3.462394e-03 \n", + " 3 5.345989e-13 5.195702e-13 \n", + " 4 0.000000e+00 0.000000e+00 \n", + " 5 0.000000e+00 0.000000e+00 \n", + " 6 0.000000e+00 0.000000e+00 \n", + " 7 0.000000e+00 0.000000e+00 \n", + " 8 0.000000e+00 0.000000e+00 \n", + " 9 0.000000e+00 0.000000e+00 \n", + " 10 0.000000e+00 0.000000e+00 \n", + " 11 0.000000e+00 0.000000e+00 \n", + " 12 0.000000e+00 0.000000e+00 \n", + " 13 0.000000e+00 0.000000e+00 \n", + " 14 0.000000e+00 0.000000e+00 \n", + "... ... ... \n", + "27 27 NaN NaN \n", + "28 0 NaN NaN \n", + " 1 NaN NaN \n", + " 2 NaN NaN \n", + " 3 NaN NaN \n", + " 4 NaN NaN \n", + " 5 NaN NaN \n", + " 6 NaN NaN \n", + " 7 NaN NaN \n", + " 8 NaN NaN \n", + " 9 NaN NaN \n", + " 10 NaN NaN \n", + " 11 NaN NaN \n", + " 12 NaN NaN \n", + " 13 NaN NaN \n", + " 14 NaN NaN \n", + " 15 NaN NaN \n", + " 16 NaN NaN \n", + " 17 NaN NaN \n", + " 18 NaN NaN \n", + " 19 NaN NaN \n", + " 20 NaN NaN \n", + " 21 NaN NaN \n", + " 22 NaN NaN \n", + " 23 NaN NaN \n", + " 24 NaN NaN \n", + " 25 NaN NaN \n", + " 26 NaN NaN \n", + " 27 NaN NaN \n", + " 28 NaN NaN \n", + "\n", + "[137 rows x 220 columns]" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sim.plasma.ion_number_density / sim.plasma.number_density" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/docs/research/index.rst b/docs/research/index.rst index 5a4636c39f7..73ca1d90e90 100644 --- a/docs/research/index.rst +++ b/docs/research/index.rst @@ -7,6 +7,7 @@ but also give an overview over our efforts. + .. toctree:: :maxdepth: 3 diff --git a/tardis/io/parsers/__init__.py b/tardis/io/parsers/__init__.py index e69de29bb2d..a5bdddb0a28 100644 --- a/tardis/io/parsers/__init__.py +++ b/tardis/io/parsers/__init__.py @@ -0,0 +1,3 @@ +from tardis.io.parsers.blondin_toymodel import (read_blondin_toymodel, + convert_blondin_toymodel) + diff --git a/tardis/io/parsers/blondin_toymodel.py b/tardis/io/parsers/blondin_toymodel.py index 7b9d248069c..ef7ac4ab7d2 100644 --- a/tardis/io/parsers/blondin_toymodel.py +++ b/tardis/io/parsers/blondin_toymodel.py @@ -9,8 +9,6 @@ from tardis.util.base import parse_quantity - - PATTERN_REMOVE_BRACKET = re.compile('\[.+\]') T0_PATTERN = re.compile('tend = (.+)\n') @@ -90,24 +88,42 @@ def read_blondin_toymodel(fname): return blondin_dict, blondin_csv -def convert_blondin_toymodel(in_fname, out_fname, v_inner, v_outer): +def convert_blondin_toymodel(in_fname, out_fname, v_inner, v_outer, + conversion_t_electron_rad=None): """ Parameters ---------- - in_fname - out_fname - v_inner - v_outer - - Returns - ------- - + in_fname: str + input toymodel file + out_fname: str + output csvy file + + conversion_t_electron_rad: float or None + multiplicative conversion factor from t_electron to t_rad. + if `None` t_rad is not calculated + + v_inner: float or astropy.unit.Quantity + inner boundary velocity. If float will be interpreted as km/s + v_outer: float or astropy.unit.Quantity + outer boundary velocity. If float will be interpreted as km/s """ blondin_dict, blondin_csv = read_blondin_toymodel(in_fname) blondin_dict['v_inner_boundary'] = str(u.Quantity(v_inner, u.km / u.s)) blondin_dict['v_outer_boundary'] = str(u.Quantity(v_outer, u.km / u.s)) + if conversion_t_electron_rad is not None: + blondin_dict['datatype']['fields'].append({ + 'desc': + 'converted radiation temperature ' + 'using multiplicative factor={0}'.format( + conversion_t_electron_rad), + 'name': 't_rad', 'unit': 'K'}) + + blondin_csv['t_rad'] = (conversion_t_electron_rad * + blondin_csv.t_electron) + + csvy_file = '---\n{0}\n---\n{1}'.format( yaml.dump(blondin_dict, default_flow_style=False), blondin_csv.to_csv(index=False))