diff --git a/docs/running/configuration/config_validator.rst b/docs/configuration/config_validator.rst similarity index 100% rename from docs/running/configuration/config_validator.rst rename to docs/configuration/config_validator.rst diff --git a/docs/running/configuration/configuration.rst b/docs/configuration/configuration.rst similarity index 98% rename from docs/running/configuration/configuration.rst rename to docs/configuration/configuration.rst index 77db778ec7c..b6d1b07e7fd 100644 --- a/docs/running/configuration/configuration.rst +++ b/docs/configuration/configuration.rst @@ -7,8 +7,7 @@ Configuration File TARDIS uses the `YAML markup language `_ for its configuration files. There are several sections which allow different settings for the different aspects of the TARDIS calculation. An example -configuration file (with a small subset of the options that can be specified) can be downloaded :download:`here -<../examples/tardis_example.yml>`. +configuration file (with a small subset of the options that can be specified) can be downloaded at `example_yml`_. .. warning:: One should note that currently floats in YAML need to be specified in a special format: @@ -24,6 +23,10 @@ can be seen here: The following shows all the options (and their default settings) that are available for TARDIS. No other options are allowed or available + +.. contents:: Overview + :local: + Configuration Schema ==================== @@ -159,3 +162,5 @@ just an integer. Finally, the method option selects the final spectral synthesis interaction mode. Note also the limitations listed at the bottom of the dedicated page. + +.. include:: ../running/example_data.inc \ No newline at end of file diff --git a/docs/running/configuration/index.rst b/docs/configuration/index.rst similarity index 100% rename from docs/running/configuration/index.rst rename to docs/configuration/index.rst diff --git a/docs/running/configuration/read_configuration.ipynb b/docs/configuration/read_configuration.ipynb similarity index 100% rename from docs/running/configuration/read_configuration.ipynb rename to docs/configuration/read_configuration.ipynb diff --git a/docs/configuration/schemas/base.yml b/docs/configuration/schemas/base.yml new file mode 120000 index 00000000000..86d21969b04 --- /dev/null +++ b/docs/configuration/schemas/base.yml @@ -0,0 +1 @@ +../../../tardis/io/schemas/base.yml \ No newline at end of file diff --git a/docs/configuration/schemas/model.yml b/docs/configuration/schemas/model.yml new file mode 120000 index 00000000000..d0141ba515a --- /dev/null +++ b/docs/configuration/schemas/model.yml @@ -0,0 +1 @@ +../../../tardis/io/schemas/model.yml \ No newline at end of file diff --git a/docs/configuration/schemas/montecarlo.yml b/docs/configuration/schemas/montecarlo.yml new file mode 120000 index 00000000000..72bdd903650 --- /dev/null +++ b/docs/configuration/schemas/montecarlo.yml @@ -0,0 +1 @@ +../../../tardis/io/schemas/montecarlo.yml \ No newline at end of file diff --git a/docs/configuration/schemas/plasma.yml b/docs/configuration/schemas/plasma.yml new file mode 120000 index 00000000000..989d5be8b71 --- /dev/null +++ b/docs/configuration/schemas/plasma.yml @@ -0,0 +1 @@ +../../../tardis/io/schemas/plasma.yml \ No newline at end of file diff --git a/docs/configuration/schemas/spectrum.yml b/docs/configuration/schemas/spectrum.yml new file mode 120000 index 00000000000..3cc32e4b316 --- /dev/null +++ b/docs/configuration/schemas/spectrum.yml @@ -0,0 +1 @@ +../../../tardis/io/schemas/spectrum.yml \ No newline at end of file diff --git a/docs/configuration/schemas/supernova.yml b/docs/configuration/schemas/supernova.yml new file mode 120000 index 00000000000..d157db4f384 --- /dev/null +++ b/docs/configuration/schemas/supernova.yml @@ -0,0 +1 @@ +../../../tardis/io/schemas/supernova.yml \ No newline at end of file diff --git a/docs/yml_files/integration.yml b/docs/development/integration.yml similarity index 100% rename from docs/yml_files/integration.yml rename to docs/development/integration.yml diff --git a/docs/quickstart/quickstart.ipynb b/docs/quickstart/quickstart.ipynb index bbb8ff63a31..66464209843 100644 --- a/docs/quickstart/quickstart.ipynb +++ b/docs/quickstart/quickstart.ipynb @@ -36,6 +36,13 @@ "from tardis.io.atom_data.util import download_atom_data" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Downloading the atomic data ####" + ] + }, { "cell_type": "code", "execution_count": 2, @@ -54,6 +61,13 @@ "download_atom_data('kurucz_cd23_chianti_H_He')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Running the simulation (long output) ####" + ] + }, { "cell_type": "code", "execution_count": 3, @@ -355,23 +369,23 @@ "sim = run_tardis('tardis_example.yml')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Plotting the Spectrum ####" + ] + }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/wkerzend/miniconda/envs/tardis3/lib/python3.6/site-packages/matplotlib/style/core.py:167: UserWarning: In /Users/wkerzend/.matplotlib/stylelib/talk_default.mplstyle: \n", - "The text.latex.unicode rcparam was deprecated in Matplotlib 2.2 and will be removed in 3.1.\n", - " styles = read_style_directory(stylelib_path)\n", - " (\u001b[1mwarnings.py\u001b[0m:99)\n", - "Populating the interactive namespace from numpy and matplotlib\n", - "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/wkerzend/miniconda/envs/tardis3/lib/python3.6/site-packages/astropy/units/quantity.py:1067: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError.\n", - " AstropyDeprecationWarning)\n", - " (\u001b[1mwarnings.py\u001b[0m:99)\n" + "Populating the interactive namespace from numpy and matplotlib\n" ] }, { @@ -1157,7 +1171,7 @@ { "data": { "text/html": [ - "" + "" ], "text/plain": [ "" @@ -1169,10 +1183,10 @@ { "data": { "text/plain": [ - "Text(0, 0.5, 'Luminosity [erg/s/$\\\\AA$]')" + "(3000, 9000)" ] }, - "execution_count": 4, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -1180,18 +1194,28 @@ "source": [ "%pylab notebook\n", "\n", - "spectrum = sim.runner.spectrum_integrated\n", + "spectrum = sim.runner.spectrum\n", + "spectrum_virtual = sim.runner.spectrum_virtual\n", + "spectrum_integrated = sim.runner.spectrum_integrated\n", "\n", - "plot(spectrum.wavelength, spectrum.luminosity_density_lambda)\n", + "plot(spectrum.wavelength, spectrum.luminosity_density_lambda, label='normal packets')\n", + "plot(spectrum.wavelength, spectrum_virtual.luminosity_density_lambda, label='virtual packets')\n", + "plot(spectrum.wavelength, spectrum_integrated.luminosity_density_lambda, label='formal integral')\n", "xlabel('Wavelength [$\\AA$]')\n", - "ylabel('Luminosity [erg/s/$\\AA$]')" + "ylabel('Luminosity [erg/s/$\\AA$]')\n", + "legend()\n", + "xlim(3000, 9000)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { - "nbsphinx": { - "execute": "auto" - }, "kernelspec": { "display_name": "Python 3", "language": "python", @@ -1208,6 +1232,9 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.8" + }, + "nbsphinx": { + "execute": "auto" } }, "nbformat": 4, diff --git a/docs/running/configuration/schemas/base.yml b/docs/running/configuration/schemas/base.yml deleted file mode 120000 index 77b52a2a01e..00000000000 --- a/docs/running/configuration/schemas/base.yml +++ /dev/null @@ -1 +0,0 @@ -../../../../tardis/io/schemas/base.yml \ No newline at end of file diff --git a/docs/running/configuration/schemas/model.yml b/docs/running/configuration/schemas/model.yml deleted file mode 120000 index ee2c1c4086f..00000000000 --- a/docs/running/configuration/schemas/model.yml +++ /dev/null @@ -1 +0,0 @@ -../../../../tardis/io/schemas/model.yml \ No newline at end of file diff --git a/docs/running/configuration/schemas/montecarlo.yml b/docs/running/configuration/schemas/montecarlo.yml deleted file mode 120000 index 378f1a8fefe..00000000000 --- a/docs/running/configuration/schemas/montecarlo.yml +++ /dev/null @@ -1 +0,0 @@ -../../../../tardis/io/schemas/montecarlo.yml \ No newline at end of file diff --git a/docs/running/configuration/schemas/plasma.yml b/docs/running/configuration/schemas/plasma.yml deleted file mode 120000 index 273a6c51daf..00000000000 --- a/docs/running/configuration/schemas/plasma.yml +++ /dev/null @@ -1 +0,0 @@ -../../../../tardis/io/schemas/plasma.yml \ No newline at end of file diff --git a/docs/running/configuration/schemas/spectrum.yml b/docs/running/configuration/schemas/spectrum.yml deleted file mode 120000 index 146d94b9ca4..00000000000 --- a/docs/running/configuration/schemas/spectrum.yml +++ /dev/null @@ -1 +0,0 @@ -../../../../tardis/io/schemas/spectrum.yml \ No newline at end of file diff --git a/docs/running/configuration/schemas/supernova.yml b/docs/running/configuration/schemas/supernova.yml deleted file mode 120000 index b00bf28b35e..00000000000 --- a/docs/running/configuration/schemas/supernova.yml +++ /dev/null @@ -1 +0,0 @@ -../../../../tardis/io/schemas/supernova.yml \ No newline at end of file diff --git a/docs/running/example_data.inc b/docs/running/example_data.inc new file mode 100644 index 00000000000..7bfaa37404e --- /dev/null +++ b/docs/running/example_data.inc @@ -0,0 +1,2 @@ +.. _example_yml: https://github.com/tardis-sn/tardis-setups/blob/master/2014/2014_kerzendorf_sim/appendix_A1/tardis_example.yml +.. _example_atomic_database: https://github.com/tardis-sn/tardis-refdata/raw/master/atom_data/kurucz_cd23_chianti_H_He.h5 \ No newline at end of file diff --git a/docs/running/index.rst b/docs/running/index.rst index fcb17c57b3b..6b961c01bcd 100644 --- a/docs/running/index.rst +++ b/docs/running/index.rst @@ -2,18 +2,29 @@ Running TARDIS ************** -The TARDIS code needs three components to calculate spectra: 1) an atom database -2) a model 3) a configuration file. The Atom Database is created by the -`Carsus `_ subpackage. A quick start guide -to run TARDIS can be found :ref:`here ` +The TARDIS code needs three components to calculate spectra: +.. toctree:: + :maxdepth: 1 + :numbered: + + ../models/index.rst + ../configuration/index.rst + 3. Atom Database + + +A quick start guide to run TARDIS can be found +`here <../quickstart/quickstart.ipynb>`_. + .. toctree:: :maxdepth: 2 + :caption: Running TARDIS and interactivity commandline gui + notebooks/index.rst .. _quickstart: diff --git a/docs/running/notebooks/index.rst b/docs/running/notebooks/index.rst new file mode 100644 index 00000000000..601b9228d25 --- /dev/null +++ b/docs/running/notebooks/index.rst @@ -0,0 +1,4 @@ +Interactive TARDIS runs +======================= + +xxx \ No newline at end of file