From e84a636b2cf602091127d602939e9a4685960ff8 Mon Sep 17 00:00:00 2001 From: Joshua Shields <54691495+jvshields@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:12:00 -0400 Subject: [PATCH] Update to version of tardis with new atom data (#209) * fix plasma * use aug 25 release --- .github/workflows/benchmarks.yml | 2 +- .github/workflows/build-docs.yml | 2 +- .github/workflows/tests.yml | 2 +- docs/index.rst | 2 +- docs/installation.rst | 4 ++-- stardis/plasma/base.py | 9 ++++++--- stardis_env3.yml | 2 +- stardis_env3_cuda.yml | 2 +- 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 2b4c9913..c9b2b7b8 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,7 +1,7 @@ name: benchmarks env: - TARDIS_VER: release-2024.08.12 # master + TARDIS_VER: release-2024.08.25 # master on: push: diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 239e4c9d..9f920dfb 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -46,7 +46,7 @@ jobs: id: install-tardis # shell: bash -l {0} run: | - pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.12 + pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.25 - name: Install STARDIS id: install-stardis diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5cbadcf7..f782247b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,7 +65,7 @@ jobs: id: install-tardis # shell: bash -l {0} run: | - pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.12 + pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.25 - name: Install STARDIS id: install-stardis diff --git a/docs/index.rst b/docs/index.rst index d5c7c8c4..3327b50f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,7 +10,7 @@ This is the documentation for STARDIS. Quickstart Downloading and Installation Physics of STARDIS - Example Notebooks + Example Notebooks Contributing Bibliography diff --git a/docs/installation.rst b/docs/installation.rst index 7fd47b69..2996368a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -25,7 +25,7 @@ the following in the terminal (replacing ``{platform}`` with $ wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-{platform}.lock $ conda create --name stardis --file conda-{platform}.lock $ conda activate stardis - $ pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.12 + $ pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.25 The third command (``conda activate stardis``) activates the environment, which is necessary to correctly install STARDIS using the directions below. @@ -38,7 +38,7 @@ If you are using Mamba, the steps are similar: $ wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-{platform}.lock $ mamba create --name stardis --file conda-{platform}.lock $ mamba activate stardis - $ pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.12 + $ pip install git+https://github.com/tardis-sn/tardis.git@release-2024.08.25 Downloading and Installing STARDIS ---------------------------------- diff --git a/stardis/plasma/base.py b/stardis/plasma/base.py index 3dc29dbe..edc73696 100644 --- a/stardis/plasma/base.py +++ b/stardis/plasma/base.py @@ -203,7 +203,9 @@ def calculate( points = len(t_electrons) - linelist = atomic_data.linelist.rename(columns={"ion_charge": "ion_number"})[ + linelist = atomic_data.linelist_atoms.rename( + columns={"ion_charge": "ion_number"} + )[ [ "atomic_number", "ion_number", @@ -341,7 +343,9 @@ def calculate( ###TODO: handle other broadening parameters points = len(t_electrons) - linelist = atomic_data.linelist.rename(columns={"ion_charge": "ion_number"})[ + linelist = atomic_data.linelist_atoms.rename( + columns={"ion_charge": "ion_number"} + )[ [ "atomic_number", "ion_number", @@ -538,7 +542,6 @@ def create_stellar_plasma( return BasePlasma( plasma_properties=plasma_modules, dilute_planckian_radiation_field=radiation_field, - abundance=stellar_model.composition.elemental_mass_fraction, atomic_data=atom_data, number_density=stellar_model.composition.elemental_number_density, link_t_rad_t_electron=1.0, diff --git a/stardis_env3.yml b/stardis_env3.yml index ed126f2c..52f6020a 100644 --- a/stardis_env3.yml +++ b/stardis_env3.yml @@ -41,7 +41,7 @@ dependencies: - qgrid =1.3.1=pyhd8ed1ab_4 # qgrid-feedstock/issues/18 - pip: - - git+https://github.com/tardis-sn/tardis.git@release-2024.08.12 + - git+https://github.com/tardis-sn/tardis.git@release-2024.08.25 # --- Packages not required for conda-forge recipe --- diff --git a/stardis_env3_cuda.yml b/stardis_env3_cuda.yml index 7545d79e..a4e125bb 100644 --- a/stardis_env3_cuda.yml +++ b/stardis_env3_cuda.yml @@ -46,7 +46,7 @@ dependencies: - cupy - pip: - - git+https://github.com/tardis-sn/tardis.git@release-2024.08.12 + - git+https://github.com/tardis-sn/tardis.git@release-2024.08.25 # --- Packages not required for conda-forge recipe ---