Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the python scripts to run the 2020 paper #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tardis-setups/2020/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Year 2020 Results
==================

Output of configuartion files uploaded in the year 2020.
71 changes: 71 additions & 0 deletions tardis-setups/2020/plot_16d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
"""
Williamson et al. (2020) Figure 2 t_explosion=16 days
==========================


Article: Williamson, Marc, Kerzendorf, Wolfgang, Modjaz, Maryam 2021, ApJ,
“Modeling Type Ic Supernovae with TARDIS: Hidden Helium in SN 1994I?” (`ADS Link`_).

Original Input Files: `YAML`_, `CSVY`_

Original Atomic Dataset: Data missing

Original Spectra: Data missing

Notes: Please note that the spectra obtained below is obtained by using a slightly
modified configuration file. This is done to ensure that the spectra can be
obtained using the computers hosted by us.

.. _ADS Link: https://ui.adsabs.harvard.edu/abs/2021ApJ...908..150W
.. _YAML: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/code_comp_setups/16d.yml
.. _CSVY: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/code_comp_setups/hach_exact_csvy_16d.csvy
"""


from tardis import run_tardis
from tardis.io.config_reader import Configuration
from tardis.io.atom_data.util import download_atom_data
import matplotlib.pyplot as plt

import sys

sys.path.append("../")
from setup_utils import config_modifier

# %%
# Comment this line if you do not need to download the dataset.


download_atom_data("kurucz_cd23_chianti_H_He")

# %%
conf = Configuration.from_yaml(
"../../2020/2020_williamson_94I/code_comp_setups/16d.yml"
)

# %%
# Note: Here the configuration is slightly modified to allow
# the configuration file on a computer with lower configuration.

conf = config_modifier(conf)
# %%
sim = run_tardis(conf)


spectrum = sim.runner.spectrum
spectrum_virtual = sim.runner.spectrum_virtual
spectrum_integrated = sim.runner.spectrum_integrated

plt.figure(figsize=(10, 6.5))

spectrum.plot(label="Normal packets")
spectrum_virtual.plot(label="Virtual packets")
spectrum_integrated.plot(label="Formal integral")

plt.xlim(500, 9000)
plt.title("TARDIS example model spectrum")
plt.xlabel("Wavelength [$\AA$]")
plt.ylabel("Luminosity density [erg/s/$\AA$]")
plt.legend()
plt.show()

66 changes: 66 additions & 0 deletions tardis-setups/2020/plot_22d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"""
Williamson et al. (2020) Figure 2 t_explosion=22 days
==========================


Article: Williamson, Marc, Kerzendorf, Wolfgang, Modjaz, Maryam 2021, ApJ,
“Modeling Type Ic Supernovae with TARDIS: Hidden Helium in SN 1994I?” (`ADS Link`_).

Original Input Files: `YAML`_, `CSVY`_

Original Atomic Dataset: Data missing

Original Spectra: Data missing

Notes: Please note that the spectra obtained below is obtained by using a slightly
modified configuration file. This is done to ensure that the spectra can be
obtained using the computers hosted by us.

.. _ADS Link: https://ui.adsabs.harvard.edu/abs/2021ApJ...908..150W
.. _YAML: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/code_comp_setups/22d.yml
.. _CSVY: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/code_comp_setups/hach_exact_csvy_22d.csvy
"""

from tardis import run_tardis
from tardis.io.config_reader import Configuration
from tardis.io.atom_data.util import download_atom_data
import matplotlib.pyplot as plt

import sys

sys.path.append("../")
from setup_utils import config_modifier

# %%
# Uncomment this line if you need to download the dataset.


download_atom_data("kurucz_cd23_chianti_H_He")

# %%
# Runs the example

conf = Configuration.from_yaml(
"../../2020/2020_williamson_94I/code_comp_setups/22d.yml"
)
conf = config_modifier(conf)
# %%
sim = run_tardis(conf)


spectrum = sim.runner.spectrum
spectrum_virtual = sim.runner.spectrum_virtual
spectrum_integrated = sim.runner.spectrum_integrated

plt.figure(figsize=(10, 6.5))

spectrum.plot(label="Normal packets")
spectrum_virtual.plot(label="Virtual packets")
spectrum_integrated.plot(label="Formal integral")

plt.xlim(500, 9000)
plt.title("TARDIS example model spectrum")
plt.xlabel("Wavelength [$\AA$]")
plt.ylabel("Luminosity density [erg/s/$\AA$]")
plt.legend()
plt.show()
65 changes: 65 additions & 0 deletions tardis-setups/2020/plot_22d_he_01.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""
Williamson et al. (2020) Figure 3 g He=0.01M⊙
==========================


Article: Williamson, Marc, Kerzendorf, Wolfgang, Modjaz, Maryam 2021, ApJ,
“Modeling Type Ic Supernovae with TARDIS: Hidden Helium in SN 1994I?” (`ADS Link`_).

Original Input Files: `YAML`_, `CSVY`_

Original Atomic Dataset: Data missing

Original Spectra: Data missing

Notes: Please note that the spectra obtained below is obtained by using a slightly
modified configuration file. This is done to ensure that the spectra can be
obtained using the computers hosted by us.

