From c9cd958551739d8ffd2991df76379107f851fdde Mon Sep 17 00:00:00 2001 From: Wolfgang Kerzendorf Date: Thu, 18 Jul 2019 15:19:40 -0400 Subject: [PATCH 01/10] restructure of documentation --- docs/index.rst | 27 ++++++++++++++++++--------- docs/models/index.rst | 5 +++++ docs/running/index.rst | 16 ++++++++++++---- docs/team.rst | 10 +++++++--- 4 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 docs/models/index.rst diff --git a/docs/index.rst b/docs/index.rst index 262b560e518..4b2aa575bad 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,19 +17,21 @@ Tardis Core Package Documentation TARDIS is an open-source Monte Carlo radiative-transfer spectral synthesis code for 1D models of supernova ejecta. It is designed for rapid spectral modelling -of supernovae. It is developed and maintained by a multi-disciplinary team +of supernovae. It is developed and maintained by a multi-disciplinary :ref:`team` including software engineers, computer scientists, statisticians, -and astrophysicists. +and astrophysicists . If you use this code for any publications or presentations please follow our citation guidelines in :ref:`tardiscredits` -User modifications and additions that lead to publications need to be handed -back to the community by incorporating them into TARDIS. +User modifications and additions that lead to publications **need to be handed +back to the community** by incorporating them into TARDIS. Please contact the TARDIS team via the `github page `_ if you have questions or need assistance. + + ============ Using Tardis ============ @@ -43,12 +45,10 @@ Using Tardis running/index examples/index scripts/index - team - credits -====================== -Looking under the hood -====================== +=================== +Physics of TARDIS +=================== .. toctree:: :maxdepth: 2 @@ -57,6 +57,15 @@ Looking under the hood physics/index montecarlo/index +==== +Team +==== + +.. toctree:: + :maxdepth: 2 + + team + credits ================= Developing Tardis diff --git a/docs/models/index.rst b/docs/models/index.rst new file mode 100644 index 00000000000..77107a157ff --- /dev/null +++ b/docs/models/index.rst @@ -0,0 +1,5 @@ +***** +Model +***** + + diff --git a/docs/running/index.rst b/docs/running/index.rst index 5a28b578858..b35e0643c61 100644 --- a/docs/running/index.rst +++ b/docs/running/index.rst @@ -1,12 +1,20 @@ ************** -Running Tardis +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 simple + Information regarding running and operating Tardis. .. toctree:: + :maxdepth: 2 + + ../atomic/index + ../models/index + ../configuration/index + using_formal_integral + access - ../configuration/index - access - using_formal_integral diff --git a/docs/team.rst b/docs/team.rst index 8345228fcdd..f7dbc8b6480 100644 --- a/docs/team.rst +++ b/docs/team.rst @@ -1,6 +1,8 @@ -*********** -TARDIS Team -*********** +.. _team: + +**** +Team +**** TARDIS is developed by a multidisciplinary team. We adhere to the AstroPy `code of conduct `_. @@ -41,6 +43,8 @@ Current and Former GSoC and SOCIS Students * Stefan Lietzau (GSoC 2017) * Mikhail Mishin (GSoC 2016) * Fotis Tsamis (GSoC 2016) + * Ezequiel Passaro (GSoC 2019) + * Jaladh Singhal (GSoC 2019) Contributors From 470c08175ff30a1a7f0efdcbf140316b2a4480c9 Mon Sep 17 00:00:00 2001 From: Wolfgang Kerzendorf Date: Thu, 18 Jul 2019 23:47:09 -0400 Subject: [PATCH 02/10] several changes to the structure --- docs/index.rst | 24 ++++++++++++------- docs/installation.rst | 16 ++++++------- docs/news.rst | 2 ++ docs/physics/index.rst | 12 +++++----- .../montecarlo/basicprinciples.rst | 0 .../montecarlo/discretization.rst | 0 docs/{ => physics}/montecarlo/estimators.rst | 0 docs/{ => physics}/montecarlo/index.rst | 0 .../montecarlo/lineinteraction.rst | 0 docs/{ => physics}/montecarlo/propagation.rst | 0 .../montecarlo/randomsampling.rst | 0 .../montecarlo/sourceintegration.rst | 0 .../montecarlo/virtualpackets.rst | 0 .../{montecarlo.rst => montecarlo_old.rst} | 0 14 files changed, 32 insertions(+), 22 deletions(-) rename docs/{ => physics}/montecarlo/basicprinciples.rst (100%) rename docs/{ => physics}/montecarlo/discretization.rst (100%) rename docs/{ => physics}/montecarlo/estimators.rst (100%) rename docs/{ => physics}/montecarlo/index.rst (100%) rename docs/{ => physics}/montecarlo/lineinteraction.rst (100%) rename docs/{ => physics}/montecarlo/propagation.rst (100%) rename docs/{ => physics}/montecarlo/randomsampling.rst (100%) rename docs/{ => physics}/montecarlo/sourceintegration.rst (100%) rename docs/{ => physics}/montecarlo/virtualpackets.rst (100%) rename docs/physics/{montecarlo.rst => montecarlo_old.rst} (100%) diff --git a/docs/index.rst b/docs/index.rst index 4b2aa575bad..abd9f095fe9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -32,15 +32,20 @@ assistance. +.. toctree:: + :maxdepth: 2 + + installation + + ============ -Using Tardis +Using TARDIS ============ .. toctree:: :maxdepth: 2 + :caption: Using TARDIS - installation - CHANGELOG.md quickstart running/index examples/index @@ -52,10 +57,9 @@ Physics of TARDIS .. toctree:: :maxdepth: 2 + :caption: The Physics of TARDIS - atomic/atomic_data physics/index - montecarlo/index ==== Team @@ -63,26 +67,30 @@ Team .. toctree:: :maxdepth: 2 + :caption: Team & Credits team credits -================= -Developing Tardis -================= +================ +Developers Guide +================ .. toctree:: :maxdepth: 2 + :caption: Developers Guide issues workflow/development_workflow running_tests + CHANGELOG.md ========== References ========== .. toctree:: + :caption: References zreferences ==== diff --git a/docs/installation.rst b/docs/installation.rst index 91e1d10406d..307dd3b1a23 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -16,19 +16,19 @@ simple TARDIS calculations. .. warning:: - TARDIS is currently only compatbile with Python 2.7. + TARDIS is only compatbile with Python >3.6 .. note:: - We strongly recommond to install TARDIS within an Anaconda environment and + We strongly recommend to install TARDIS within an Anaconda environment and to always use the lastest github development version. Requirements ============ -You can see a list of all the requirements of TARDIS in the `environment definition file `_. +You can see a list of all the requirements of TARDIS in the `environment definition file `_. -TARDIS is using astropy's excellent installation helpers and thus uses similar -instructions to astropy. +TARDIS is using Astropy's excellent installation helpers and thus uses similar +instructions to Astropy. .. _anaconda_inst_label: @@ -45,13 +45,13 @@ machine. The next step is to create an environment for TARDIS that contains all of the necessary packages (this ensures that TARDIS requirements won't clash with any other python installs on disc:: -First, download the `environment definition file `_ from:: +First, download the `environment definition file `_ from:: - https://raw.githubusercontent.com/tardis-sn/tardis/master/tardis_env27.yml + https://raw.githubusercontent.com/tardis-sn/tardis/master/tardis_env3.yml To create the environment, change to the directory that you downloaded the environment definition file and run:: - conda env create -f tardis_env27.yml + conda env create -f tardis_env3.yml Then to activate this environment simply do:: diff --git a/docs/news.rst b/docs/news.rst index 4ded50877ff..a9773400a91 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,3 +1,5 @@ + + GSOC 2017 --------- diff --git a/docs/physics/index.rst b/docs/physics/index.rst index 0a4697f2472..ce7f8b15dbe 100644 --- a/docs/physics/index.rst +++ b/docs/physics/index.rst @@ -1,6 +1,6 @@ -************************************ -Behind the scenes: Physics of TARDIS -************************************ +***************** +Physics of TARDIS +***************** .. warning:: @@ -23,10 +23,11 @@ Currently some information are available for .. toctree:: new_plasma + montecarlo/index Old Physics Section of the TARDIS Docu (Outdated) -====================================== +================================================= .. note:: The following entries reflects the physics section of the old TARDIS @@ -37,7 +38,6 @@ Old Physics Section of the TARDIS Docu (Outdated) .. toctree:: physical_quantities - montecarlo - new_plasma + montecarlo_old plasma/index diff --git a/docs/montecarlo/basicprinciples.rst b/docs/physics/montecarlo/basicprinciples.rst similarity index 100% rename from docs/montecarlo/basicprinciples.rst rename to docs/physics/montecarlo/basicprinciples.rst diff --git a/docs/montecarlo/discretization.rst b/docs/physics/montecarlo/discretization.rst similarity index 100% rename from docs/montecarlo/discretization.rst rename to docs/physics/montecarlo/discretization.rst diff --git a/docs/montecarlo/estimators.rst b/docs/physics/montecarlo/estimators.rst similarity index 100% rename from docs/montecarlo/estimators.rst rename to docs/physics/montecarlo/estimators.rst diff --git a/docs/montecarlo/index.rst b/docs/physics/montecarlo/index.rst similarity index 100% rename from docs/montecarlo/index.rst rename to docs/physics/montecarlo/index.rst diff --git a/docs/montecarlo/lineinteraction.rst b/docs/physics/montecarlo/lineinteraction.rst similarity index 100% rename from docs/montecarlo/lineinteraction.rst rename to docs/physics/montecarlo/lineinteraction.rst diff --git a/docs/montecarlo/propagation.rst b/docs/physics/montecarlo/propagation.rst similarity index 100% rename from docs/montecarlo/propagation.rst rename to docs/physics/montecarlo/propagation.rst diff --git a/docs/montecarlo/randomsampling.rst b/docs/physics/montecarlo/randomsampling.rst similarity index 100% rename from docs/montecarlo/randomsampling.rst rename to docs/physics/montecarlo/randomsampling.rst diff --git a/docs/montecarlo/sourceintegration.rst b/docs/physics/montecarlo/sourceintegration.rst similarity index 100% rename from docs/montecarlo/sourceintegration.rst rename to docs/physics/montecarlo/sourceintegration.rst diff --git a/docs/montecarlo/virtualpackets.rst b/docs/physics/montecarlo/virtualpackets.rst similarity index 100% rename from docs/montecarlo/virtualpackets.rst rename to docs/physics/montecarlo/virtualpackets.rst diff --git a/docs/physics/montecarlo.rst b/docs/physics/montecarlo_old.rst similarity index 100% rename from docs/physics/montecarlo.rst rename to docs/physics/montecarlo_old.rst From 7c699d68ee145e46f391c33c1273d66ca32c2065 Mon Sep 17 00:00:00 2001 From: Wolfgang Kerzendorf Date: Fri, 19 Jul 2019 16:11:54 -0400 Subject: [PATCH 03/10] large restructure --- docs/atomic/atomic_data.rst | 8 +++++--- docs/index.rst | 4 +++- ...ustom_Density_And_Boundary_Velocities-checkpoint.ipynb | 0 .../examples/Custom_Density_And_Boundary_Velocities.ipynb | 0 docs/{ => models}/examples/abund.dat | 0 docs/{ => models}/examples/abundancecust.rst | 0 docs/{ => models}/examples/abundanceuni.rst | 0 docs/{ => models}/examples/density.dat | 0 docs/{ => models}/examples/densitycust.rst | 0 docs/{ => models}/examples/densityexp.rst | 0 docs/{ => models}/examples/densitypow.rst | 0 docs/{ => models}/examples/examples.rst | 0 docs/{ => models}/examples/index.rst | 0 docs/{ => models}/examples/integrator.ipynb | 0 docs/{ => models}/examples/mesa.stella.dat | 0 docs/{ => models}/examples/modelconfig.rst | 0 docs/{ => models}/examples/run_simple_example.ipynb | 0 docs/{ => models}/examples/stella_to_tardis.ipynb | 0 .../examples/tardis_configv1_abundance_cust_example.yml | 0 .../tardis_configv1_abundance_uniform_example.yml | 0 .../examples/tardis_configv1_density_cust_example.yml | 0 .../tardis_configv1_density_exponential_example.yml | 0 .../tardis_configv1_density_power_law_example.yml | 0 .../tardis_configv1_isotope_abundance_cust_example.yml | 0 docs/{ => models}/examples/tardis_example.rst | 0 docs/{ => models}/examples/tardis_example.yml | 0 docs/{ => models}/examples/tardis_model_abund.csv | 0 docs/{ => models}/examples/test_abund.dat | 0 docs/{ => models}/examples/test_density.txt | 0 docs/quickstart.rst | 2 +- docs/running/index.rst | 3 ++- 31 files changed, 11 insertions(+), 6 deletions(-) rename docs/{ => models}/examples/.ipynb_checkpoints/Custom_Density_And_Boundary_Velocities-checkpoint.ipynb (100%) rename docs/{ => models}/examples/Custom_Density_And_Boundary_Velocities.ipynb (100%) rename docs/{ => models}/examples/abund.dat (100%) rename docs/{ => models}/examples/abundancecust.rst (100%) rename docs/{ => models}/examples/abundanceuni.rst (100%) rename docs/{ => models}/examples/density.dat (100%) rename docs/{ => models}/examples/densitycust.rst (100%) rename docs/{ => models}/examples/densityexp.rst (100%) rename docs/{ => models}/examples/densitypow.rst (100%) rename docs/{ => models}/examples/examples.rst (100%) rename docs/{ => models}/examples/index.rst (100%) rename docs/{ => models}/examples/integrator.ipynb (100%) rename docs/{ => models}/examples/mesa.stella.dat (100%) rename docs/{ => models}/examples/modelconfig.rst (100%) rename docs/{ => models}/examples/run_simple_example.ipynb (100%) rename docs/{ => models}/examples/stella_to_tardis.ipynb (100%) rename docs/{ => models}/examples/tardis_configv1_abundance_cust_example.yml (100%) rename docs/{ => models}/examples/tardis_configv1_abundance_uniform_example.yml (100%) rename docs/{ => models}/examples/tardis_configv1_density_cust_example.yml (100%) rename docs/{ => models}/examples/tardis_configv1_density_exponential_example.yml (100%) rename docs/{ => models}/examples/tardis_configv1_density_power_law_example.yml (100%) rename docs/{ => models}/examples/tardis_configv1_isotope_abundance_cust_example.yml (100%) rename docs/{ => models}/examples/tardis_example.rst (100%) rename docs/{ => models}/examples/tardis_example.yml (100%) rename docs/{ => models}/examples/tardis_model_abund.csv (100%) rename docs/{ => models}/examples/test_abund.dat (100%) rename docs/{ => models}/examples/test_density.txt (100%) diff --git a/docs/atomic/atomic_data.rst b/docs/atomic/atomic_data.rst index 8ac87a7aa72..7f46c848a7a 100644 --- a/docs/atomic/atomic_data.rst +++ b/docs/atomic/atomic_data.rst @@ -1,8 +1,10 @@ .. _atomic-data-download: -********************** -Atomic Data for TARDIS -********************** +*********** +Atomic Data +*********** + +The Atom Database for TARDIS is generated by the .. toctree:: atomic_data_description diff --git a/docs/index.rst b/docs/index.rst index abd9f095fe9..b15039158a4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -59,7 +59,9 @@ Physics of TARDIS :maxdepth: 2 :caption: The Physics of TARDIS - physics/index + Physics overview + physics/plasma/index + physics/montecarlo/index ==== Team diff --git a/docs/examples/.ipynb_checkpoints/Custom_Density_And_Boundary_Velocities-checkpoint.ipynb b/docs/models/examples/.ipynb_checkpoints/Custom_Density_And_Boundary_Velocities-checkpoint.ipynb similarity index 100% rename from docs/examples/.ipynb_checkpoints/Custom_Density_And_Boundary_Velocities-checkpoint.ipynb rename to docs/models/examples/.ipynb_checkpoints/Custom_Density_And_Boundary_Velocities-checkpoint.ipynb diff --git a/docs/examples/Custom_Density_And_Boundary_Velocities.ipynb b/docs/models/examples/Custom_Density_And_Boundary_Velocities.ipynb similarity index 100% rename from docs/examples/Custom_Density_And_Boundary_Velocities.ipynb rename to docs/models/examples/Custom_Density_And_Boundary_Velocities.ipynb diff --git a/docs/examples/abund.dat b/docs/models/examples/abund.dat similarity index 100% rename from docs/examples/abund.dat rename to docs/models/examples/abund.dat diff --git a/docs/examples/abundancecust.rst b/docs/models/examples/abundancecust.rst similarity index 100% rename from docs/examples/abundancecust.rst rename to docs/models/examples/abundancecust.rst diff --git a/docs/examples/abundanceuni.rst b/docs/models/examples/abundanceuni.rst similarity index 100% rename from docs/examples/abundanceuni.rst rename to docs/models/examples/abundanceuni.rst diff --git a/docs/examples/density.dat b/docs/models/examples/density.dat similarity index 100% rename from docs/examples/density.dat rename to docs/models/examples/density.dat diff --git a/docs/examples/densitycust.rst b/docs/models/examples/densitycust.rst similarity index 100% rename from docs/examples/densitycust.rst rename to docs/models/examples/densitycust.rst diff --git a/docs/examples/densityexp.rst b/docs/models/examples/densityexp.rst similarity index 100% rename from docs/examples/densityexp.rst rename to docs/models/examples/densityexp.rst diff --git a/docs/examples/densitypow.rst b/docs/models/examples/densitypow.rst similarity index 100% rename from docs/examples/densitypow.rst rename to docs/models/examples/densitypow.rst diff --git a/docs/examples/examples.rst b/docs/models/examples/examples.rst similarity index 100% rename from docs/examples/examples.rst rename to docs/models/examples/examples.rst diff --git a/docs/examples/index.rst b/docs/models/examples/index.rst similarity index 100% rename from docs/examples/index.rst rename to docs/models/examples/index.rst diff --git a/docs/examples/integrator.ipynb b/docs/models/examples/integrator.ipynb similarity index 100% rename from docs/examples/integrator.ipynb rename to docs/models/examples/integrator.ipynb diff --git a/docs/examples/mesa.stella.dat b/docs/models/examples/mesa.stella.dat similarity index 100% rename from docs/examples/mesa.stella.dat rename to docs/models/examples/mesa.stella.dat diff --git a/docs/examples/modelconfig.rst b/docs/models/examples/modelconfig.rst similarity index 100% rename from docs/examples/modelconfig.rst rename to docs/models/examples/modelconfig.rst diff --git a/docs/examples/run_simple_example.ipynb b/docs/models/examples/run_simple_example.ipynb similarity index 100% rename from docs/examples/run_simple_example.ipynb rename to docs/models/examples/run_simple_example.ipynb diff --git a/docs/examples/stella_to_tardis.ipynb b/docs/models/examples/stella_to_tardis.ipynb similarity index 100% rename from docs/examples/stella_to_tardis.ipynb rename to docs/models/examples/stella_to_tardis.ipynb diff --git a/docs/examples/tardis_configv1_abundance_cust_example.yml b/docs/models/examples/tardis_configv1_abundance_cust_example.yml similarity index 100% rename from docs/examples/tardis_configv1_abundance_cust_example.yml rename to docs/models/examples/tardis_configv1_abundance_cust_example.yml diff --git a/docs/examples/tardis_configv1_abundance_uniform_example.yml b/docs/models/examples/tardis_configv1_abundance_uniform_example.yml similarity index 100% rename from docs/examples/tardis_configv1_abundance_uniform_example.yml rename to docs/models/examples/tardis_configv1_abundance_uniform_example.yml diff --git a/docs/examples/tardis_configv1_density_cust_example.yml b/docs/models/examples/tardis_configv1_density_cust_example.yml similarity index 100% rename from docs/examples/tardis_configv1_density_cust_example.yml rename to docs/models/examples/tardis_configv1_density_cust_example.yml diff --git a/docs/examples/tardis_configv1_density_exponential_example.yml b/docs/models/examples/tardis_configv1_density_exponential_example.yml similarity index 100% rename from docs/examples/tardis_configv1_density_exponential_example.yml rename to docs/models/examples/tardis_configv1_density_exponential_example.yml diff --git a/docs/examples/tardis_configv1_density_power_law_example.yml b/docs/models/examples/tardis_configv1_density_power_law_example.yml similarity index 100% rename from docs/examples/tardis_configv1_density_power_law_example.yml rename to docs/models/examples/tardis_configv1_density_power_law_example.yml diff --git a/docs/examples/tardis_configv1_isotope_abundance_cust_example.yml b/docs/models/examples/tardis_configv1_isotope_abundance_cust_example.yml similarity index 100% rename from docs/examples/tardis_configv1_isotope_abundance_cust_example.yml rename to docs/models/examples/tardis_configv1_isotope_abundance_cust_example.yml diff --git a/docs/examples/tardis_example.rst b/docs/models/examples/tardis_example.rst similarity index 100% rename from docs/examples/tardis_example.rst rename to docs/models/examples/tardis_example.rst diff --git a/docs/examples/tardis_example.yml b/docs/models/examples/tardis_example.yml similarity index 100% rename from docs/examples/tardis_example.yml rename to docs/models/examples/tardis_example.yml diff --git a/docs/examples/tardis_model_abund.csv b/docs/models/examples/tardis_model_abund.csv similarity index 100% rename from docs/examples/tardis_model_abund.csv rename to docs/models/examples/tardis_model_abund.csv diff --git a/docs/examples/test_abund.dat b/docs/models/examples/test_abund.dat similarity index 100% rename from docs/examples/test_abund.dat rename to docs/models/examples/test_abund.dat diff --git a/docs/examples/test_density.txt b/docs/models/examples/test_density.txt similarity index 100% rename from docs/examples/test_density.txt rename to docs/models/examples/test_density.txt diff --git a/docs/quickstart.rst b/docs/quickstart.rst index fb9e0177b0b..3f96fc3ab9b 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -1,4 +1,4 @@ -.. _running: +.. _quickstart: **************** Quickstart Guide diff --git a/docs/running/index.rst b/docs/running/index.rst index b35e0643c61..8a2c9616be6 100644 --- a/docs/running/index.rst +++ b/docs/running/index.rst @@ -4,7 +4,8 @@ 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 simple +`Carsus `_ subpackage. A quick start guide +to run TARDIS can be found `here ` Information regarding running and operating Tardis. From 4101163831ab31b76231d38c675d2103465d8f92 Mon Sep 17 00:00:00 2001 From: Wolfgang Kerzendorf Date: Fri, 19 Jul 2019 16:21:47 -0400 Subject: [PATCH 04/10] move workflow to development move issues and running_tests to development introduce new section research --- docs/conf.py | 3 +- .../{workflow => development}/azure_links.inc | 0 .../continuous_integration.rst | 0 .../development_workflow.rst | 0 docs/{workflow => development}/git_links.inc | 0 .../git_workflow.rst | 0 .../images/Bootcamp-Fork.png | Bin .../images/branch_dropdown.png | Bin .../{workflow => development}/images/lock.png | Bin .../images/pull_button.png | Bin .../images/secure_file.png | Bin .../images/variables.png | Bin docs/{ => development}/issues.rst | 0 .../known_projects.inc | 0 docs/{workflow => development}/links.inc | 0 .../release_workflow.rst | 0 docs/{ => development}/running_tests.rst | 4 +- .../this_project.inc | 0 .../update_refdata.rst | 0 docs/index.rst | 36 +++---- .../{notebooks => models/csy}/csvy_test.ipynb | 0 docs/physics/plasma/plasma.rst | 2 +- docs/research/code_comparison/index.rst | 8 ++ docs/research/index.rst | 13 +++ docs/{ => running}/gui.rst | 6 +- .../{graphics => running/images}/LineInfo.png | Bin .../images}/OpeningScreen.png | Bin .../images}/ShellInfo.png | Bin docs/running/index.rst | 101 +++++++++++++++++- docs/{ => running}/to_hdf.rst | 0 30 files changed, 145 insertions(+), 28 deletions(-) rename docs/{workflow => development}/azure_links.inc (100%) rename docs/{workflow => development}/continuous_integration.rst (100%) rename docs/{workflow => development}/development_workflow.rst (100%) rename docs/{workflow => development}/git_links.inc (100%) rename docs/{workflow => development}/git_workflow.rst (100%) rename docs/{workflow => development}/images/Bootcamp-Fork.png (100%) rename docs/{workflow => development}/images/branch_dropdown.png (100%) rename docs/{workflow => development}/images/lock.png (100%) rename docs/{workflow => development}/images/pull_button.png (100%) rename docs/{workflow => development}/images/secure_file.png (100%) rename docs/{workflow => development}/images/variables.png (100%) rename docs/{ => development}/issues.rst (100%) rename docs/{workflow => development}/known_projects.inc (100%) rename docs/{workflow => development}/links.inc (100%) rename docs/{workflow => development}/release_workflow.rst (100%) rename docs/{ => development}/running_tests.rst (98%) rename docs/{workflow => development}/this_project.inc (100%) rename docs/{workflow => development}/update_refdata.rst (100%) rename docs/{notebooks => models/csy}/csvy_test.ipynb (100%) create mode 100644 docs/research/code_comparison/index.rst create mode 100644 docs/research/index.rst rename docs/{ => running}/gui.rst (96%) rename docs/{graphics => running/images}/LineInfo.png (100%) rename docs/{graphics => running/images}/OpeningScreen.png (100%) rename docs/{graphics => running/images}/ShellInfo.png (100%) rename docs/{ => running}/to_hdf.rst (100%) diff --git a/docs/conf.py b/docs/conf.py index 6a38332ed07..f626f8590f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,7 +36,6 @@ 'astropy': ('http://docs.astropy.org/en/stable/', None), 'h5py': ('http://docs.h5py.org/en/latest/', None), 'pandas': ('http://pandas.pydata.org/pandas-docs/dev/', None), - 'astropy': ('http://docs.astropy.org/en/stable/', None) } # import sphinx_bootstrap_theme @@ -90,7 +89,7 @@ # This does not *have* to match the package name, but typically does project = u'TARDIS' -author = u'TARDIS team' +author = u'TARDIS collaboration' copyright = u'2013, ' + author master_doc = 'index' diff --git a/docs/workflow/azure_links.inc b/docs/development/azure_links.inc similarity index 100% rename from docs/workflow/azure_links.inc rename to docs/development/azure_links.inc diff --git a/docs/workflow/continuous_integration.rst b/docs/development/continuous_integration.rst similarity index 100% rename from docs/workflow/continuous_integration.rst rename to docs/development/continuous_integration.rst diff --git a/docs/workflow/development_workflow.rst b/docs/development/development_workflow.rst similarity index 100% rename from docs/workflow/development_workflow.rst rename to docs/development/development_workflow.rst diff --git a/docs/workflow/git_links.inc b/docs/development/git_links.inc similarity index 100% rename from docs/workflow/git_links.inc rename to docs/development/git_links.inc diff --git a/docs/workflow/git_workflow.rst b/docs/development/git_workflow.rst similarity index 100% rename from docs/workflow/git_workflow.rst rename to docs/development/git_workflow.rst diff --git a/docs/workflow/images/Bootcamp-Fork.png b/docs/development/images/Bootcamp-Fork.png similarity index 100% rename from docs/workflow/images/Bootcamp-Fork.png rename to docs/development/images/Bootcamp-Fork.png diff --git a/docs/workflow/images/branch_dropdown.png b/docs/development/images/branch_dropdown.png similarity index 100% rename from docs/workflow/images/branch_dropdown.png rename to docs/development/images/branch_dropdown.png diff --git a/docs/workflow/images/lock.png b/docs/development/images/lock.png similarity index 100% rename from docs/workflow/images/lock.png rename to docs/development/images/lock.png diff --git a/docs/workflow/images/pull_button.png b/docs/development/images/pull_button.png similarity index 100% rename from docs/workflow/images/pull_button.png rename to docs/development/images/pull_button.png diff --git a/docs/workflow/images/secure_file.png b/docs/development/images/secure_file.png similarity index 100% rename from docs/workflow/images/secure_file.png rename to docs/development/images/secure_file.png diff --git a/docs/workflow/images/variables.png b/docs/development/images/variables.png similarity index 100% rename from docs/workflow/images/variables.png rename to docs/development/images/variables.png diff --git a/docs/issues.rst b/docs/development/issues.rst similarity index 100% rename from docs/issues.rst rename to docs/development/issues.rst diff --git a/docs/workflow/known_projects.inc b/docs/development/known_projects.inc similarity index 100% rename from docs/workflow/known_projects.inc rename to docs/development/known_projects.inc diff --git a/docs/workflow/links.inc b/docs/development/links.inc similarity index 100% rename from docs/workflow/links.inc rename to docs/development/links.inc diff --git a/docs/workflow/release_workflow.rst b/docs/development/release_workflow.rst similarity index 100% rename from docs/workflow/release_workflow.rst rename to docs/development/release_workflow.rst diff --git a/docs/running_tests.rst b/docs/development/running_tests.rst similarity index 98% rename from docs/running_tests.rst rename to docs/development/running_tests.rst index 2a3b5633bc2..c38cb28d84b 100644 --- a/docs/running_tests.rst +++ b/docs/development/running_tests.rst @@ -63,7 +63,7 @@ use very few packets to generate the references and thus make the process much faster - THIS IS ONLY FOR DEBUGGING PURPOSES. The ``-s`` option ensures that TARDIS prints out the progress: -.. code-block:: +.. code-block:: shell > python setup.py test --args="--integration=integration.yml -m integration --generate-reference --less-packets" @@ -71,7 +71,7 @@ TARDIS prints out the progress: To run the test after having run the ``--generate-references`` all that is needed is: -.. code-block:: +.. code-block:: shell > python setup.py test --args="--integration=integration.yml -m integration --less-packets" --remote-data diff --git a/docs/workflow/this_project.inc b/docs/development/this_project.inc similarity index 100% rename from docs/workflow/this_project.inc rename to docs/development/this_project.inc diff --git a/docs/workflow/update_refdata.rst b/docs/development/update_refdata.rst similarity index 100% rename from docs/workflow/update_refdata.rst rename to docs/development/update_refdata.rst diff --git a/docs/index.rst b/docs/index.rst index b15039158a4..5d59b4b6da2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,7 +17,7 @@ Tardis Core Package Documentation TARDIS is an open-source Monte Carlo radiative-transfer spectral synthesis code for 1D models of supernova ejecta. It is designed for rapid spectral modelling -of supernovae. It is developed and maintained by a multi-disciplinary :ref:`team` +of supernovae. It is developed and maintained by a :ref:`multi-disciplinary team ` including software engineers, computer scientists, statisticians, and astrophysicists . @@ -34,65 +34,65 @@ assistance. .. toctree:: :maxdepth: 2 + :hidden: installation -============ -Using TARDIS -============ .. toctree:: :maxdepth: 2 :caption: Using TARDIS + :hidden: quickstart running/index examples/index scripts/index -=================== -Physics of TARDIS -=================== .. toctree:: :maxdepth: 2 :caption: The Physics of TARDIS + :hidden: Physics overview physics/plasma/index physics/montecarlo/index -==== -Team -==== + +.. toctree:: + :maxdepth: 2 + :caption: Research with TARDIS + :hidden: + + Overview + .. toctree:: :maxdepth: 2 :caption: Team & Credits + :hidden: team credits -================ -Developers Guide -================ .. toctree:: :maxdepth: 2 :caption: Developers Guide + :hidden: - issues - workflow/development_workflow + development/issues + development/development_workflow running_tests CHANGELOG.md -========== -References -========== .. toctree:: :caption: References + :hidden: + zreferences ==== diff --git a/docs/notebooks/csvy_test.ipynb b/docs/models/csy/csvy_test.ipynb similarity index 100% rename from docs/notebooks/csvy_test.ipynb rename to docs/models/csy/csvy_test.ipynb diff --git a/docs/physics/plasma/plasma.rst b/docs/physics/plasma/plasma.rst index c7a839c9776..54346d006b7 100644 --- a/docs/physics/plasma/plasma.rst +++ b/docs/physics/plasma/plasma.rst @@ -95,5 +95,5 @@ This function calculates the Sobolev optical depth :math:`\tau_\textrm{Sobolev}` .. include:: plasma_doc/nlte.rst -.. automodapi:: tardis.plasma_array +.. .. automodapi:: tardis.plasma_array diff --git a/docs/research/code_comparison/index.rst b/docs/research/code_comparison/index.rst new file mode 100644 index 00000000000..0eaeb23a7d6 --- /dev/null +++ b/docs/research/code_comparison/index.rst @@ -0,0 +1,8 @@ +Code Comparison +=============== + +Several groups have started a comparison of their supernova radiative transfer +codes to understand systematics uncertainties and different strategies. +The first meeting is summarized +`here `_. + diff --git a/docs/research/index.rst b/docs/research/index.rst new file mode 100644 index 00000000000..3611ac1fe7a --- /dev/null +++ b/docs/research/index.rst @@ -0,0 +1,13 @@ +******************** +Research with TARDIS +******************** + +Here we will give authors the opportunity to present their studies with TARDIS +but also give an overview over our efforts. + + + +.. toctree:: + :maxdepth: 2 + + code_comparison/index \ No newline at end of file diff --git a/docs/gui.rst b/docs/running/gui.rst similarity index 96% rename from docs/gui.rst rename to docs/running/gui.rst index 329070ba457..a9daae55fda 100644 --- a/docs/gui.rst +++ b/docs/running/gui.rst @@ -51,7 +51,7 @@ When you launch the gui the first screen that you see will be something like the You can inspect the plot of shells on this window and use the toggle button to change between the plot of dilution factor and the radiation temperature in shells. -.. image:: graphics/OpeningScreen.png +.. image:: images/OpeningScreen.png :width: 900 Shell Info @@ -61,7 +61,7 @@ similar strategy in the tables that appear to bring up the ion and level populat The snapshot below shows all the tables that you can bring up by successively clicking the horizontal table headers. -.. image:: graphics/ShellInfo.png +.. image:: images/ShellInfo.png :width: 900 Line Info @@ -70,5 +70,5 @@ If you switch to the spectrum tab you can see the spectrum plot and a button to Once again you can double-click the table headers to get further information. The snapshot below shows all the tables that you can bring up in this window. -.. image:: graphics/LineInfo.png +.. image:: images/LineInfo.png :width: 900 diff --git a/docs/graphics/LineInfo.png b/docs/running/images/LineInfo.png similarity index 100% rename from docs/graphics/LineInfo.png rename to docs/running/images/LineInfo.png diff --git a/docs/graphics/OpeningScreen.png b/docs/running/images/OpeningScreen.png similarity index 100% rename from docs/graphics/OpeningScreen.png rename to docs/running/images/OpeningScreen.png diff --git a/docs/graphics/ShellInfo.png b/docs/running/images/ShellInfo.png similarity index 100% rename from docs/graphics/ShellInfo.png rename to docs/running/images/ShellInfo.png diff --git a/docs/running/index.rst b/docs/running/index.rst index 8a2c9616be6..7802d2f5b94 100644 --- a/docs/running/index.rst +++ b/docs/running/index.rst @@ -5,7 +5,7 @@ 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 `here ` +to run TARDIS can be found :ref:`here ` Information regarding running and operating Tardis. @@ -16,6 +16,103 @@ Information regarding running and operating Tardis. ../models/index ../configuration/index using_formal_integral - access +.. _quickstart: + + +Running TARDIS interactively in a Jupyter notebook (recommended) +================================================================ + +To get more information from each run of TARDIS one can run it interactively and +have full access to the model properties (as described in :ref:`physical_quantities`) + +.. toctree:: + :maxdepth: 1 + + examples/run_simple_example.ipynb + + +Running TARDIS in the commandline +================================= + +After installing TARDIS just download the configuration file from the +`tardis-setups `_ and the standard +atomic data set from the `tardis-refdata +`_ repository and run TARDIS. +Assuming you have ``wget``, you could follow the procedure: + + +.. code-block:: none + + mkdir tardis_example + cd tardis_example + wget https://raw.githubusercontent.com/tardis-sn/tardis-setups/master/2014/2014_kerzendorf_sim/appendix_A1/tardis_example.yml + wget https://github.com/tardis-sn/tardis-refdata/raw/master/atom_data/kurucz_cd23_chianti_H_He.h5 + tardis tardis_example.yml output_spectrum.dat + + +Then plot the output_spectrum.dat with your favourite plotting program. Here's an example how to do this with python. +(The only thing you need to install is ipython and matplotlib - in addition to TARDIS's requirements) + +.. code-block:: python + + ipython --pylab + >>> tardis_spec = loadtxt('output_spectrum.dat') + >>> plot(tardis_spec[:,0], tardis_spec[:,1]) + +More atomic datasets can be downloaded from :ref:`atomic-data-download`. + + +Graphical User Interface +======================== + +To get a detailed explanation on gui layout go to :ref:`gui_explanation` . + +**To setup and run the GUI(under development) follow these steps:** + +The gui can use one of two python bindings for qt, namely PyQt4 +and PySide. You can choose which binding is used by setting the +environment variable QT_API in your bash. + +**1**. Installing required packages + +.. code-block:: none + + source activate tardis + conda install ipython=3.0.0 pyside=1.2.1 shiboken=1.2.1 + + +**2**. Choosing between PySide and PyQt4 + +.. code-block:: none + + #To choose PySide + export QT_API=pyside + + #To choose PyQt + export QT_API=pyqt + +**3**. An example of creating a model and GUI + +To show the gui from the ipython shell use the following commands. + +.. code-block:: none + + ipython --pylab=qt4 + +.. code-block:: python + + >>> from tardis import run_tardis + >>> mdl = run_tardis('yamlconfigfile.yml', 'atomdatafile.h5') + >>> from tardis.gui import interface + >>> interface.show(mdl) + +If you just want to run from a configuration file and show the results, you can +do that outside the ipython shell.To do this navigate to the folder where you +installed tardis and go to tardis/tardis/gui, and use the following command. + +.. code-block:: none + + python interface.py path-to-yaml-configuration-file path-to-atomic-data-file + diff --git a/docs/to_hdf.rst b/docs/running/to_hdf.rst similarity index 100% rename from docs/to_hdf.rst rename to docs/running/to_hdf.rst From 595aba5c1f9584306d87b92e8d22306020fa1d87 Mon Sep 17 00:00:00 2001 From: Wolfgang Kerzendorf Date: Mon, 22 Jul 2019 00:23:16 -0400 Subject: [PATCH 05/10] further restructure add quickstart --- docs/atomic/atomic_data.rst | 4 +- docs/conf.py | 2 +- docs/configuration/schemas/base.yml | 1 - docs/configuration/schemas/model.yml | 1 - docs/configuration/schemas/montecarlo.yml | 1 - docs/configuration/schemas/plasma.yml | 1 - docs/configuration/schemas/spectrum.yml | 1 - docs/configuration/schemas/supernova.yml | 1 - docs/{ => development}/developer_faq.rst | 0 docs/index.rst | 6 +- docs/installation.rst | 12 +- docs/physics/montecarlo/sourceintegration.rst | 6 +- docs/physics/montecarlo/virtualpackets.rst | 2 + docs/quickstart.rst | 108 -- docs/quickstart/quickstart.ipynb | 1212 +++++++++++++++++ docs/running/access.rst | 3 - docs/running/access_model.rst | 0 docs/running/access_plasma.rst | 0 docs/running/access_spectra.rst | 0 .../configuration/config_validator.rst | 0 .../configuration/configuration.rst | 0 docs/{ => running}/configuration/index.rst | 0 .../configuration/read_configuration.ipynb | 0 docs/running/configuration/schemas/base.yml | 1 + docs/running/configuration/schemas/model.yml | 1 + .../configuration/schemas/montecarlo.yml | 1 + docs/running/configuration/schemas/plasma.yml | 1 + .../configuration/schemas/spectrum.yml | 1 + .../configuration/schemas/supernova.yml | 1 + docs/running/index.rst | 9 - docs/running/using_formal_integral.rst | 6 +- tardis/montecarlo/formal_integral.py | 2 +- 32 files changed, 1245 insertions(+), 139 deletions(-) delete mode 120000 docs/configuration/schemas/base.yml delete mode 120000 docs/configuration/schemas/model.yml delete mode 120000 docs/configuration/schemas/montecarlo.yml delete mode 120000 docs/configuration/schemas/plasma.yml delete mode 120000 docs/configuration/schemas/spectrum.yml delete mode 120000 docs/configuration/schemas/supernova.yml rename docs/{ => development}/developer_faq.rst (100%) delete mode 100644 docs/quickstart.rst create mode 100644 docs/quickstart/quickstart.ipynb delete mode 100644 docs/running/access_model.rst delete mode 100644 docs/running/access_plasma.rst delete mode 100644 docs/running/access_spectra.rst rename docs/{ => running}/configuration/config_validator.rst (100%) rename docs/{ => running}/configuration/configuration.rst (100%) rename docs/{ => running}/configuration/index.rst (100%) rename docs/{ => running}/configuration/read_configuration.ipynb (100%) create mode 120000 docs/running/configuration/schemas/base.yml create mode 120000 docs/running/configuration/schemas/model.yml create mode 120000 docs/running/configuration/schemas/montecarlo.yml create mode 120000 docs/running/configuration/schemas/plasma.yml create mode 120000 docs/running/configuration/schemas/spectrum.yml create mode 120000 docs/running/configuration/schemas/supernova.yml diff --git a/docs/atomic/atomic_data.rst b/docs/atomic/atomic_data.rst index 7f46c848a7a..9abc035ccbc 100644 --- a/docs/atomic/atomic_data.rst +++ b/docs/atomic/atomic_data.rst @@ -4,8 +4,8 @@ Atomic Data *********** -The Atom Database for TARDIS is generated by the +The Atom Database for TARDIS is generated by the Carsus package. .. toctree:: atomic_data_description - current_public_table.rst + current_public_table diff --git a/docs/conf.py b/docs/conf.py index f626f8590f3..5987c5f46a3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -77,7 +77,7 @@ templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build', '_templates'] +exclude_patterns = ['_build', '_templates', '**.ipynb_checkpoints'] #exclude_patterns.append('_templates') # This is added to the end of RST files - a good place to put substitutions to diff --git a/docs/configuration/schemas/base.yml b/docs/configuration/schemas/base.yml deleted file mode 120000 index 86d21969b04..00000000000 --- a/docs/configuration/schemas/base.yml +++ /dev/null @@ -1 +0,0 @@ -../../../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 deleted file mode 120000 index d0141ba515a..00000000000 --- a/docs/configuration/schemas/model.yml +++ /dev/null @@ -1 +0,0 @@ -../../../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 deleted file mode 120000 index 72bdd903650..00000000000 --- a/docs/configuration/schemas/montecarlo.yml +++ /dev/null @@ -1 +0,0 @@ -../../../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 deleted file mode 120000 index 989d5be8b71..00000000000 --- a/docs/configuration/schemas/plasma.yml +++ /dev/null @@ -1 +0,0 @@ -../../../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 deleted file mode 120000 index 3cc32e4b316..00000000000 --- a/docs/configuration/schemas/spectrum.yml +++ /dev/null @@ -1 +0,0 @@ -../../../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 deleted file mode 120000 index d157db4f384..00000000000 --- a/docs/configuration/schemas/supernova.yml +++ /dev/null @@ -1 +0,0 @@ -../../../tardis/io/schemas/supernova.yml \ No newline at end of file diff --git a/docs/developer_faq.rst b/docs/development/developer_faq.rst similarity index 100% rename from docs/developer_faq.rst rename to docs/development/developer_faq.rst diff --git a/docs/index.rst b/docs/index.rst index 5d59b4b6da2..07a24b5af94 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -37,6 +37,7 @@ assistance. :hidden: installation + quickstart/quickstart @@ -45,8 +46,11 @@ assistance. :caption: Using TARDIS :hidden: - quickstart + running/index + running/configuration/configuration + atomic/atomic_data + models/index examples/index scripts/index diff --git a/docs/installation.rst b/docs/installation.rst index 307dd3b1a23..58dd31d4e60 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -68,7 +68,8 @@ 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:: +Since TARDIS has reached a mature state, we recommend always installing the +latest development version:: pip install git+https://github.com/tardis-sn/tardis @@ -78,6 +79,12 @@ Alternatively, you can manually clone our repository and install TARDIS by cd tardis python setup.py install + +.. _install_openmp: +Enabling parallel execution with OpenMP +--------------------------------------- + + Manually, cloning the repository enables other options such as running the code in parallel (enabling OpenMP). In general we encourage to download the compilers from `conda` as we then can ensure that they work with TARDIS. Within the TARDIS conda environment do:: @@ -92,13 +99,12 @@ For Linux:: conda install -c conda-forge openmp -To compile TARDIS for parallel execution: +To compile TARDIS for parallel execution:: python setup.py install --with-openmp .. _troubleshooting_inst_label: - Installation Troubles (FAQ) =========================== diff --git a/docs/physics/montecarlo/sourceintegration.rst b/docs/physics/montecarlo/sourceintegration.rst index ba151a01641..f5b4d9b3f3a 100644 --- a/docs/physics/montecarlo/sourceintegration.rst +++ b/docs/physics/montecarlo/sourceintegration.rst @@ -1,6 +1,8 @@ -******************************** +.. _source_integration: + +***************************************** Direct integration of the radiation field -******************************** +***************************************** :cite:`Lucy1999a` describes an alternative method for the generation of synthetic supernova spectra. Instead of using the frequency and energy of diff --git a/docs/physics/montecarlo/virtualpackets.rst b/docs/physics/montecarlo/virtualpackets.rst index 20b4adb2dc6..1b1f7fce41b 100644 --- a/docs/physics/montecarlo/virtualpackets.rst +++ b/docs/physics/montecarlo/virtualpackets.rst @@ -1,3 +1,5 @@ +.. _virtual_packets: + **************************************** Spectrum Generation with Virtual Packets **************************************** diff --git a/docs/quickstart.rst b/docs/quickstart.rst deleted file mode 100644 index 3f96fc3ab9b..00000000000 --- a/docs/quickstart.rst +++ /dev/null @@ -1,108 +0,0 @@ -.. _quickstart: - -**************** -Quickstart Guide -**************** - -To run TARDIS requires two files. The atomic database (for more info refer to -:ref:`atomic-data-download`) and a configuration file (more info at -:ref:`config-file`). You can obtain a copy of the atomic database from the -`tardis-refdata `_ repository -(``atom_data`` subfolder). We recommended to use the -``kurucz_cd23_chianti_H_He.h5`` dataset. - - -Running TARDIS interactively in a Jupyter notebook (recommended) -================================================================ - -To get more information from each run of TARDIS one can run it interactively and -have full access to the model properties (as described in :ref:`physical_quantities`) - -.. toctree:: - :maxdepth: 1 - - examples/run_simple_example.ipynb - - -Running TARDIS in the commandline -================================= - -After installing TARDIS just download the configuration file from the -`tardis-setups `_ and the standard -atomic data set from the `tardis-refdata -`_ repository and run TARDIS. -Assuming you have ``wget``, you could follow the procedure: - - -.. code-block:: none - - mkdir tardis_example - cd tardis_example - wget https://raw.githubusercontent.com/tardis-sn/tardis-setups/master/2014/2014_kerzendorf_sim/appendix_A1/tardis_example.yml - wget https://github.com/tardis-sn/tardis-refdata/raw/master/atom_data/kurucz_cd23_chianti_H_He.h5 - tardis tardis_example.yml output_spectrum.dat - - -Then plot the output_spectrum.dat with your favourite plotting program. Here's an example how to do this with python. -(The only thing you need to install is ipython and matplotlib - in addition to TARDIS's requirements) - -.. code-block:: python - - ipython --pylab - >>> tardis_spec = loadtxt('output_spectrum.dat') - >>> plot(tardis_spec[:,0], tardis_spec[:,1]) - -More atomic datasets can be downloaded from :ref:`atomic-data-download`. - - -Graphical User Interface -======================== - -To get a detailed explanation on gui layout go to :ref:`gui_explanation` . - -**To setup and run the GUI(under development) follow these steps:** - -The gui can use one of two python bindings for qt, namely PyQt4 -and PySide. You can choose which binding is used by setting the -environment variable QT_API in your bash. - -**1**. Installing required packages - -.. code-block:: none - - source activate tardis - conda install ipython=3.0.0 pyside=1.2.1 shiboken=1.2.1 - - -**2**. Choosing between PySide and PyQt4 - -.. code-block:: none - - #To choose PySide - export QT_API=pyside - - #To choose PyQt - export QT_API=pyqt - -**3**. An example of creating a model and GUI - -To show the gui from the ipython shell use the following commands. - -.. code-block:: none - - ipython --pylab=qt4 - -.. code-block:: python - - >>> from tardis import run_tardis - >>> mdl = run_tardis('yamlconfigfile.yml', 'atomdatafile.h5') - >>> from tardis.gui import interface - >>> interface.show(mdl) - -If you just want to run from a configuration file and show the results, you can -do that outside the ipython shell.To do this navigate to the folder where you -installed tardis and go to tardis/tardis/gui, and use the following command. - -.. code-block:: none - - python interface.py path-to-yaml-configuration-file path-to-atomic-data-file diff --git a/docs/quickstart/quickstart.ipynb b/docs/quickstart/quickstart.ipynb new file mode 100644 index 00000000000..b5ffc273cca --- /dev/null +++ b/docs/quickstart/quickstart.ipynb @@ -0,0 +1,1212 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Quickstart ###" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "After the [installation](../installation.rst) start a jupyter server executing `jupyter notebook` on the commandline in a directory that contains the configuration file (in our example `tardis_example.yml`). The atomic database (for more info refer to [atomic data](../atomic/atomic_data.rst) ) and a configuration file (more info at [configuration](../running/configuration/configuration.rst) ). You can obtain a copy of the atomic database from the\n", + "(https://github.com/tardis-sn/tardis-refdata) repository\n", + "(`atom_data` subfolder). We recommended to use the\n", + "`kurucz_cd23_chianti_H_He.h5` dataset (which is auto-downloaded in the second cell already)." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/wkerzend/miniconda/envs/tardis3/lib/python3.6/site-packages/tqdm/autonotebook/__init__.py:14: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", + " \" (e.g. in jupyter console)\", TqdmExperimentalWarning)\n" + ] + } + ], + "source": [ + "from tardis import run_tardis\n", + "from tardis.io.atom_data.util import download_atom_data" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mtardis.io.atom_data.atom_web_download\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Downloading atomic data from https://media.githubusercontent.com/media/tardis-sn/tardis-refdata/master/atom_data/kurucz_cd23_chianti_H_He.h5 to /Users/wkerzend/projects/tardis/tardis-data/kurucz_cd23_chianti_H_He.h5 (\u001b[1matom_web_download.py\u001b[0m:37)\n" + ] + } + ], + "source": [ + "# the data is automatically downloaded\n", + "download_atom_data('kurucz_cd23_chianti_H_He')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "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/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.\n", + " return f(*args, **kwds)\n", + " (\u001b[1mwarnings.py\u001b[0m:99)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/wkerzend/miniconda/envs/tardis3/lib/python3.6/importlib/_bootstrap.py:219: QAWarning: pyne.material is not yet QA compliant.\n", + " return f(*args, **kwds)\n", + " (\u001b[1mwarnings.py\u001b[0m:99)\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", + "[\u001b[1mtardis.plasma.standard_plasmas\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Reading Atomic Data from kurucz_cd23_chianti_H_He.h5 (\u001b[1mstandard_plasmas.py\u001b[0m:74)\n", + "[\u001b[1mtardis.io.atom_data.util\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Atom Data kurucz_cd23_chianti_H_He.h5 not found in local path. Exists in TARDIS Data repo /Users/wkerzend/projects/tardis/tardis-data/kurucz_cd23_chianti_H_He.h5 (\u001b[1mutil.py\u001b[0m:29)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/wkerzend/miniconda/envs/tardis3/lib/python3.6/site-packages/IPython/core/interactiveshell.py:3267: PerformanceWarning: indexing past lexsort depth may impact performance.\n", + " exec(code_obj, self.user_global_ns, self.user_ns)\n", + " (\u001b[1mwarnings.py\u001b[0m:99)\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:184)\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:187)\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", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/wkerzend/python/tardis/tardis/plasma/properties/ion_population.py:63: FutureWarning: \n", + "Passing list-likes to .loc or [] with any missing label will raise\n", + "KeyError in the future, you can use .reindex() as an alternative.\n", + "\n", + "See the documentation here:\n", + "https://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike\n", + " partition_function.index].dropna())\n", + " (\u001b[1mwarnings.py\u001b[0m:99)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/wkerzend/miniconda/envs/tardis3/lib/python3.6/site-packages/astropy/units/equivalencies.py:90: 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:99)\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", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 1/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 7.96915e+42 erg / s Luminosity absorbed = 2.63370e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 9926.501965 10171.209103 0.400392 0.500372\n", + "\t5 9852.611678 10306.111379 0.211205 0.191331\n", + "\t10 9779.813302 10174.379204 0.142695 0.116864\n", + "\t15 9708.082813 9910.442275 0.104556 0.085962\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 9933.952 K -- next t_inner 11453.040 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mpy.warnings \u001b[0m][\u001b[1;33mWARNING\u001b[0m] /Users/wkerzend/python/tardis/tardis/plasma/properties/ion_population.py:63: FutureWarning: \n", + "Passing list-likes to .loc or [] with any missing label will raise\n", + "KeyError in the future, you can use .reindex() as an alternative.\n", + "\n", + "See the documentation here:\n", + "https://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike\n", + " partition_function.index].dropna())\n", + " (\u001b[1mwarnings.py\u001b[0m:99)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 2/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.40398e+43 erg / s Luminosity absorbed = 4.68639e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10171.209103 11518.516702 0.500372 0.538298\n", + "\t5 10306.111379 11554.412119 0.191331 0.217946\n", + "\t10 10174.379204 11373.574056 0.116864 0.132935\n", + "\t15 9910.442275 11040.788763 0.085962 0.099700\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11453.040 K -- next t_inner 9948.201 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 3/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 8.16814e+42 erg / s Luminosity absorbed = 2.50161e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11518.516702 10501.129902 0.538298 0.438591\n", + "\t5 11554.412119 10869.940791 0.217946 0.160809\n", + "\t10 11373.574056 10558.269547 0.132935 0.103807\n", + "\t15 11040.788763 10185.648701 0.099700 0.079165\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 9948.201 K -- next t_inner 11328.896 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 4/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.34487e+43 erg / s Luminosity absorbed = 4.47931e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10501.129902 11527.008679 0.438591 0.512509\n", + "\t5 10869.940791 11706.138980 0.160809 0.196458\n", + "\t10 10558.269547 11444.208532 0.103807 0.124092\n", + "\t15 10185.648701 11085.857161 0.079165 0.093694\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11328.896 K -- next t_inner 10054.300 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 5/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 8.44348e+42 erg / s Luminosity absorbed = 2.68000e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11527.008679 10659.382763 0.512509 0.433573\n", + "\t5 11706.138980 11038.244897 0.196458 0.158494\n", + "\t10 11444.208532 10790.696726 0.124092 0.099660\n", + "\t15 11085.857161 10450.666394 0.093694 0.074550\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10054.300 K -- next t_inner 11261.489 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 6/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.32492e+43 erg / s Luminosity absorbed = 4.26229e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10659.382763 11507.437689 0.433573 0.499441\n", + "\t5 11038.244897 11634.568776 0.158494 0.197953\n", + "\t10 10790.696726 11418.594559 0.099660 0.124085\n", + "\t15 10450.666394 10999.619473 0.074550 0.094676\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11261.489 K -- next t_inner 10069.444 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 7/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 8.49858e+42 erg / s Luminosity absorbed = 2.69247e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11507.437689 10679.650246 0.499441 0.431088\n", + "\t5 11634.568776 11048.266431 0.197953 0.157179\n", + "\t10 11418.594559 10825.714870 0.124085 0.098608\n", + "\t15 10999.619473 10506.321595 0.094676 0.073794\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10069.444 K -- next t_inner 11241.826 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 8/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.30632e+43 erg / s Luminosity absorbed = 4.31719e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10679.650246 11459.828312 0.431088 0.506176\n", + "\t5 11048.266431 11688.139012 0.157179 0.193468\n", + "\t10 10825.714870 11441.768967 0.098608 0.122412\n", + "\t15 10506.321595 11099.449886 0.073794 0.090915\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11241.826 K -- next t_inner 10123.177 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 9/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 8.68357e+42 erg / s Luminosity absorbed = 2.75015e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11459.828312 10666.223660 0.506176 0.445097\n", + "\t5 11688.139012 11000.288585 0.193468 0.163424\n", + "\t10 11441.768967 10822.884326 0.122412 0.101641\n", + "\t15 11099.449886 10384.181273 0.090915 0.078432\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10123.177 K -- next t_inner 11180.783 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 10/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.28170e+43 erg / s Luminosity absorbed = 4.19511e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10666.223660 11427.410445 0.445097 0.500788\n", + "\t5 11000.288585 11612.349822 0.163424 0.193129\n", + "\t10 10822.884326 11373.245169 0.101641 0.121622\n", + "\t15 10384.181273 11047.955461 0.078432 0.090937\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11180.783 K -- next t_inner 10164.432 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 11/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 8.79074e+42 erg / s Luminosity absorbed = 2.82804e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11427.410445 10741.337822 0.500788 0.439938\n", + "\t5 11612.349822 11230.515356 0.193129 0.153637\n", + "\t10 11373.245169 10870.696315 0.121622 0.101050\n", + "\t15 11047.955461 10538.170159 0.090937 0.074680\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10164.432 K -- next t_inner 11157.711 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 12/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.27128e+43 erg / s Luminosity absorbed = 4.15415e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10741.337822 11507.877578 0.439938 0.483114\n", + "\t5 11230.515356 11808.852053 0.153637 0.181826\n", + "\t10 10870.696315 11557.412757 0.101050 0.113563\n", + "\t15 10538.170159 11117.762050 0.074680 0.087418\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11157.711 K -- next t_inner 10184.966 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 13/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 8.90399e+42 erg / s Luminosity absorbed = 2.80864e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11507.877578 10727.217531 0.483114 0.443706\n", + "\t5 11808.852053 11171.758889 0.181826 0.160824\n", + "\t10 11557.412757 10971.722637 0.113563 0.098588\n", + "\t15 11117.762050 10574.916600 0.087418 0.075266\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10184.966 K -- next t_inner 11108.923 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 14/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.25052e+43 erg / s Luminosity absorbed = 4.07335e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10727.217531 11413.626870 0.443706 0.489526\n", + "\t5 11171.758889 11697.006992 0.160824 0.184795\n", + "\t10 10971.722637 11424.445844 0.098588 0.116722\n", + "\t15 10574.916600 11047.434163 0.075266 0.088067\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11108.923 K -- next t_inner 10224.266 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 15/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 9.00727e+42 erg / s Luminosity absorbed = 2.88724e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11413.626870 10712.622749 0.489526 0.455660\n", + "\t5 11697.006992 11125.894032 0.184795 0.164091\n", + "\t10 11424.445844 10816.390451 0.116722 0.104037\n", + "\t15 11047.434163 10421.687097 0.088067 0.080401\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10224.266 K -- next t_inner 11087.666 K (\u001b[1mbase.py\u001b[0m:350)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 16/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.23781e+43 erg / s Luminosity absorbed = 4.07435e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10712.622749 11352.158138 0.455660 0.500754\n", + "\t5 11125.894032 11644.968350 0.164091 0.185289\n", + "\t10 10816.390451 11320.695930 0.104037 0.119195\n", + "\t15 10421.687097 10965.228363 0.080401 0.089940\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11087.666 K -- next t_inner 10256.946 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 17/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 9.18956e+42 erg / s Luminosity absorbed = 2.86249e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11352.158138 10738.799194 0.500754 0.452965\n", + "\t5 11644.968350 11210.269586 0.185289 0.160945\n", + "\t10 11320.695930 10911.463205 0.119195 0.103910\n", + "\t15 10965.228363 10545.065525 0.089940 0.078433\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10256.946 K -- next t_inner 11012.230 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 18/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.20741e+43 erg / s Luminosity absorbed = 3.93375e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 10738.799194 11316.665617 0.452965 0.492135\n", + "\t5 11210.269586 11599.094127 0.160945 0.183929\n", + "\t10 10911.463205 11403.508986 0.103910 0.114400\n", + "\t15 10545.065525 10958.974248 0.078433 0.087415\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 11012.230 K -- next t_inner 10314.623 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 19/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 9.29848e+42 erg / s Luminosity absorbed = 3.02011e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\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 11316.665617 10862.505720 0.492135 0.444495\n", + "\t5 11599.094127 11194.462074 0.183929 0.162842\n", + "\t10 11403.508986 11065.620645 0.114400 0.099372\n", + "\t15 10958.974248 10599.851144 0.087415 0.077690\n", + "\n", + " (\u001b[1mbase.py\u001b[0m:348)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] t_inner 10314.623 K -- next t_inner 11009.102 K (\u001b[1mbase.py\u001b[0m:350)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Starting iteration 20/20 (\u001b[1mbase.py\u001b[0m:266)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Luminosity emitted = 1.21062e+43 erg / s Luminosity absorbed = 3.88405e+42 erg / s Luminosity requested = 1.05928e+43 erg / s (\u001b[1mbase.py\u001b[0m:357)\n", + "[\u001b[1mtardis.simulation.base\u001b[0m][\u001b[1;37mINFO\u001b[0m ] Simulation finished in 20 iterations and took 22.57 s (\u001b[1mbase.py\u001b[0m:306)\n" + ] + } + ], + "source": [ + "#TARDIS now uses the data in the data repo\n", + "sim = run_tardis('tardis_example.yml')" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "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" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
');\n", + " var titletext = $(\n", + " '
');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('