.. _ADS Link: https://ui.adsabs.harvard.edu/abs/2021ApJ...908..150W
.. _YAML: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/he_setups/22d_he_01.yml
.. _CSVY: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/he_setups/22d_He_0.01.csvy
"""


from tardis import run_tardis
from tardis.io.config_reader import Configuration
from tardis.io.atom_data.util import download_atom_data
import matplotlib.pyplot as plt

import sys

sys.path.append("../")
from setup_utils import config_modifier

# %%
# Uncomment this line if you need to download the dataset.


download_atom_data("kurucz_cd23_chianti_H_He")

# %%
# Runs the example

conf = Configuration.from_yaml("../../2020/2020_williamson_94I/he_setups/22d_he_01.yml")
conf = config_modifier(conf)
# %%
sim = run_tardis(conf)


spectrum = sim.runner.spectrum
spectrum_virtual = sim.runner.spectrum_virtual
spectrum_integrated = sim.runner.spectrum_integrated

plt.figure(figsize=(10, 6.5))

spectrum.plot(label="Normal packets")
spectrum_virtual.plot(label="Virtual packets")
spectrum_integrated.plot(label="Formal integral")

plt.xlim(500, 9000)
plt.title("TARDIS example model spectrum")
plt.xlabel("Wavelength [$\AA$]")
plt.ylabel("Luminosity density [erg/s/$\AA$]")
plt.legend()
plt.show()
65 changes: 65 additions & 0 deletions tardis-setups/2020/plot_22d_he_05.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""
Williamson et al. (2020) Figure 3 g He=0.05M⊙
==========================


Article: Williamson, Marc, Kerzendorf, Wolfgang, Modjaz, Maryam 2021, ApJ,
“Modeling Type Ic Supernovae with TARDIS: Hidden Helium in SN 1994I?” (`ADS Link`_).

Original Input Files: `YAML`_, `CSVY`_

Original Atomic Dataset: Data missing

Original Spectra: Data missing

Notes: Please note that the spectra obtained below is obtained by using a slightly
modified configuration file. This is done to ensure that the spectra can be
obtained using the computers hosted by us.

.. _ADS Link: https://ui.adsabs.harvard.edu/abs/2021ApJ...908..150W
.. _YAML: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/he_setups/22d_he_05.yml
.. _CSVY: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/he_setups/22d_He_0.05.csvy
"""


from tardis import run_tardis
from tardis.io.config_reader import Configuration
from tardis.io.atom_data.util import download_atom_data
import matplotlib.pyplot as plt

import sys

sys.path.append("../")
from setup_utils import config_modifier

# %%
# Uncomment this line if you need to download the dataset.


download_atom_data("kurucz_cd23_chianti_H_He")

# %%
# Runs the example

conf = Configuration.from_yaml("../../2020/2020_williamson_94I/he_setups/22d_he_05.yml")
conf = config_modifier(conf)
# %%
sim = run_tardis(conf)


spectrum = sim.runner.spectrum
spectrum_virtual = sim.runner.spectrum_virtual
spectrum_integrated = sim.runner.spectrum_integrated

plt.figure(figsize=(10, 6.5))

spectrum.plot(label="Normal packets")
spectrum_virtual.plot(label="Virtual packets")
spectrum_integrated.plot(label="Formal integral")

plt.xlim(500, 9000)
plt.title("TARDIS example model spectrum")
plt.xlabel("Wavelength [$\AA$]")
plt.ylabel("Luminosity density [erg/s/$\AA$]")
plt.legend()
plt.show()
65 changes: 65 additions & 0 deletions tardis-setups/2020/plot_22d_he_10.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""
Williamson et al. (2020) Figure 3 g He=0.10M⊙
==========================


Article: Williamson, Marc, Kerzendorf, Wolfgang, Modjaz, Maryam 2021, ApJ,
“Modeling Type Ic Supernovae with TARDIS: Hidden Helium in SN 1994I?” (`ADS Link`_).

Original Input Files: `YAML`_, `CSVY`_

Original Atomic Dataset: Data missing

Original Spectra: Data missing

Notes: Please note that the spectra obtained below is obtained by using a slightly
modified configuration file. This is done to ensure that the spectra can be
obtained using the computers hosted by us.

.. _ADS Link: https://ui.adsabs.harvard.edu/abs/2021ApJ...908..150W
.. _YAML: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/he_setups/22d_he_10.yml
.. _CSVY: https://github.com/tardis-sn/tardis-setups/blob/master/2020/2020_williamson_94I/he_setups/22d_He_0.10.csvy
"""


from tardis import run_tardis
from tardis.io.config_reader import Configuration
from tardis.io.atom_data.util import download_atom_data
import matplotlib.pyplot as plt

import sys

sys.path.append("../")
from setup_utils import config_modifier

# %%
# Uncomment this line if you need to download the dataset.


download_atom_data("kurucz_cd23_chianti_H_He")

# %%
# Runs the example

conf = Configuration.from_yaml("../../2020/2020_williamson_94I/he_setups/22d_he_10.yml")
conf = config_modifier(conf)
# %%
sim = run_tardis(conf)


spectrum = sim.runner.spectrum
spectrum_virtual = sim.runner.spectrum_virtual
spectrum_integrated = sim.runner.spectrum_integrated

plt.figure(figsize=(10, 6.5))

spectrum.plot(label="Normal packets")
spectrum_virtual.plot(label="Virtual packets")
spectrum_integrated.plot(label="Formal integral")

plt.xlim(500, 9000)
plt.title("TARDIS example model spectrum")
plt.xlabel("Wavelength [$\AA$]")
plt.ylabel("Luminosity density [erg/s/$\AA$]")
plt.legend()
plt.show()
Loading