From 642e19159a622fbdd301adc5efccdd4fe233d732 Mon Sep 17 00:00:00 2001 From: KasukabeDefenceForce Date: Thu, 1 Aug 2024 12:56:59 +0530 Subject: [PATCH 01/10] Donot run docs, benchmarks and stardis tests on draft PRs. (#2761) * Add ready to review to run tests * Add if condition to check PR status * Running stardis tests only on push to master * Removing osx-64 from workflows --- .github/workflows/benchmarks.yml | 2 ++ .github/workflows/build-docs.yml | 2 ++ .github/workflows/stardis-tests.yml | 14 ++++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 9ed9b5581e4..2ed44515e7b 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -14,6 +14,7 @@ on: - reopened - synchronize - labeled # benchmarks label required + - ready_for_review workflow_dispatch: env: @@ -31,6 +32,7 @@ jobs: build: if: github.repository_owner == 'tardis-sn' && (github.event_name == 'push' || + (!github.event.pull_request.draft) || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'benchmarks'))) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index bb17c9581f0..254c19ffbdd 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -18,6 +18,7 @@ on: - reopened - synchronize - labeled # requires the `build-docs` label + - ready_for_review workflow_dispatch: # manual trigger @@ -37,6 +38,7 @@ defaults: jobs: check-for-changes: runs-on: ubuntu-latest + if: ${{ !github.event.pull_request.draft }} outputs: trigger-check-outcome: ${{ steps.trigger_check.outcome }} docs-check-outcome: ${{ steps.docs_check.outcome }} diff --git a/.github/workflows/stardis-tests.yml b/.github/workflows/stardis-tests.yml index fad5fbaa7d9..a8e09d8a1db 100644 --- a/.github/workflows/stardis-tests.yml +++ b/.github/workflows/stardis-tests.yml @@ -3,12 +3,17 @@ name: stardis-tests on: push: branches: - - '*' + - master pull_request: branches: - '*' + types: + - opened + - reopened + - synchronize + - ready_for_review workflow_dispatch: defaults: @@ -22,18 +27,15 @@ jobs: build: strategy: matrix: - label: [osx-64, linux-64] + label: [linux-64] include: - os: ubuntu-latest label: linux-64 prefix: /usr/share/miniconda3/envs/stardis - - os: macos-latest - label: osx-64 - prefix: /Users/runner/miniconda3/envs/stardis - name: ${{ matrix.label }} runs-on: ${{ matrix.os }} + if: ${{ !github.event.pull_request.draft }} steps: - uses: actions/checkout@v4 with: From 88835ff94edc06d9650d6f7e9ce1756e4a5be26a Mon Sep 17 00:00:00 2001 From: Sumit Gupta <53135486+Sumit112192@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:57:39 +0530 Subject: [PATCH 02/10] Add Extend Array Function (#2771) * Add Extend Array Function * Fix Typo and restructure * Restructure * Doc string update * Was expecting numpy arrays to be passed by reference but it is not so updating it * Add test for the extend array function --- .../transport/montecarlo/packet_trackers.py | 46 +++++++++---------- .../montecarlo/tests/test_rpacket_tracker.py | 12 +++++ 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/tardis/transport/montecarlo/packet_trackers.py b/tardis/transport/montecarlo/packet_trackers.py index 7a10a992f05..466fad27843 100644 --- a/tardis/transport/montecarlo/packet_trackers.py +++ b/tardis/transport/montecarlo/packet_trackers.py @@ -16,6 +16,7 @@ ("shell_id", int64[:]), ("interaction_type", int64[:]), ("num_interactions", int64), + ("extend_factor", int64), ] @@ -47,6 +48,8 @@ class RPacketTracker(object): Type of interaction the rpacket undergoes num_interactions : int Internal counter for the interactions that a particular RPacket undergoes + extend_factor : int + The factor by which to extend the properties array when the size limit is reached """ def __init__(self, length): @@ -61,34 +64,27 @@ def __init__(self, length): self.shell_id = np.empty(self.length, dtype=np.int64) self.interaction_type = np.empty(self.length, dtype=np.int64) self.num_interactions = 0 + self.extend_factor = 2 + + def extend_array(self, array, array_length): + temp_array = np.empty( + array_length * self.extend_factor, dtype=array.dtype + ) + temp_array[:array_length] = array + return temp_array def track(self, r_packet): if self.num_interactions >= self.length: - temp_length = self.length * 2 - temp_status = np.empty(temp_length, dtype=np.int64) - temp_r = np.empty(temp_length, dtype=np.float64) - temp_nu = np.empty(temp_length, dtype=np.float64) - temp_mu = np.empty(temp_length, dtype=np.float64) - temp_energy = np.empty(temp_length, dtype=np.float64) - temp_shell_id = np.empty(temp_length, dtype=np.int64) - temp_interaction_type = np.empty(temp_length, dtype=np.int64) - - temp_status[: self.length] = self.status - temp_r[: self.length] = self.r - temp_nu[: self.length] = self.nu - temp_mu[: self.length] = self.mu - temp_energy[: self.length] = self.energy - temp_shell_id[: self.length] = self.shell_id - temp_interaction_type[: self.length] = self.interaction_type - - self.status = temp_status - self.r = temp_r - self.nu = temp_nu - self.mu = temp_mu - self.energy = temp_energy - self.shell_id = temp_shell_id - self.interaction_type = temp_interaction_type - self.length = temp_length + self.status = self.extend_array(self.status, self.length) + self.r = self.extend_array(self.r, self.length) + self.nu = self.extend_array(self.nu, self.length) + self.mu = self.extend_array(self.mu, self.length) + self.energy = self.extend_array(self.energy, self.length) + self.shell_id = self.extend_array(self.shell_id, self.length) + self.interaction_type = self.extend_array( + self.interaction_type, self.length + ) + self.length = self.length * self.extend_factor self.index = r_packet.index self.seed = r_packet.seed diff --git a/tardis/transport/montecarlo/tests/test_rpacket_tracker.py b/tardis/transport/montecarlo/tests/test_rpacket_tracker.py index 9a42da459e5..7dbfc03784c 100644 --- a/tardis/transport/montecarlo/tests/test_rpacket_tracker.py +++ b/tardis/transport/montecarlo/tests/test_rpacket_tracker.py @@ -4,6 +4,7 @@ from tardis.transport.montecarlo.r_packet import InteractionType from tardis.transport.montecarlo.packet_trackers import ( + RPacketTracker, rpacket_trackers_to_dataframe, ) @@ -102,6 +103,17 @@ def nu_rpacket_tracker(rpacket_tracker): return nu +def test_extend_array(): + rpacket_tracker = RPacketTracker(10) + array = np.array([1, 2, 3, 4, 5], dtype=np.int64) + + new_array = rpacket_tracker.extend_array(array, array.size) + + assert new_array.size == array.size * rpacket_tracker.extend_factor + assert new_array.dtype == array.dtype + npt.assert_allclose(array, new_array[: array.size]) + + @pytest.mark.parametrize( "expected,obtained", [ From c82dde5fb55a81dafc67e8b182efb9084a0d58a3 Mon Sep 17 00:00:00 2001 From: Jack O'Brien Date: Thu, 1 Aug 2024 17:34:19 -0400 Subject: [PATCH 03/10] Opacity state slice (#2758) * Added basic sliing operation to opacitystate and set the transport solver to use the bounds of the gemoetry indices * Reformatted the slicing index * Added slicing operation with __getitem__ * Added docstring * removed old slice method * Ran black * Added back the 'slice' method because __getitem__ is wacky * added missing argument * fixed missing argument * ran black * fixed the tests * ran black * Updated the slice to use __getitem__ again and modified the opacitystate object defined in the opacities module * Removed old slice method and print statements * removed print statement from the test * added type annotation to OpacityState getitem * updated numba interface --- tardis/opacities/opacity_state.py | 35 +++++++++++++++++++ tardis/transport/montecarlo/base.py | 11 +++--- .../transport/montecarlo/numba_interface.py | 35 +++++++++++++++++++ .../montecarlo/tests/test_numba_interface.py | 29 ++++++++++++--- 4 files changed, 101 insertions(+), 9 deletions(-) diff --git a/tardis/opacities/opacity_state.py b/tardis/opacities/opacity_state.py index 1f8905cd12f..7fbab4be781 100644 --- a/tardis/opacities/opacity_state.py +++ b/tardis/opacities/opacity_state.py @@ -106,6 +106,41 @@ def __init__( self.photo_ion_activation_idx = photo_ion_activation_idx self.k_packet_idx = k_packet_idx + def __getitem__(self, i: slice): + """Get a shell or slice of shells of the attributes of the opacity state + + Args: + i (slice): shell slice. Will fail if slice is int since class only supports array types + + Returns: + OpacityState : a shallow copy of the current instance + """ + # NOTE: This currently will not work with continuum processes since it does not slice those arrays + return OpacityState( + self.electron_density[i], + self.t_electrons[i], + self.line_list_nu, + self.tau_sobolev[:, i], + self.transition_probabilities[:, i], + self.line2macro_level_upper, + self.macro_block_references, + self.transition_type, + self.destination_level_id, + self.transition_line_id, + self.bf_threshold_list_nu, + self.p_fb_deactivation, + self.photo_ion_nu_threshold_mins, + self.photo_ion_nu_threshold_maxs, + self.photo_ion_block_references, + self.chi_bf, + self.x_sect, + self.phot_nus, + self.ff_opacity_factor, + self.emissivities, + self.photo_ion_activation_idx, + self.k_packet_idx, + ) + def opacity_state_initialize( plasma, diff --git a/tardis/transport/montecarlo/base.py b/tardis/transport/montecarlo/base.py index 8812bfab229..5137acee0a4 100644 --- a/tardis/transport/montecarlo/base.py +++ b/tardis/transport/montecarlo/base.py @@ -23,7 +23,7 @@ from tardis.transport.montecarlo.montecarlo_transport_state import ( MonteCarloTransportState, ) -from tardis.transport.montecarlo.numba_interface import ( +from tardis.opacities.opacity_state import ( opacity_state_initialize, ) from tardis.transport.montecarlo.packet_trackers import ( @@ -110,9 +110,6 @@ def initialize_transport_state( packet_collection = self.packet_source.create_packets( no_of_packets, seed_offset=iteration ) - estimators = initialize_estimator_statistics( - plasma.tau_sobolevs.shape, gamma_shape - ) geometry_state = simulation_state.geometry.to_numba() opacity_state = opacity_state_initialize( @@ -120,6 +117,12 @@ def initialize_transport_state( self.line_interaction_type, self.montecarlo_configuration.DISABLE_LINE_SCATTERING, ) + opacity_state = opacity_state[simulation_state.geometry.v_inner_boundary_index: simulation_state.geometry.v_outer_boundary_index] + + estimators = initialize_estimator_statistics( + opacity_state.tau_sobolev.shape, gamma_shape + ) + transport_state = MonteCarloTransportState( packet_collection, estimators, diff --git a/tardis/transport/montecarlo/numba_interface.py b/tardis/transport/montecarlo/numba_interface.py index f2253c7ff5d..d6db1e12e3e 100644 --- a/tardis/transport/montecarlo/numba_interface.py +++ b/tardis/transport/montecarlo/numba_interface.py @@ -112,6 +112,41 @@ def __init__( self.photo_ion_activation_idx = photo_ion_activation_idx self.k_packet_idx = k_packet_idx + def __getitem__(self, i: slice): + """Get a shell or slice of shells of the attributes of the opacity state + + Args: + i (slice): shell slice. Will fail if slice is int since class only supports array types + + Returns: + OpacityState : a shallow copy of the current instance + """ + # NOTE: This currently will not work with continuum processes since it does not slice those arrays + return OpacityState( + self.electron_density[i], + self.t_electrons[i], + self.line_list_nu, + self.tau_sobolev[:, i], + self.transition_probabilities[:, i], + self.line2macro_level_upper, + self.macro_block_references, + self.transition_type, + self.destination_level_id, + self.transition_line_id, + self.bf_threshold_list_nu, + self.p_fb_deactivation, + self.photo_ion_nu_threshold_mins, + self.photo_ion_nu_threshold_maxs, + self.photo_ion_block_references, + self.chi_bf, + self.x_sect, + self.phot_nus, + self.ff_opacity_factor, + self.emissivities, + self.photo_ion_activation_idx, + self.k_packet_idx, + ) + def opacity_state_initialize( plasma, diff --git a/tardis/transport/montecarlo/tests/test_numba_interface.py b/tardis/transport/montecarlo/tests/test_numba_interface.py index 25d907049f6..5e73894549f 100644 --- a/tardis/transport/montecarlo/tests/test_numba_interface.py +++ b/tardis/transport/montecarlo/tests/test_numba_interface.py @@ -4,8 +4,19 @@ import numpy as np -@pytest.mark.parametrize("input_params", ["scatter", "macroatom", "downbranch"]) -def test_opacity_state_initialize(nb_simulation_verysimple, input_params): +@pytest.mark.parametrize( + "input_params,sliced", + [ + ("scatter", False), + ("macroatom", False), + ("macroatom", True), + ("downbranch", False), + ("downbranch", True), + ], +) +def test_opacity_state_initialize( + nb_simulation_verysimple, input_params, sliced +): line_interaction_type = input_params plasma = nb_simulation_verysimple.plasma actual = numba_interface.opacity_state_initialize( @@ -14,11 +25,19 @@ def test_opacity_state_initialize(nb_simulation_verysimple, input_params): disable_line_scattering=False, ) + if sliced: + index = slice(2, 5) + actual = actual[index] + else: + index = ... + npt.assert_allclose( - actual.electron_density, plasma.electron_densities.values + actual.electron_density, plasma.electron_densities.values[index] ) npt.assert_allclose(actual.line_list_nu, plasma.atomic_data.lines.nu.values) - npt.assert_allclose(actual.tau_sobolev, plasma.tau_sobolevs.values) + npt.assert_allclose( + actual.tau_sobolev, plasma.tau_sobolevs.values[:, index] + ) if line_interaction_type == "scatter": empty = np.zeros(1, dtype=np.int64) npt.assert_allclose( @@ -32,7 +51,7 @@ def test_opacity_state_initialize(nb_simulation_verysimple, input_params): else: npt.assert_allclose( actual.transition_probabilities, - plasma.transition_probabilities.values, + plasma.transition_probabilities.values[:, index], ) npt.assert_allclose( actual.line2macro_level_upper, From bd1558bdd96df1d3a21bb8464f46fe9b54a36d6f Mon Sep 17 00:00:00 2001 From: Andrew Fullard Date: Fri, 2 Aug 2024 09:44:09 -0400 Subject: [PATCH 04/10] Fixes black formatting --- tardis/transport/montecarlo/base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tardis/transport/montecarlo/base.py b/tardis/transport/montecarlo/base.py index 5137acee0a4..af865836598 100644 --- a/tardis/transport/montecarlo/base.py +++ b/tardis/transport/montecarlo/base.py @@ -23,7 +23,7 @@ from tardis.transport.montecarlo.montecarlo_transport_state import ( MonteCarloTransportState, ) -from tardis.opacities.opacity_state import ( +from tardis.opacities.opacity_state import ( opacity_state_initialize, ) from tardis.transport.montecarlo.packet_trackers import ( @@ -117,8 +117,10 @@ def initialize_transport_state( self.line_interaction_type, self.montecarlo_configuration.DISABLE_LINE_SCATTERING, ) - opacity_state = opacity_state[simulation_state.geometry.v_inner_boundary_index: simulation_state.geometry.v_outer_boundary_index] - + opacity_state = opacity_state[ + simulation_state.geometry.v_inner_boundary_index : simulation_state.geometry.v_outer_boundary_index + ] + estimators = initialize_estimator_statistics( opacity_state.tau_sobolev.shape, gamma_shape ) From 1807f36063614eb2c064a4bbbda4b6ca61a2864f Mon Sep 17 00:00:00 2001 From: Atharva Arya <55894364+atharva-2001@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:00:12 +0530 Subject: [PATCH 05/10] Release Pipeline Fixes (#2767) * Fix zenodo badge * Pick from the website * update badge in credits.rst * Use the all versions DOI * Inherit secrets * Change triggers for testing * Reset Triggers --- .github/workflows/pre-release.yml | 1 + README.rst | 5 +++-- docs/resources/credits.rst | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 5b24dbfb45b..78b159e8b95 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -143,5 +143,6 @@ jobs: pip_tests: uses: ./.github/workflows/tests.yml + secrets: inherit with: pip_git: true diff --git a/README.rst b/README.rst index fe1b070fbbc..8603332dea9 100644 --- a/README.rst +++ b/README.rst @@ -112,8 +112,9 @@ The following BibTeX entries are needed for the references: .. |CITATION| replace:: kerzendorf_2023_10207663 -.. |DOI_BADGE| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.3_10207663-blue - :target: https://doi.org/10.5281/zenodo.3_10207663 +.. |DOI_BADGE| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592480.svg + :target: https://doi.org/10.5281/zenodo.592480 + .. code-block:: bibtex diff --git a/docs/resources/credits.rst b/docs/resources/credits.rst index db36f05d484..cacb3e9bd38 100644 --- a/docs/resources/credits.rst +++ b/docs/resources/credits.rst @@ -76,8 +76,8 @@ The following BibTeX entries are needed for the references: .. |CITATION| replace:: kerzendorf_2023_10207663 -.. |DOI_BADGE| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.3_10207663-blue - :target: https://doi.org/10.5281/zenodo.3_10207663 +.. |DOI_BADGE| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592480.svg + :target: https://doi.org/10.5281/zenodo.592480 .. code-block:: bibtex From d8da61e895cfdeef4dfc9b8eaa9eba904c475fc7 Mon Sep 17 00:00:00 2001 From: Atharva Arya <55894364+atharva-2001@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:06:22 +0530 Subject: [PATCH 06/10] Fix ruff comments issue (#2762) * Fix ruff comments issue * Only check files changed * Testing triggers * Fix bash commands * No pager * fetch depth * Reset all changes --- .github/workflows/codestyle.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index bf5ada7cd94..89ed4c58ec2 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -7,8 +7,7 @@ name: codestyle on: push: branches: - - "*" - + - master pull_request_target: branches: - master @@ -37,6 +36,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Download Lock File run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock @@ -57,12 +58,22 @@ jobs: cache-downloads: true - name: Show statistics - run: ruff check --statistics --show-fixes . | tee ruff_stats.txt - id: ruff_stats + run: ruff check --statistics --show-fixes $(git --no-pager diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} --) | tee ruff_stats.txt - name: Show entire output - run: ruff check . --output-format=full | tee ruff_full.txt - id: ruff_complete + run: ruff check --output-format=concise $(git --no-pager diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} --) | tee ruff_full.txt + + - name: Statistics output read + id: ruff_stats + uses: juliangruber/read-file-action@v1.0.0 + with: + path: ruff_stats.txt + + - name: Entire output read + id: ruff_complete + uses: juliangruber/read-file-action@v1.0.0 + with: + path: ruff_full.txt - name: Find Comment if: always() && github.event_name == 'pull_request_target' From 0349e7a90c90bfb9d9dbc5a106adfcbfda9a6f39 Mon Sep 17 00:00:00 2001 From: Asish Kumar <87874775+officialasishkumar@users.noreply.github.com> Date: Sat, 3 Aug 2024 01:18:15 +0530 Subject: [PATCH 07/10] Cache benchmark functions (#2749) * added setup function Signed-off-by: Asish Kumar * refactor geometry calculate distances Signed-off-by: Asish Kumar * Refactor montecarlo estimators in benchmark code Signed-off-by: Asish Kumar * add cache and setup functions Signed-off-by: Asish Kumar * add cache and setup functions Signed-off-by: Asish Kumar * ran ruff linter Signed-off-by: Asish Kumar * Thou hath vanquished the redundant variables and functions Signed-off-by: Asish Kumar * fix bugs Signed-off-by: Asish Kumar * change benchmark yml Signed-off-by: Asish Kumar * repeat in class Signed-off-by: Asish Kumar * rounds in benchmarks Signed-off-by: Asish Kumar * fix Signed-off-by: Asish Kumar * fix error in formal integral Signed-off-by: Asish Kumar * more cache Signed-off-by: Asish Kumar * sort by ratio Signed-off-by: Asish Kumar * cache in setup function Signed-off-by: Asish Kumar --------- Signed-off-by: Asish Kumar --- .github/workflows/benchmarks.yml | 10 +- benchmarks/benchmark_base.py | 256 +++--------------- benchmarks/opacities_opacity.py | 104 ++----- benchmarks/opacities_opacity_state.py | 20 +- benchmarks/run_tardis.py | 14 +- benchmarks/spectrum_formal_integral.py | 48 ++-- .../transport_geometry_calculate_distances.py | 61 ++--- ...rlo_estimators_radfield_estimator_calcs.py | 51 +--- .../transport_montecarlo_interaction.py | 86 ++---- benchmarks/transport_montecarlo_main_loop.py | 24 +- .../transport_montecarlo_packet_trackers.py | 42 +-- ...transport_montecarlo_single_packet_loop.py | 11 +- benchmarks/transport_montecarlo_vpacket.py | 127 ++++----- benchmarks/util/__init__.py | 0 benchmarks/util/base.py | 20 -- benchmarks/util/nlte.py | 78 ------ 16 files changed, 265 insertions(+), 687 deletions(-) delete mode 100644 benchmarks/util/__init__.py delete mode 100644 benchmarks/util/base.py delete mode 100644 benchmarks/util/nlte.py diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 2ed44515e7b..95021ce994f 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -74,11 +74,11 @@ jobs: - name: Accept all asv questions run: asv machine --yes - - name: Run benchmarks for last 5 commits if not PR + - name: Run benchmarks for last 4 commits if not PR if: github.event_name != 'pull_request_target' run: | git log -n 4 --pretty=format:"%H" >> tag_commits.txt - asv run -a repeat=1 -a rounds=1 HASHFILE:tag_commits.txt | tee asv-output.log + asv run -a rounds=1 HASHFILE:tag_commits.txt | tee asv-output.log if grep -q failed asv-output.log; then echo "Some benchmarks have failed!" exit 1 @@ -109,17 +109,17 @@ jobs: run: | echo $(git rev-parse HEAD) > commit_hashes.txt echo $(git rev-parse master) >> commit_hashes.txt - asv run -a repeat=2 -a rounds=1 HASHFILE:commit_hashes.txt | tee asv-output-PR.log + asv run -a rounds=1 HASHFILE:commit_hashes.txt | tee asv-output-PR.log if grep -q failed asv-output-PR.log; then echo "Some benchmarks have failed!" exit 1 fi - name: Compare Master and PR head - run: asv compare origin/master HEAD --config asv.conf.json | tee asv-compare-output.log + run: asv compare origin/master HEAD --factor 1.1 --split --sort ratio | tee asv-compare-output.log - name: Compare Master and PR head but only show changed results - run: asv compare origin/master HEAD --only-changed --config asv.conf.json | tee asv-compare-changed-output.log + run: asv compare origin/master HEAD --only-changed --factor 1.1 --split --sort ratio | tee asv-compare-changed-output.log - name: Benchmarks compare output id: asv_pr_vs_master diff --git a/benchmarks/benchmark_base.py b/benchmarks/benchmark_base.py index c4ef1f2a98a..16f8cbac31a 100644 --- a/benchmarks/benchmark_base.py +++ b/benchmarks/benchmark_base.py @@ -1,47 +1,31 @@ +import functools from copy import deepcopy from os.path import dirname, join, realpath from pathlib import Path -from tempfile import mkstemp -import astropy.units as u import numpy as np -from numba import njit -from benchmarks.util.nlte import NLTE from tardis import run_tardis from tardis.io.atom_data import AtomData -from tardis.io.configuration import config_reader from tardis.io.configuration.config_reader import Configuration from tardis.io.util import YAMLLoader, yaml_load_file -from tardis.model import SimulationState from tardis.model.geometry.radial1d import NumbaRadial1DGeometry from tardis.simulation import Simulation from tardis.tests.fixtures.atom_data import DEFAULT_ATOM_DATA_UUID -from tardis.tests.fixtures.regression_data import RegressionData -from tardis.transport.montecarlo import RPacket -from tardis.transport.montecarlo.configuration import montecarlo_globals +from tardis.transport.montecarlo import RPacket, packet_trackers from tardis.transport.montecarlo.configuration.base import ( MonteCarloConfiguration, ) from tardis.transport.montecarlo.estimators import radfield_mc_estimators from tardis.transport.montecarlo.numba_interface import opacity_state_initialize -from tardis.transport.montecarlo.packet_collections import ( - VPacketCollection, -) -from tardis.transport.montecarlo.packet_trackers import ( - RPacketTracker, - generate_rpacket_last_interaction_tracker_list, -) +from tardis.transport.montecarlo.packet_collections import VPacketCollection +from tardis.transport.montecarlo.packet_trackers import RPacketTracker class BenchmarkBase: - # It allows 10 minutes of runtime for each benchmark and includes # the total time for all the repetitions for each benchmark. timeout = 600 - def __init__(self): - self.nlte = NLTE() - @staticmethod def get_relative_path(partial_path: str): path = dirname(realpath(__file__)) @@ -57,7 +41,7 @@ def get_absolute_path(self, partial_path): return self.get_relative_path(partial_path) - @property + @functools.cached_property def tardis_config_verysimple(self): filename = self.get_absolute_path( "tardis/io/configuration/tests/data/tardis_configv1_verysimple.yml" @@ -67,7 +51,7 @@ def tardis_config_verysimple(self): YAMLLoader, ) - @property + @functools.cached_property def config_rpacket_tracking(self): config = Configuration.from_yaml( f"{self.example_configuration_dir}/tardis_configv1_verysimple.yml" @@ -75,17 +59,15 @@ def config_rpacket_tracking(self): config.montecarlo.tracking.track_rpacket = True return config - @property + @functools.cached_property def tardis_ref_path(self): - # TODO: This route is fixed but needs to get from the arguments given in the command line. - # /app/tardis-refdata ref_data_path = Path( Path(__file__).parent.parent, - "tardis-refdata", + "tardis-refdata" ).resolve() return ref_data_path - @property + @functools.cached_property def atomic_dataset(self) -> AtomData: atomic_data = AtomData.from_hdf(self.atomic_data_fname) @@ -95,7 +77,7 @@ def atomic_dataset(self) -> AtomData: else: return atomic_data - @property + @functools.cached_property def atomic_data_fname(self): atomic_data_fname = ( f"{self.tardis_ref_path}/atom_data/kurucz_cd23_chianti_H_He.h5" @@ -110,59 +92,11 @@ def atomic_data_fname(self): return atomic_data_fname - @property + @functools.cached_property def example_configuration_dir(self): return self.get_absolute_path("tardis/io/configuration/tests/data") - @property - def hdf_file_path(self): - # TODO: Delete this files after ASV runs the benchmarks. - # ASV create a temporal directory in runtime per test: `tmpiuxngvlv`. - # The ASV and ASV_Runner, not has some way to get this temporal directory. - # The idea is use this temporal folders to storage this created temporal file. - _, path = mkstemp("-tardis-benchmark-hdf_buffer-test.hdf") - return path - - def create_temporal_file(self, suffix=None): - # TODO: Delete this files after ASV runs the benchmarks. - # ASV create a temporal directory in runtime per test: `tmpiuxngvlv`. - # The ASV and ASV_Runner, not has some way to get this temporal directory. - # The idea is use this temporal folders to storage this created temporal file. - suffix_str = "" if suffix is None else f"-{suffix}" - _, path = mkstemp(suffix_str) - return path - - @property - def gamma_ray_simulation_state(self): - self.gamma_ray_config.model.structure.velocity.start = 1.0 * u.km / u.s - self.gamma_ray_config.model.structure.density.rho_0 = ( - 5.0e2 * u.g / u.cm**3 - ) - self.gamma_ray_config.supernova.time_explosion = 150 * u.d - - return SimulationState.from_config( - self.gamma_ray_config, atom_data=self.atomic_dataset - ) - - @property - def gamma_ray_config(self): - yml_path = f"{self.example_configuration_dir}/tardis_configv1_density_exponential_nebular_multi_isotope.yml" - - return config_reader.Configuration.from_yaml(yml_path) - - @property - def example_model_file_dir(self): - return self.get_absolute_path("tardis/io/model/readers/tests/data") - - @property - def kurucz_atomic_data(self) -> AtomData: - return deepcopy(self.atomic_dataset) - - @property - def example_csvy_file_dir(self): - return self.get_absolute_path("tardis/model/tests/data/") - - @property + @functools.cached_property def simulation_verysimple(self): atomic_data = deepcopy(self.atomic_dataset) sim = Simulation.from_config( @@ -171,73 +105,13 @@ def simulation_verysimple(self): sim.iterate(4000) return sim - @property + @functools.cached_property def config_verysimple(self): return Configuration.from_yaml( f"{self.example_configuration_dir}/tardis_configv1_verysimple.yml" ) - class CustomPyTestRequest: - def __init__( - self, - tardis_regression_data_path: str, - node_name: str, - node_module_name: str, - regression_data_dir: str, - ): - self.tardis_regression_data_path = tardis_regression_data_path - self.node_name = node_name - self.node_module_name = node_module_name - self.regression_data_dir = regression_data_dir - - @property - def config(self): - class SubClass: - @staticmethod - def getoption(option): - if option == "--tardis-regression-data": - return self.tardis_regression_data_path - return None - - return SubClass() - - @property - def node(self): - class SubClass: - def __init__(self, parent): - self.parent = parent - - @property - def name(self): - return self.parent.node_name - - @property - def module(self): - class SubSubClass: - def __init__(self, parent): - self.parent = parent - - @property - def __name__(self): - return self.parent.node_module_name - - return SubSubClass(self.parent) - - return SubClass(self) - - @property - def cls(self): - return None - - @property - def relative_regression_data_dir(self): - return self.regression_data_dir - - @staticmethod - def regression_data(request: CustomPyTestRequest): - return RegressionData(request) - - @property + @functools.cached_property def packet(self): return RPacket( r=7.5e14, @@ -248,27 +122,25 @@ def packet(self): index=0, ) - @property + @functools.cached_property def verysimple_packet_collection(self): - return ( - self.nb_simulation_verysimple.transport.transport_state.packet_collection - ) + return self.nb_simulation_verysimple.transport.transport_state.packet_collection - @property + @functools.cached_property def nb_simulation_verysimple(self): atomic_data = deepcopy(self.atomic_dataset) sim = Simulation.from_config( self.config_verysimple, atom_data=atomic_data ) - sim.iterate(10) + sim.iterate(5) return sim - @property + @functools.cached_property def verysimple_time_explosion(self): model = self.nb_simulation_verysimple.simulation_state return model.time_explosion.cgs.value - @property + @functools.cached_property def verysimple_opacity_state(self): return opacity_state_initialize( self.nb_simulation_verysimple.plasma, @@ -276,33 +148,19 @@ def verysimple_opacity_state(self): disable_line_scattering=self.nb_simulation_verysimple.transport.montecarlo_configuration.DISABLE_LINE_SCATTERING, ) - @property + @functools.cached_property def verysimple_enable_full_relativity(self): return self.nb_simulation_verysimple.transport.enable_full_relativity - @property - def verysimple_disable_line_scattering(self): - return ( - self.nb_simulation_verysimple.transport.montecarlo_configuration.DISABLE_LINE_SCATTERING - ) - - @property - def verysimple_continuum_processes_enabled(self): - return montecarlo_globals.CONTINUUM_PROCESSES_ENABLED - - @property + @functools.cached_property def verysimple_tau_russian(self): - return ( - self.nb_simulation_verysimple.transport.montecarlo_configuration.VPACKET_TAU_RUSSIAN - ) + return self.nb_simulation_verysimple.transport.montecarlo_configuration.VPACKET_TAU_RUSSIAN - @property + @functools.cached_property def verysimple_survival_probability(self): - return ( - self.nb_simulation_verysimple.transport.montecarlo_configuration.SURVIVAL_PROBABILITY - ) + return self.nb_simulation_verysimple.transport.montecarlo_configuration.SURVIVAL_PROBABILITY - @property + @functools.cached_property def static_packet(self): return RPacket( r=7.5e14, @@ -313,18 +171,9 @@ def static_packet(self): index=0, ) - @property - def set_seed_fixture(self): - def set_seed(value): - np.random.seed(value) - - return njit(set_seed) - - @property + @functools.cached_property def verysimple_3vpacket_collection(self): - spectrum_frequency_grid = ( - self.nb_simulation_verysimple.transport.spectrum_frequency_grid.value - ) + spectrum_frequency_grid = self.nb_simulation_verysimple.transport.spectrum_frequency_grid.value return VPacketCollection( source_rpacket_index=0, spectrum_frequency_grid=spectrum_frequency_grid, @@ -334,54 +183,25 @@ def verysimple_3vpacket_collection(self): temporary_v_packet_bins=0, ) - @property + @functools.cached_property def verysimple_numba_radial_1d_geometry(self): return ( self.nb_simulation_verysimple.simulation_state.geometry.to_numba() ) - @property - def simulation_verysimple_vpacket_tracking(self): - atomic_data = deepcopy(self.atomic_dataset) - sim = Simulation.from_config( - self.config_verysimple, - atom_data=atomic_data, - virtual_packet_logging=True, - ) - sim.last_no_of_packets = 4000 - sim.run_final() - return sim - - @property - def generate_reference(self): - # TODO: Investigate how to get the `--generate-reference` parameter passed in the command line. - # `request.config.getoption("--generate-reference")` - option = None - if option is None: - return False - else: - return option - - @property - def verysimple_radfield_mc_estimators(self): - plasma = self.nb_simulation_verysimple.plasma - return radfield_mc_estimators.initialize_estimator_statistics( - plasma.tau_sobolevs.shape, plasma.gamma.shape - ) - - @property + @functools.cached_property def montecarlo_configuration(self): return MonteCarloConfiguration() - @property + @functools.cached_property def rpacket_tracker(self): return RPacketTracker(0) - @property + @functools.cached_property def transport_state(self): return self.nb_simulation_verysimple.transport.transport_state - @property + @functools.cached_property def simulation_rpacket_tracking_enabled(self): config_verysimple = self.config_verysimple config_verysimple.montecarlo.iterations = 3 @@ -399,7 +219,7 @@ def simulation_rpacket_tracking_enabled(self): ) return sim - @property + @functools.cached_property def geometry(self): return NumbaRadial1DGeometry( r_inner=np.array([6.912e14, 8.64e14], dtype=np.float64), @@ -408,7 +228,7 @@ def geometry(self): v_outer=np.array([-1, -1], dtype=np.float64), ) - @property + @functools.cached_property def estimators(self): return radfield_mc_estimators.RadiationFieldMCEstimators( j_estimator=np.array([0.0, 0.0], dtype=np.float64), @@ -426,7 +246,9 @@ def estimators(self): photo_ion_estimator_statistics=np.empty((0, 0), dtype=np.int64), ) - @property + @functools.cached_property def rpacket_tracker_list(self): no_of_packets = len(self.transport_state.packet_collection.initial_nus) - return generate_rpacket_last_interaction_tracker_list(no_of_packets) + return packet_trackers.generate_rpacket_last_interaction_tracker_list( + no_of_packets + ) diff --git a/benchmarks/opacities_opacity.py b/benchmarks/opacities_opacity.py index de571cc2184..5352ceccc89 100644 --- a/benchmarks/opacities_opacity.py +++ b/benchmarks/opacities_opacity.py @@ -2,8 +2,6 @@ Basic TARDIS Benchmark. """ -from asv_runner.benchmarks.mark import parameterize - import tardis.opacities.opacities as calculate_opacity from benchmarks.benchmark_base import BenchmarkBase from tardis.opacities.opacities import compton_opacity_calculation @@ -14,95 +12,25 @@ class BenchmarkMontecarloMontecarloNumbaOpacities(BenchmarkBase): Class to benchmark the numba opacities function. """ - @parameterize( - { - "Electron number density": [ - 1.0e11, - 1e15, - 1e5, - ], - "Energy": [ - 511.0, - 255.5, - 511.0e7, - ], - } - ) - def time_compton_opacity_calculation(self, electron_number_density, energy): - compton_opacity_calculation(energy, electron_number_density) + def time_compton_opacity_calculation(self): + energy = 511.0 + electron_number_density = 1e15 + calculate_opacity.compton_opacity_calculation( + energy, electron_number_density + ) - @parameterize( - { - "Parameters": [ - { - "Ejecta_density": 0.01, - "Energy": 511.0, - "Iron_group_fraction": 0.5, - }, - { - "Ejecta_density": 0.01, - "Energy": 5110000000.0, - "Iron_group_fraction": 0.0, - }, - { - "Ejecta_density": 0.01, - "Energy": 255.5, - "Iron_group_fraction": 0.0, - }, - { - "Ejecta_density": 0.01, - "Energy": 255.5, - "Iron_group_fraction": 0.5, - }, - { - "Ejecta_density": 100000.0, - "Energy": 255.5, - "Iron_group_fraction": 1.0, - } - ] - } - ) - def time_photoabsorption_opacity_calculation(self, parameters): + def time_photoabsorption_opacity_calculation(self): + energy = 255.5 + ejecta_density = 100000.0 + iron_group_fraction = 0.5 calculate_opacity.photoabsorption_opacity_calculation( - parameters["Energy"], - parameters["Ejecta_density"], - parameters["Iron_group_fraction"], + energy, ejecta_density, iron_group_fraction ) - @parameterize( - { - "Parameters": [ - { - "Ejecta_density": 0.01, - "Energy": 511.0, - "Iron_group_fraction": 0.5, - }, - { - "Ejecta_density": 0.01, - "Energy": 5110000000.0, - "Iron_group_fraction": 0.0, - }, - { - "Ejecta_density": 0.01, - "Energy": 255.5, - "Iron_group_fraction": 0.0, - }, - { - "Ejecta_density": 0.01, - "Energy": 255.5, - "Iron_group_fraction": 0.5, - }, - { - "Ejecta_density": 100000.0, - "Energy": 255.5, - "Iron_group_fraction": 1.0, - } - ] - } - ) - def time_pair_creation_opacity_calculation(self, parameters): + def time_pair_creation_opacity_calculation(self): + energy = 255.9 + ejecta_density = 100000.009 + iron_group_fraction = 0.5 calculate_opacity.pair_creation_opacity_calculation( - parameters["Energy"], - parameters["Ejecta_density"], - parameters["Iron_group_fraction"], + energy, ejecta_density, iron_group_fraction ) diff --git a/benchmarks/opacities_opacity_state.py b/benchmarks/opacities_opacity_state.py index ea05e794691..18ae4769a95 100644 --- a/benchmarks/opacities_opacity_state.py +++ b/benchmarks/opacities_opacity_state.py @@ -2,24 +2,26 @@ Basic TARDIS Benchmark. """ -import numpy as np +import functools + from asv_runner.benchmarks.mark import parameterize -from tardis.opacities.opacity_state import opacity_state_initialize from benchmarks.benchmark_base import BenchmarkBase +from tardis.opacities.opacity_state import opacity_state_initialize +@parameterize({"Input params": ["scatter", "macroatom"]}) class BenchmarkOpacitiesOpacityState(BenchmarkBase): """ Class to benchmark the numba interface function. """ + repeat = 2 + + @functools.cache + def setup(self, input_params): + self.sim = self.nb_simulation_verysimple - @parameterize({"Input params": ["scatter", "macroatom"]}) def time_opacity_state_initialize(self, input_params): line_interaction_type = input_params - plasma = self.nb_simulation_verysimple.plasma - opacity_state_initialize( - plasma, - line_interaction_type, - self.verysimple_disable_line_scattering, - ) + plasma = self.sim.plasma + opacity_state_initialize(plasma, line_interaction_type, True) diff --git a/benchmarks/run_tardis.py b/benchmarks/run_tardis.py index 9e00a6a3f9b..ab423ded7b4 100644 --- a/benchmarks/run_tardis.py +++ b/benchmarks/run_tardis.py @@ -4,6 +4,8 @@ from benchmarks.benchmark_base import BenchmarkBase from tardis import run_tardis +from tardis.io.atom_data import AtomData + class BenchmarkRunTardis(BenchmarkBase): @@ -11,16 +13,20 @@ class BenchmarkRunTardis(BenchmarkBase): Class to benchmark the `run tardis` function. """ + repeat = 2 + + def setup(self): + self.config = self.config_verysimple + self.atom_data = AtomData.from_hdf(self.atomic_data_fname) + def time_run_tardis(self): run_tardis( - self.config_verysimple, - atom_data=self.atomic_dataset, - show_convergence_plots=False, + self.config, atom_data=self.atom_data, show_convergence_plots=False ) def time_run_tardis_rpacket_tracking(self): run_tardis( self.config_rpacket_tracking, - atom_data=self.atomic_dataset, + atom_data=self.atom_data, show_convergence_plots=False, ) diff --git a/benchmarks/spectrum_formal_integral.py b/benchmarks/spectrum_formal_integral.py index c7eb25e6f5a..8c69ea71bce 100644 --- a/benchmarks/spectrum_formal_integral.py +++ b/benchmarks/spectrum_formal_integral.py @@ -2,43 +2,43 @@ Basic TARDIS Benchmark. """ -from asv_runner.benchmarks.mark import parameterize +import functools + from numba import config -import tardis.spectrum.formal_integral as formal_integral from benchmarks.benchmark_base import BenchmarkBase +from tardis.spectrum import formal_integral + +config.THREADING_LAYER = "workqueue" -config.THREADING_LAYER='workqueue' class BenchmarkTransportMontecarloFormalIntegral(BenchmarkBase): """ Class to benchmark the numba formal integral function. """ - @parameterize( - { - "Parameters": [ - { - "nu": 1e14, - "temperature": 1e4, - } - ] - } - ) - def time_intensity_black_body(self, parameters): - nu = parameters["nu"] - temperature = parameters["temperature"] + repeat = 2 + + @functools.cache + def setup(self): + self.sim = self.simulation_verysimple + self.FormalIntegrator = formal_integral.FormalIntegrator( + self.sim.simulation_state, self.sim.plasma, self.sim.transport + ) + + # Bencmark for intensity black body function + def time_intensity_black_body(self): + nu = 1e14 + temperature = 1e4 formal_integral.intensity_black_body(nu, temperature) # Benchmark for functions in FormalIntegrator class def time_FormalIntegrator_functions(self): - FormalIntegrator = formal_integral.FormalIntegrator( - self.simulation_verysimple.simulation_state, self.simulation_verysimple.plasma, self.simulation_verysimple.transport + self.FormalIntegrator.calculate_spectrum( + self.sim.spectrum_solver.spectrum_real_packets.frequency ) - FormalIntegrator.calculate_spectrum(self.simulation_verysimple.spectrum_solver.spectrum_real_packets.frequency) - FormalIntegrator.make_source_function() - FormalIntegrator.generate_numba_objects() - FormalIntegrator.formal_integral( - self.simulation_verysimple.spectrum_solver.spectrum_real_packets.frequency, - 1000 + self.FormalIntegrator.make_source_function() + self.FormalIntegrator.generate_numba_objects() + self.FormalIntegrator.formal_integral( + self.sim.spectrum_solver.spectrum_real_packets.frequency, 1000 ) diff --git a/benchmarks/transport_geometry_calculate_distances.py b/benchmarks/transport_geometry_calculate_distances.py index 4f5829f40b8..5500f60f4bb 100644 --- a/benchmarks/transport_geometry_calculate_distances.py +++ b/benchmarks/transport_geometry_calculate_distances.py @@ -1,4 +1,4 @@ -from asv_runner.benchmarks.mark import parameterize +import functools import tardis.transport.frame_transformations as frame_transformations import tardis.transport.geometry.calculate_distances as calculate_distances @@ -10,6 +10,15 @@ class BenchmarkTransportGeometryCalculateDistances(BenchmarkBase): Class to benchmark the calculate distances function. """ + @functools.cache + def setup(self): + self.StaticPacket = self.static_packet + self.Geometry = self.geometry + doppler_factor = frame_transformations.get_doppler_factor( + self.StaticPacket.r, self.StaticPacket.mu, self.model, True + ) + self.comov_nu = self.StaticPacket.nu * doppler_factor + @property def model(self): return 5.2e7 @@ -19,50 +28,16 @@ def time_calculate_distance_boundary(self): r = 7.5e14 calculate_distances.calculate_distance_boundary( - r, mu, self.geometry.r_inner[0], self.geometry.r_outer[0] - ) - - @parameterize( - { - "Parameters": [ - { - "packet": { - "nu_line": 0.1, - "is_last_line": True - }, - "enable_full_relativity": True, - }, - { - "packet": { - "nu_line": 0.2, - "is_last_line": False - }, - "enable_full_relativity": True, - } - ] - } - ) - def time_calculate_distance_line(self, parameters): - packet_params = parameters["packet"] - nu_line = packet_params["nu_line"] - is_last_line = packet_params["is_last_line"] - enable_full_relativity = parameters["enable_full_relativity"] - - time_explosion = self.model - - doppler_factor = frame_transformations.get_doppler_factor( - self.static_packet.r, - self.static_packet.mu, - time_explosion, - enable_full_relativity + r, mu, self.Geometry.r_inner[0], self.Geometry.r_outer[0] ) - comov_nu = self.static_packet.nu * doppler_factor + def time_calculate_distance_line(self): + nu_line = 0.2 calculate_distances.calculate_distance_line( - self.static_packet, - comov_nu, - is_last_line, + self.StaticPacket, + self.comov_nu, + True, nu_line, - time_explosion, - enable_full_relativity + True, + True, ) diff --git a/benchmarks/transport_montecarlo_estimators_radfield_estimator_calcs.py b/benchmarks/transport_montecarlo_estimators_radfield_estimator_calcs.py index 45a3b3b8409..8d71a27f492 100644 --- a/benchmarks/transport_montecarlo_estimators_radfield_estimator_calcs.py +++ b/benchmarks/transport_montecarlo_estimators_radfield_estimator_calcs.py @@ -2,15 +2,12 @@ Basic TARDIS Benchmark. """ -import tardis.opacities.opacities as opacities -import tardis.transport.geometry.calculate_distances as calculate_distances -import tardis.transport.montecarlo.r_packet_transport as r_packet_transport -import tardis.transport.montecarlo.utils as utils +import functools + from benchmarks.benchmark_base import BenchmarkBase from tardis.transport.montecarlo.estimators.radfield_estimator_calcs import ( update_line_estimators, ) -from asv_runner.benchmarks.mark import parameterize class BenchmarkMontecarloMontecarloNumbaPacket(BenchmarkBase): @@ -18,40 +15,14 @@ class BenchmarkMontecarloMontecarloNumbaPacket(BenchmarkBase): Class to benchmark the numba packet function. """ - @parameterize( - { - "Parameters": [ - { - "cur_line_id": 0, - "distance_trace": 1e12, - "time_explosion": 5.2e7, - "enable_full_relativity": True, - }, - { - "cur_line_id": 0, - "distance_trace": 0, - "time_explosion": 5.2e7, - "enable_full_relativity": True, - }, - { - "cur_line_id": 1, - "distance_trace": 1e5, - "time_explosion": 1e10, - "enable_full_relativity": False, - }, - ] - } - ) - def time_update_line_estimators(self, parameters): - cur_line_id = parameters["cur_line_id"] - distance_trace = parameters["distance_trace"] - time_explosion = parameters["time_explosion"] - enable_full_relativity = parameters["enable_full_relativity"] + repeat = 4 + + @functools.cache + def setup(self): + self.Estimators = self.estimators + self.StaticPacket = self.static_packet + + def time_update_line_estimators(self): update_line_estimators( - self.estimators, - self.static_packet, - cur_line_id, - distance_trace, - time_explosion, - enable_full_relativity, + self.Estimators, self.StaticPacket, 1, 1e12, 1e10, True ) diff --git a/benchmarks/transport_montecarlo_interaction.py b/benchmarks/transport_montecarlo_interaction.py index e89c486aac2..dcadc56a2da 100644 --- a/benchmarks/transport_montecarlo_interaction.py +++ b/benchmarks/transport_montecarlo_interaction.py @@ -2,12 +2,10 @@ Basic TARDIS Benchmark. """ +import functools + import tardis.transport.montecarlo.interaction as interaction from benchmarks.benchmark_base import BenchmarkBase -from tardis.transport.montecarlo.numba_interface import ( - LineInteractionType, -) -from asv_runner.benchmarks.mark import parameterize class BenchmarkTransportMontecarloInteraction(BenchmarkBase): @@ -15,68 +13,44 @@ class BenchmarkTransportMontecarloInteraction(BenchmarkBase): Class to benchmark the numba interaction function. """ - def time_thomson_scatter(self): - packet = self.packet - time_explosion = self.verysimple_time_explosion - enable_full_relativity = self.verysimple_enable_full_relativity + repeat = 3 + + @functools.cache + def setup(self): + self.Packet = self.packet + self.time_explosion = self.verysimple_time_explosion + self.enable_full_relativity = self.verysimple_enable_full_relativity + self.opacity_state = self.verysimple_opacity_state + def time_thomson_scatter(self): interaction.thomson_scatter( - packet, time_explosion, enable_full_relativity + self.Packet, self.time_explosion, self.enable_full_relativity ) - @parameterize( - { - "Line interaction type": [ - LineInteractionType.SCATTER, - LineInteractionType.MACROATOM, - ], - } - ) - def time_line_scatter(self, line_interaction_type): - packet = self.packet - packet.initialize_line_id( - self.verysimple_opacity_state, - self.verysimple_time_explosion, - self.verysimple_enable_full_relativity, + def time_line_scatter(self): + self.Packet.initialize_line_id( + self.opacity_state, self.time_explosion, self.enable_full_relativity ) - time_explosion = self.verysimple_time_explosion - interaction.line_scatter( - packet, - time_explosion, - line_interaction_type, - self.verysimple_opacity_state, - self.verysimple_enable_full_relativity, + self.Packet, + self.time_explosion, + "SCATTER", + self.opacity_state, + self.enable_full_relativity, ) - @parameterize( - { - "Test packet": [ - { - "mu": 0.8599443103322428, - "emission_line_id": 1000, - "energy": 0.9114437898710559, - } - ] - } - ) - def time_line_emission(self, test_packet): - emission_line_id = test_packet["emission_line_id"] - packet = self.packet - packet.mu = test_packet["mu"] - packet.energy = test_packet["energy"] - packet.initialize_line_id( - self.verysimple_opacity_state, - self.verysimple_time_explosion, - self.verysimple_enable_full_relativity, + def time_line_emission(self): + emission_line_id = 1000 + self.Packet.mu = 0.8599443103322428 + self.Packet.energy = 0.9114437898710559 + self.Packet.initialize_line_id( + self.opacity_state, self.time_explosion, self.enable_full_relativity ) - time_explosion = self.verysimple_time_explosion - interaction.line_emission( - packet, + self.Packet, emission_line_id, - time_explosion, - self.verysimple_opacity_state, - self.verysimple_enable_full_relativity, + self.time_explosion, + self.opacity_state, + self.enable_full_relativity, ) diff --git a/benchmarks/transport_montecarlo_main_loop.py b/benchmarks/transport_montecarlo_main_loop.py index 7d6d07ddb08..cc91fd430d3 100644 --- a/benchmarks/transport_montecarlo_main_loop.py +++ b/benchmarks/transport_montecarlo_main_loop.py @@ -2,6 +2,8 @@ Basic TARDIS Benchmark. """ +import functools + from benchmarks.benchmark_base import BenchmarkBase from tardis.transport.montecarlo.montecarlo_main_loop import ( montecarlo_main_loop, @@ -13,14 +15,26 @@ class BenchmarkTransportMontecarloMontecarloMainLoop(BenchmarkBase): class to benchmark montecarlo_main_loop function. """ + repeat = 3 + + @functools.cache + def setup(self): + self.packet_collection = self.transport_state.packet_collection + self.geometry_state = self.transport_state.geometry_state + self.time_explosion = self.verysimple_time_explosion + self.opacity_state = self.transport_state.opacity_state + self.radfield_mc_estimators = ( + self.transport_state.radfield_mc_estimators + ) + def time_montecarlo_main_loop(self): montecarlo_main_loop( - self.transport_state.packet_collection, - self.transport_state.geometry_state, - self.verysimple_time_explosion, - self.transport_state.opacity_state, + self.packet_collection, + self.geometry_state, + self.time_explosion, + self.opacity_state, self.montecarlo_configuration, - self.transport_state.radfield_mc_estimators, + self.radfield_mc_estimators, self.nb_simulation_verysimple.transport.spectrum_frequency_grid.value, self.rpacket_tracker_list, self.montecarlo_configuration.NUMBER_OF_VPACKETS, diff --git a/benchmarks/transport_montecarlo_packet_trackers.py b/benchmarks/transport_montecarlo_packet_trackers.py index a3f65f66f6d..e4207d23892 100644 --- a/benchmarks/transport_montecarlo_packet_trackers.py +++ b/benchmarks/transport_montecarlo_packet_trackers.py @@ -1,36 +1,38 @@ """ Basic TARDIS Benchmark. """ +import functools + +from asv_runner.benchmarks.mark import parameterize + from benchmarks.benchmark_base import BenchmarkBase -from tardis.transport.montecarlo.packet_trackers import ( - rpacket_trackers_to_dataframe, - generate_rpacket_tracker_list, - generate_rpacket_last_interaction_tracker_list, -) +from tardis.transport.montecarlo import packet_trackers +@parameterize({"num_packets": [10, 100], "length": [10, 50]}) class BenchmarkTransportMontecarloPacketTrackers(BenchmarkBase): """ Class to benchmark the numba R packet function. """ - def time_rpacket_trackers_to_dataframe(self): + repeat = 2 + + @functools.cache + def setup(self, num_packets, length): sim = self.simulation_rpacket_tracking_enabled - transport_state = sim.transport.transport_state - rpacket_trackers_to_dataframe(transport_state.rpacket_tracker) + self.TransportState = sim.transport.transport_state - def time_generate_rpacket_tracker_list(self, no_of_packets, length): - generate_rpacket_tracker_list(no_of_packets, length) + def time_rpacket_trackers_to_dataframe(self, num_packets, length): + packet_trackers.rpacket_trackers_to_dataframe( + self.TransportState.rpacket_tracker + ) + + def time_generate_rpacket_tracker_list(self, num_packets, length): + packet_trackers.generate_rpacket_tracker_list(num_packets, length) def time_generate_rpacket_last_interaction_tracker_list( - self, no_of_packets + self, num_packets, length ): - generate_rpacket_last_interaction_tracker_list(no_of_packets) - - time_generate_rpacket_tracker_list.params = ([1, 10, 50], [1, 10, 50]) - time_generate_rpacket_tracker_list.param_names = ["no_of_packets", "length"] - - time_generate_rpacket_last_interaction_tracker_list.params = [10, 100, 1000] - time_generate_rpacket_last_interaction_tracker_list.param_names = [ - "no_of_packets" - ] + packet_trackers.generate_rpacket_last_interaction_tracker_list( + num_packets + ) diff --git a/benchmarks/transport_montecarlo_single_packet_loop.py b/benchmarks/transport_montecarlo_single_packet_loop.py index 85bc6bbf64f..4a7138d5fb5 100644 --- a/benchmarks/transport_montecarlo_single_packet_loop.py +++ b/benchmarks/transport_montecarlo_single_packet_loop.py @@ -2,9 +2,10 @@ Basic TARDIS Benchmark. """ +from numba.np.ufunc.parallel import get_num_threads, get_thread_id + from benchmarks.benchmark_base import BenchmarkBase from tardis.transport.montecarlo import single_packet_loop -from numba.np.ufunc.parallel import get_num_threads, get_thread_id class BenchmarkTransportMontecarloSinglePacketLoop(BenchmarkBase): @@ -12,14 +13,18 @@ class BenchmarkTransportMontecarloSinglePacketLoop(BenchmarkBase): Class to benchmark the single packet loop function. """ + repeat = 2 + def time_single_packet_loop(self): single_packet_loop.single_packet_loop( self.packet, self.verysimple_numba_radial_1d_geometry, self.verysimple_time_explosion, self.verysimple_opacity_state, - self.transport_state.radfield_mc_estimators.create_estimator_list(get_num_threads())[get_thread_id()], + self.transport_state.radfield_mc_estimators.create_estimator_list( + get_num_threads() + )[get_thread_id()], self.verysimple_3vpacket_collection, self.rpacket_tracker, - self.montecarlo_configuration + self.montecarlo_configuration, ) diff --git a/benchmarks/transport_montecarlo_vpacket.py b/benchmarks/transport_montecarlo_vpacket.py index 4de7d198c68..b237577074d 100644 --- a/benchmarks/transport_montecarlo_vpacket.py +++ b/benchmarks/transport_montecarlo_vpacket.py @@ -2,15 +2,14 @@ Basic TARDIS Benchmark. """ +import functools + import numpy as np -from asv_runner.benchmarks.mark import parameterize import tardis.transport.montecarlo.vpacket as vpacket -from tardis.transport.montecarlo.r_packet import RPacket from benchmarks.benchmark_base import BenchmarkBase -from tardis.transport.frame_transformations import ( - get_doppler_factor, -) +from tardis.transport.frame_transformations import get_doppler_factor +from tardis.transport.montecarlo.r_packet import RPacket class BenchmarkMontecarloMontecarloNumbaVpacket(BenchmarkBase): @@ -18,7 +17,18 @@ class BenchmarkMontecarloMontecarloNumbaVpacket(BenchmarkBase): Class to benchmark the single packet loop function. """ - @property + repeat = 5 + + def setup(self): + self.vpacket = self.v_packet + self.numba_radial_1d_geometry = self.verysimple_numba_radial_1d_geometry + self.time_explosion = self.verysimple_time_explosion + self.opacity_state = self.verysimple_opacity_state + self.tau_russian = self.verysimple_tau_russian + self.survival_probability = self.verysimple_survival_probability + self.enable_full_relativity = self.verysimple_enable_full_relativity + + @functools.cached_property def v_packet(self): return vpacket.VPacket( r=7.5e14, @@ -30,7 +40,7 @@ def v_packet(self): index=0, ) - @property + @functools.cached_property def r_packet(self): return RPacket( r=7.5e14, @@ -41,6 +51,7 @@ def r_packet(self): index=0, ) + @functools.cache def v_packet_initialize_line_id( self, v_packet, opacity_state, time_explosion, enable_full_relativity ): @@ -55,63 +66,45 @@ def v_packet_initialize_line_id( v_packet.next_line_id = next_line_id def time_trace_vpacket_within_shell(self): - v_packet = self.v_packet - verysimple_numba_radial_1d_geometry = ( - self.verysimple_numba_radial_1d_geometry - ) - verysimple_time_explosion = self.verysimple_time_explosion - verysimple_opacity_state = self.verysimple_opacity_state - enable_full_relativity = self.verysimple_enable_full_relativity - # Give the vpacket a reasonable line ID self.v_packet_initialize_line_id( - v_packet, - verysimple_opacity_state, - verysimple_time_explosion, - enable_full_relativity, + self.vpacket, + self.opacity_state, + self.time_explosion, + self.enable_full_relativity, ) vpacket.trace_vpacket_within_shell( - v_packet, - verysimple_numba_radial_1d_geometry, - verysimple_time_explosion, - verysimple_opacity_state, - enable_full_relativity, + self.vpacket, + self.numba_radial_1d_geometry, + self.time_explosion, + self.opacity_state, + self.enable_full_relativity, ) def time_trace_vpacket(self): - v_packet = self.v_packet - verysimple_numba_radial_1d_geometry = ( - self.verysimple_numba_radial_1d_geometry - ) - verysimple_time_explosion = self.verysimple_time_explosion - verysimple_opacity_state = self.verysimple_opacity_state - enable_full_relativity = self.verysimple_enable_full_relativity - tau_russian = self.verysimple_tau_russian - survival_probability = self.verysimple_survival_probability - # Set seed because of RNG in trace_vpacket np.random.seed(1) # Give the vpacket a reasonable line ID self.v_packet_initialize_line_id( - v_packet, - verysimple_opacity_state, - verysimple_time_explosion, - enable_full_relativity, + self.vpacket, + self.opacity_state, + self.time_explosion, + self.enable_full_relativity, ) vpacket.trace_vpacket( - v_packet, - verysimple_numba_radial_1d_geometry, - verysimple_time_explosion, - verysimple_opacity_state, - tau_russian, - survival_probability, - enable_full_relativity, + self.vpacket, + self.numba_radial_1d_geometry, + self.time_explosion, + self.opacity_state, + self.tau_russian, + self.survival_probability, + self.enable_full_relativity, ) - @property + @functools.cached_property def broken_packet(self): return vpacket.VPacket( r=1286064000000000.0, @@ -125,41 +118,25 @@ def broken_packet(self): def time_trace_bad_vpacket(self): broken_packet = self.broken_packet - verysimple_numba_radial_1d_geometry = ( - self.verysimple_numba_radial_1d_geometry - ) - enable_full_relativity = self.verysimple_enable_full_relativity - verysimple_time_explosion = self.verysimple_time_explosion - verysimple_opacity_state = self.verysimple_opacity_state - tau_russian = self.verysimple_tau_russian - survival_probability = self.verysimple_survival_probability vpacket.trace_vpacket( broken_packet, - verysimple_numba_radial_1d_geometry, - verysimple_time_explosion, - verysimple_opacity_state, - tau_russian, - survival_probability, - enable_full_relativity, + self.numba_radial_1d_geometry, + self.time_explosion, + self.opacity_state, + self.tau_russian, + self.survival_probability, + self.enable_full_relativity, ) - @parameterize( - { - "Paramters": [ - {"tau_russian": 10.0, "survival_possibility": 0.0}, - {"tau_russian": 15.0, "survival_possibility": 0.1}, - ] - } - ) - def time_trace_vpacket_volley(self, parameters): + def time_trace_vpacket_volley(self): vpacket.trace_vpacket_volley( self.r_packet, self.verysimple_3vpacket_collection, - self.verysimple_numba_radial_1d_geometry, - self.verysimple_time_explosion, - self.verysimple_opacity_state, - False, - parameters["tau_russian"], - parameters["survival_possibility"] + self.numba_radial_1d_geometry, + self.time_explosion, + self.opacity_state, + self.enable_full_relativity, + self.tau_russian, + self.survival_probability, ) diff --git a/benchmarks/util/__init__.py b/benchmarks/util/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/benchmarks/util/base.py b/benchmarks/util/base.py deleted file mode 100644 index 7dd61629e3e..00000000000 --- a/benchmarks/util/base.py +++ /dev/null @@ -1,20 +0,0 @@ -from os.path import dirname, realpath, join -from pathlib import Path, PosixPath - - -class Base: - @staticmethod - def get_path(partial_path: str) -> Path: - base_path = dirname(realpath(__file__)) - path = Path(base_path) / Path(partial_path) - return path - - @property - def tardis_ref_path(self) -> Path: - # TODO: This route is fixed but needs to get from the arguments given in the command line. - # /app/tardis-refdata - return Path("/app/tardis-refdata") - - @property - def example_configuration_dir(self) -> Path: - return self.get_path("../../tardis/io/configuration/tests/data") diff --git a/benchmarks/util/nlte.py b/benchmarks/util/nlte.py deleted file mode 100644 index 7cfed4ef4dd..00000000000 --- a/benchmarks/util/nlte.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections import OrderedDict -from copy import deepcopy -from pathlib import Path - -from benchmarks.util.base import Base -from tardis.io.atom_data import AtomData -from tardis.io.configuration.config_reader import Configuration -from tardis.io.util import yaml_load_file, YAMLLoader -from tardis.model import SimulationState - - -class NLTE: - def __init__(self): - self.__base = Base() - - @property - def tardis_config_verysimple_nlte(self) -> OrderedDict: - path: str = ( - "../../tardis/io/configuration/tests/data/tardis_configv1_nlte.yml" - ) - filename: Path = self.__base.get_path(path) - - return yaml_load_file( - filename, - YAMLLoader, - ) - - @property - def nlte_raw_model_root(self) -> SimulationState: - return SimulationState.from_config( - self.tardis_model_config_nlte_root, self.nlte_atom_data - ) - - @property - def nlte_raw_model_lu(self) -> SimulationState: - return SimulationState.from_config( - self.tardis_model_config_nlte_lu, self.nlte_atom_data - ) - - @property - def nlte_atom_data(self) -> AtomData: - atomic_data = deepcopy(self.nlte_atomic_dataset) - return atomic_data - - @property - def nlte_atomic_dataset(self) -> AtomData: - nlte_atomic_data = AtomData.from_hdf(self.nlte_atomic_data_fname) - return nlte_atomic_data - - @property - def nlte_atomic_data_fname(self) -> str: - atomic_data_fname = ( - f"{self.__base.tardis_ref_path}/nlte_atom_data/TestNLTE_He_Ti.h5" - ) - - if not Path(atomic_data_fname).exists(): - atom_data_missing_str = ( - f"Atomic datafiles {atomic_data_fname} does not seem to exist" - ) - raise Exception(atom_data_missing_str) - - return atomic_data_fname - - @property - def tardis_model_config_nlte_root(self) -> Configuration: - config = Configuration.from_yaml( - f"{self.__base.example_configuration_dir}/tardis_configv1_nlte.yml" - ) - config.plasma.nlte_solver = "root" - return config - - @property - def tardis_model_config_nlte_lu(self) -> Configuration: - config = Configuration.from_yaml( - f"{self.__base.example_configuration_dir}/tardis_configv1_nlte.yml" - ) - config.plasma.nlte_solver = "lu" - return config From 1c55cfc6b450cd7cd7ad479ffa43640f6790318d Mon Sep 17 00:00:00 2001 From: tardis-bot <60989672+tardis-bot@users.noreply.github.com> Date: Sun, 4 Aug 2024 06:19:41 +0530 Subject: [PATCH 08/10] Pre-release 2024.08.04 (#2775) Automated changes for pre-release 2024.08.04 --- .zenodo.json | 54 ++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 3090e7f3aa4..544f071000e 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -154,10 +154,10 @@ "name": "Holas, Alexander" }, { - "name": "Reinecke, Martin" + "name": "Eweis, Youssef" }, { - "name": "Eweis, Youssef" + "name": "Reinecke, Martin" }, { "name": "Bylund, Tomas" @@ -165,6 +165,9 @@ { "name": "Black, William" }, + { + "name": "Gupta, Sumit" + }, { "name": "Bentil, Laud" }, @@ -176,31 +179,31 @@ "name": "Kumar, Ansh" }, { - "name": "Gupta, Sumit" + "name": "Alam, Arib" }, { - "name": "Alam, Arib" + "name": "Kumar, Asish" }, { "name": "Bartnik, Matthew" }, { - "name": "Varma Buddaraju, Rohith" + "name": "Magee, Mark" }, { - "name": "Magee, Mark" + "name": "Dutta, Anirban" }, { - "name": "Lu, Jing" + "name": "Varma Buddaraju, Rohith" }, { - "name": "Visser, Erin" + "name": "Livneh, Ran" }, { - "name": "Dutta, Anirban" + "name": "Lu, Jing" }, { - "name": "Kumar, Asish" + "name": "Visser, Erin" }, { "name": "Daksh, Ayushi" @@ -208,9 +211,6 @@ { "name": "Kambham, Satwik" }, - { - "name": "Livneh, Ran" - }, { "name": "Bhakar, Jayant" }, @@ -228,49 +228,49 @@ "name": "Srivastava, Sarthak" }, { - "name": "Actions, GitHub" + "name": "Reichenbach, John" }, { "name": "Jain, Rinkle" }, { - "name": "Reichenbach, John" + "name": "Floers, Andreas" }, { - "name": "Floers, Andreas" + "name": "Actions, GitHub" }, { - "name": "Gupta, Harshul" + "name": "Chaumal, Aarya" }, { - "name": "Brar, Antreev" + "name": "Gupta, Harshul" }, { - "name": "Chaumal, Aarya" + "name": "Brar, Antreev" }, { "name": "Singh, Sourav" }, { - "name": "Selsing, Jonatan" + "name": "Kumar, Aman" }, { - "name": "Matsumura, Yuki" + "name": "Sofiatti, Caroline" }, { "name": "Kowalski, Nathan" }, { - "name": "Sofiatti, Caroline" + "name": "Selsing, Jonatan" }, { - "name": "Patidar, Abhishek" + "name": "Talegaonkar, Chinmay" }, { - "name": "Kumar, Aman" + "name": "Matsumura, Yuki" }, { - "name": "Talegaonkar, Chinmay" + "name": "Patidar, Abhishek" }, { "name": "Venkat, Shashank" @@ -339,10 +339,10 @@ "name": "PATIDAR, ABHISHEK" }, { - "name": "Kharkar, Atharwa" + "name": "Nayak U, Ashwin" }, { - "name": "Nayak U, Ashwin" + "name": "Kharkar, Atharwa" }, { "name": "Kumar, Atul" From e1aa88723a6836e8a25cc1afb24b578b1b78651f Mon Sep 17 00:00:00 2001 From: tardis-bot <60989672+tardis-bot@users.noreply.github.com> Date: Sun, 4 Aug 2024 06:45:27 +0530 Subject: [PATCH 09/10] Post-release 2024.08.04 (#2776) Automated changes for post-release 2024.08.04 --- CHANGELOG.md | 419 +++++++++++++++++++++++++++++++++++++ CITATION.cff | 164 ++++++++------- README.rst | 85 ++++---- docs/resources/credits.rst | 84 ++++---- 4 files changed, 600 insertions(+), 152 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f11fddddbd..aa853d91569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ ## Changelog +### release-2024.08.04 (2024/08/03 20:49) +- [2775](https://github.com/tardis-sn/tardis/pull/2775) Pre-release 2024.08.04 (2775) (@tardis-bot) +- [2749](https://github.com/tardis-sn/tardis/pull/2749) Cache benchmark functions (2749) (@officialasishkumar) +- [2762](https://github.com/tardis-sn/tardis/pull/2762) Fix ruff comments issue (2762) (@atharva-2001) +- [2767](https://github.com/tardis-sn/tardis/pull/2767) Release Pipeline Fixes (2767) (@atharva-2001) +- [2758](https://github.com/tardis-sn/tardis/pull/2758) Opacity state slice (2758) (@Rodot-) +- [2771](https://github.com/tardis-sn/tardis/pull/2771) Add Extend Array Function (2771) (@Sumit112192) +- [2761](https://github.com/tardis-sn/tardis/pull/2761) Donot run docs, benchmarks and stardis tests on draft PRs. (2761) (@KasukabeDefenceForce) +- [2720](https://github.com/tardis-sn/tardis/pull/2720) Benchmark run_tardis with track_rpacket enabled (2720) (@Sumit112192) +- [2675](https://github.com/tardis-sn/tardis/pull/2675) [Restructure/plasma] estimator cleanup (2675) (@wkerzendorf) +- [2670](https://github.com/tardis-sn/tardis/pull/2670) Changed file path (2670) (@Knights-Templars) +- [2763](https://github.com/tardis-sn/tardis/pull/2763) Add benchmark documentation (2763) (@officialasishkumar) +- [2719](https://github.com/tardis-sn/tardis/pull/2719) Restructure Trackers (2719) (@Sumit112192) +- [2745](https://github.com/tardis-sn/tardis/pull/2745) Address pytest warnings (2745) (@atharva-2001) +- [2753](https://github.com/tardis-sn/tardis/pull/2753) Run stardis tests on Tardis PRs (2753) (@KasukabeDefenceForce) +- [2754](https://github.com/tardis-sn/tardis/pull/2754) Ruff Workflow Fix (2754) (@atharva-2001) +- [2751](https://github.com/tardis-sn/tardis/pull/2751) Post-release 2024.07.28 (2751) (@tardis-bot) ### release-2024.07.28 (2024/07/27 20:43) - [2750](https://github.com/tardis-sn/tardis/pull/2750) Pre-release 2024.07.28 (2750) (@tardis-bot) - [2718](https://github.com/tardis-sn/tardis/pull/2718) Weighted Packet Sampler (2718) (@Rodot-) @@ -734,6 +751,7 @@ - [1492](https://github.com/tardis-sn/tardis/pull/1492) Fix docstring mistakes in #1145 (1492) (@chvogl) - [1505](https://github.com/tardis-sn/tardis/pull/1505) Fixing Visualization Notebook Hyperlink (1505) (@KevinCawley) - [1481](https://github.com/tardis-sn/tardis/pull/1481) Added Documentation for Parallel execution with Numba and OpenMP (1481) (@aribalam) +- [1145](https://github.com/tardis-sn/tardis/pull/1145) Add photoionization-related rates (1145) (@chvogl) - [1470](https://github.com/tardis-sn/tardis/pull/1470) Incorporating old physics section of the documentation (1470) (@isaacgsmith) - [1459](https://github.com/tardis-sn/tardis/pull/1459) Removed the deprecated --with-vpacket-logging flag (1459) (@antreev-brar) - [1462](https://github.com/tardis-sn/tardis/pull/1462) Renamed widgets subpackage to visualization and restructured modules within it (1462) (@jaladh-singhal) @@ -749,46 +767,447 @@ - [1441](https://github.com/tardis-sn/tardis/pull/1441) Rename SEDec to SDEC in Spectral element DEComposition plot (1441) (@jaladh-singhal) - [1430](https://github.com/tardis-sn/tardis/pull/1430) compare refdata with arbitrary labels (1430) (@epassaro) - [1431](https://github.com/tardis-sn/tardis/pull/1431) Documentation guidelines hotfix (1431) (@KevinCawley) +- [1424](https://github.com/tardis-sn/tardis/pull/1424) Rename Kromer Plot to Spectral Element Decomposition (SEDec) Plot (1424) (@jaladh-singhal) +- [1409](https://github.com/tardis-sn/tardis/pull/1409) add docstr-coverage workflow (1409) (@epassaro) +- [1405](https://github.com/tardis-sn/tardis/pull/1405) Restructured development workflow and added code quality & documentation guidelines in it (1405) (@andrewfullard) +- [1421](https://github.com/tardis-sn/tardis/pull/1421) Old physics reorganization (1421) (@andrewfullard) +- [1423](https://github.com/tardis-sn/tardis/pull/1423) fixes for ci docs (1423) (@andrewfullard) +- [1420](https://github.com/tardis-sn/tardis/pull/1420) Conversion of enlisted variable to int64 datatype (1420) (@andrewfullard) +- [1403](https://github.com/tardis-sn/tardis/pull/1403) Fixing Hyperlinks in Documentation (1403) (@andrewfullard) +- [1410](https://github.com/tardis-sn/tardis/pull/1410) Post reference data results (1410) (@andrewfullard) +- [1415](https://github.com/tardis-sn/tardis/pull/1415) Add .log to gitignore, disabled montecarlo log (1415) (@andrewfullard) ### v3.0.dev3808 (2021/01/21 11:22) +- [1414](https://github.com/tardis-sn/tardis/pull/1414) blackify tests (1414) (@andrewfullard) +- [1413](https://github.com/tardis-sn/tardis/pull/1413) Corrected the Hyperlink reference (1413) (@andrewfullard) +- [1398](https://github.com/tardis-sn/tardis/pull/1398) add black check workflow (1398) (@andrewfullard) ### v3.0.dev3801 (2021/01/08 16:28) +- [1399](https://github.com/tardis-sn/tardis/pull/1399) fix tests with --generate-reference flag (1399) (@andrewfullard) +- [1393](https://github.com/tardis-sn/tardis/pull/1393) Update environment file (1393) (@epassaro) +- [1404](https://github.com/tardis-sn/tardis/pull/1404) added functionality for automatic date updation in docs (1404) (@andrewfullard) ### v3.0.dev3796 (2020/12/28 12:12) +- [1402](https://github.com/tardis-sn/tardis/pull/1402) explicitly add parso to dependencies (1402) (@andrewfullard) ### v3.0.dev3794 (2020/12/21 10:22) +- [1241](https://github.com/tardis-sn/tardis/pull/1241) Add modified Kromer plot to work with widgets (1241) (@marxwillia) ### v3.0.dev3769 (2020/12/18 16:07) +- [1395](https://github.com/tardis-sn/tardis/pull/1395) Update Matterbridge docs (1395) (@epassaro) +- [1369](https://github.com/tardis-sn/tardis/pull/1369) Fix incorrect docstrings (1369) (@KevinCawley) +- [1383](https://github.com/tardis-sn/tardis/pull/1383) add preview docs section (1383) (@epassaro) +- [1392](https://github.com/tardis-sn/tardis/pull/1392) Fix documentation build (1392) (@epassaro) +- [1394](https://github.com/tardis-sn/tardis/pull/1394) Revert "Fixing docs building problem" (1394) (@andrewfullard) +- [1387](https://github.com/tardis-sn/tardis/pull/1387) Fixing docs building problem (1387) (@isaacgsmith) +- [1380](https://github.com/tardis-sn/tardis/pull/1380) Packet logging fixes for visualization (1380) (@andrewfullard) +- [1384](https://github.com/tardis-sn/tardis/pull/1384) Small fixes for existing workflows (1384) (@epassaro) ### v3.0.dev3756 (2020/12/11 14:43) +- [1382](https://github.com/tardis-sn/tardis/pull/1382) Fixing Quickstart Problem (1382) (@andrewfullard) +- [1379](https://github.com/tardis-sn/tardis/pull/1379) Reorganizing files in docs (2/2) (1379) (@andrewfullard) +- [1378](https://github.com/tardis-sn/tardis/pull/1378) Adding Plasma File in TOC (1378) (@andrewfullard) +- [1371](https://github.com/tardis-sn/tardis/pull/1371) Reorganizing files in docs (1/2) (1371) (@andrewfullard) +- [1372](https://github.com/tardis-sn/tardis/pull/1372) Update CI doc section (1372) (@epassaro) +- [1375](https://github.com/tardis-sn/tardis/pull/1375) Fixed real packet logging of properties (1375) (@andrewfullard) +- [1354](https://github.com/tardis-sn/tardis/pull/1354) Virtual packet logging fix (1354) (@andrewfullard) +- [1368](https://github.com/tardis-sn/tardis/pull/1368) Fix of Issue #1176 (1368) (@andrewfullard) +- [1365](https://github.com/tardis-sn/tardis/pull/1365) Parallel numba setup (1365) (@andrewfullard) +- [1331](https://github.com/tardis-sn/tardis/pull/1331) Update changelog workflow (1331) (@andrewfullard) ### v3.0.dev3698 (2020/12/04 14:50) +- [1366](https://github.com/tardis-sn/tardis/pull/1366) Fix duplicate appending of scalars in HDF writer and add an overwrite option (1366) (@andrewfullard) +- [1364](https://github.com/tardis-sn/tardis/pull/1364) Fixing issue #1357 (1364) (@andrewfullard) +- [1359](https://github.com/tardis-sn/tardis/pull/1359) Fix of Issue #680 (1359) (@KevinCawley) +- [1361](https://github.com/tardis-sn/tardis/pull/1361) Fixing issue #1177 (1361) (@isaacgsmith) ### v3.0.dev3680 (2020/11/25 13:38) +- [1358](https://github.com/tardis-sn/tardis/pull/1358) Fix C formal integral (1358) (@andrewfullard) +- [1352](https://github.com/tardis-sn/tardis/pull/1352) Add Arjun's emails to .mailmap (1352) (@andrewfullard) +- [929](https://github.com/tardis-sn/tardis/pull/929) Numba montecarlo (929) (@wkerzendorf) ### v3.0.dev3673 (2020/11/18 11:26) +- [1353](https://github.com/tardis-sn/tardis/pull/1353) fix doc workflow (1353) (@wkerzendorf) +- [1349](https://github.com/tardis-sn/tardis/pull/1349) Adding documentation for research articles that used TARDIS (1349) (@andrewfullard) ### v3.0.dev3541 (2020/11/10 13:45) +- [1340](https://github.com/tardis-sn/tardis/pull/1340) Moved staticmethods of line_info module to a dedicated plot_util module (1340) (@marxwillia) ### v3.0.dev3539 (2020/11/04 11:50) +- [1333](https://github.com/tardis-sn/tardis/pull/1333) Rename testing pipeline (1333) (@epassaro) +- [1300](https://github.com/tardis-sn/tardis/pull/1300) Remove pip install option from TARDIS installation docs (1300) (@jaladh-singhal) +- [1330](https://github.com/tardis-sn/tardis/pull/1330) Small fix for release pipeline (1330) (@epassaro) +- [1332](https://github.com/tardis-sn/tardis/pull/1332) Remove helper scripts (1332) (@epassaro) +- [1335](https://github.com/tardis-sn/tardis/pull/1335) Updated gitignore to ignore auto-generated files (1335) (@jaladh-singhal) +- [1326](https://github.com/tardis-sn/tardis/pull/1326) Add workflow for autodeploying documentation to github pages via an action (1326) (@morganlee123) +- [1283](https://github.com/tardis-sn/tardis/pull/1283) Changed latex strings to raw strings (1283) (@Ak0303) +- [1310](https://github.com/tardis-sn/tardis/pull/1310) Apply new template to refdata pipeline (1310) (@epassaro) +- [1308](https://github.com/tardis-sn/tardis/pull/1308) Apply new template to release pipeline (1308) (@epassaro) ### v3.0.dev3527 (2020/10/05 12:43) +- [1313](https://github.com/tardis-sn/tardis/pull/1313) Add Sponsor button to TARDIS (1313) (@jaladh-singhal) ### v3.0.dev3526 (2020/10/01 05:50) +- [1312](https://github.com/tardis-sn/tardis/pull/1312) Add Matterbridge documentation (1312) (@epassaro) +- [1274](https://github.com/tardis-sn/tardis/pull/1274) Add space to plasma error message (1274) (@marxwillia) +- [1280](https://github.com/tardis-sn/tardis/pull/1280) Add widgets documentation to tardis docs (1280) (@marxwillia) ### v3.0.dev3510 (2020/09/25 11:56) +- [1299](https://github.com/tardis-sn/tardis/pull/1299) Model configuration output in HDF (1299) (@andrewfullard) +- [1304](https://github.com/tardis-sn/tardis/pull/1304) Use tardis-refdata from Azure mirror (CI/CD) (1304) (@epassaro) +- [1264](https://github.com/tardis-sn/tardis/pull/1264) Add line info widget to widgets subpackage (1264) (@jaladh-singhal) ### v3.0.dev3504 (2020/09/09 06:16) +- [1296](https://github.com/tardis-sn/tardis/pull/1296) Pin pyne to 0.7.0 (1296) (@andrewfullard) +- [1319](https://github.com/tardis-sn/tardis/pull/1319) Numba montecarlo tests merged (1319) (@chvogl) +- [1318](https://github.com/tardis-sn/tardis/pull/1318) Numba montecarlo profile1 (1318) (@Rodot-) +- [1317](https://github.com/tardis-sn/tardis/pull/1317) Fixed `calculate_distance_line` showing nu_diff < 0 (1317) (@Rodot-) +- [1309](https://github.com/tardis-sn/tardis/pull/1309) Re-add C formal integral (1309) (@chvogl) ### v3.0.dev3503 (2020/09/04 05:18) +- [1291](https://github.com/tardis-sn/tardis/pull/1291) Download atom data from opensupernova mirror (1291) (@epassaro) +- [1254](https://github.com/tardis-sn/tardis/pull/1254) Fix how virtual_packet properties are saved in hdf (1254) (@jaladh-singhal) +- [1278](https://github.com/tardis-sn/tardis/pull/1278) Pin numpy to v1.19 (1278) (@epassaro) ### v3.0.dev3500 (2020/08/12 05:52) +- [1271](https://github.com/tardis-sn/tardis/pull/1271) Move to NumPy 1.19 (1271) (@epassaro) +- [1266](https://github.com/tardis-sn/tardis/pull/1266) Move to Pandas 1.x (1266) (@epassaro) +- [1235](https://github.com/tardis-sn/tardis/pull/1235) test and fix for issue #1228 (1235) (@ebjordi) ### v3.0.dev3497 (2020/08/07 11:26) +- [1267](https://github.com/tardis-sn/tardis/pull/1267) Temporarily fetch refdata from GDrive (1267) (@epassaro) +- [1265](https://github.com/tardis-sn/tardis/pull/1265) add GIT_LFS_SMUDGE (1265) (@kaushik94) +- [1262](https://github.com/tardis-sn/tardis/pull/1262) Update package versions (1262) (@epassaro) +- [1263](https://github.com/tardis-sn/tardis/pull/1263) Clean up status badge display (1263) (@chvogl) +- [1261](https://github.com/tardis-sn/tardis/pull/1261) Add governance document (1261) (@wkerzendorf) ### v3.0.dev3487 (2020/07/30 18:18) +- [1259](https://github.com/tardis-sn/tardis/pull/1259) Emphasised reporting instructions in code of conduct (1259) (@harpolea) +- [1255](https://github.com/tardis-sn/tardis/pull/1255) Pin pyne to v0.5 (1255) (@epassaro) +- [1213](https://github.com/tardis-sn/tardis/pull/1213) Re-applied Black formatting to tardis after excluding undesired directories (1213) (@jaladh-singhal) ### v3.0.dev3484 (2020/07/19 10:30) +- [1210](https://github.com/tardis-sn/tardis/pull/1210) [MRG] Using Mamba in Pipelines (1210) (@kaushik94) +- [1237](https://github.com/tardis-sn/tardis/pull/1237) Add new Contribution guidelines (1237) (@jaladh-singhal) +- [1238](https://github.com/tardis-sn/tardis/pull/1238) code of conduct symlink (1238) (@wkerzendorf) +- [1234](https://github.com/tardis-sn/tardis/pull/1234) TARDIS Code of Conduct (1234) (@wkerzendorf) +- [1233](https://github.com/tardis-sn/tardis/pull/1233) Update of the Governance model (1233) (@wkerzendorf) +- [1231](https://github.com/tardis-sn/tardis/pull/1231) Roadmap Documentation Page (1231) (@marxwillia) +- [1227](https://github.com/tardis-sn/tardis/pull/1227) Restore caching to spectrum_integrated (1227) (@arjunsavel) ### v3.0.dev3477 (2020/07/08 23:06) +- [1218](https://github.com/tardis-sn/tardis/pull/1218) Move and rename coverage file (1218) (@arjunsavel) +- [1224](https://github.com/tardis-sn/tardis/pull/1224) Added better mission statement (1224) (@ycamacho) +- [1190](https://github.com/tardis-sn/tardis/pull/1190) Change `pytestconfig` to `request.config` (1190) (@epassaro) +- [1219](https://github.com/tardis-sn/tardis/pull/1219) Update index.rst to add mission statement (1219) (@ycamacho) ### v3.0.dev3472 (2020/06/27 16:11) +- [1203](https://github.com/tardis-sn/tardis/pull/1203) Minor changes to the environment file and cleanup (1203) (@epassaro) +- [1209](https://github.com/tardis-sn/tardis/pull/1209) add sashank27 ORCID ID (1209) (@sashank27) +- [1207](https://github.com/tardis-sn/tardis/pull/1207) add git-blame-ignore for code style black Changes (1207) (@wkerzendorf) +- [1201](https://github.com/tardis-sn/tardis/pull/1201) Code style black (1201) (@wkerzendorf) +- [1200](https://github.com/tardis-sn/tardis/pull/1200) Add jaladh-singhal's orcid to .orcid.csv (1200) (@jaladh-singhal) +- [1197](https://github.com/tardis-sn/tardis/pull/1197) add arjun's name to the ORCID list (1197) (@arjunsavel) +- [1166](https://github.com/tardis-sn/tardis/pull/1166) Create a new subpackage for jupyter-widgets and add shell info widgets (1166) (@jaladh-singhal) ### v3.0.dev3463 (2020/06/19 18:51) +- [1195](https://github.com/tardis-sn/tardis/pull/1195) Fix badges in README.rst (1195) (@epassaro) +- [1193](https://github.com/tardis-sn/tardis/pull/1193) Unpin astropy version (1193) (@epassaro) +- [1191](https://github.com/tardis-sn/tardis/pull/1191) Add note to tell users which OS are supported (issue #1125) (1191) (@ebjordi) +- [1158](https://github.com/tardis-sn/tardis/pull/1158) Make consistency edits to documentation (1158) (@arjunsavel) ### v3.0.dev3459 (2020/06/12 14:01) +- [1185](https://github.com/tardis-sn/tardis/pull/1185) Upgrade pytest version (1185) (@epassaro) ### v3.0.dev3458 (2020/06/02 15:11) +- [1180](https://github.com/tardis-sn/tardis/pull/1180) Remove test pipeline (1180) (@epassaro) +- [1153](https://github.com/tardis-sn/tardis/pull/1153) update doc page to a notebook (1153) (@sashank27) +- [1150](https://github.com/tardis-sn/tardis/pull/1150) Fix the Plasma tests (1150) (@wkerzendorf) +- [1178](https://github.com/tardis-sn/tardis/pull/1178) Update mailmap (1178) (@epassaro) +- [1171](https://github.com/tardis-sn/tardis/pull/1171) Print statement debug (1171) (@arjunsavel) +- [1165](https://github.com/tardis-sn/tardis/pull/1165) Fix callbacks in run_tardis (1165) (@Rodot-) ### v3.0.dev3448 (2020/05/28 13:08) +- [1173](https://github.com/tardis-sn/tardis/pull/1173) Fix GUI and plasma tests (1173) (@marxwillia) +- [1168](https://github.com/tardis-sn/tardis/pull/1168) Add checkpoint to PR template checklist (1168) (@harpolea) +- [1162](https://github.com/tardis-sn/tardis/pull/1162) Fix broken pipelines (1162) (@epassaro) ### v3.0.dev3442 (2020/05/21 19:34) +- [1159](https://github.com/tardis-sn/tardis/pull/1159) Montecarlo/fix omp integrator (1159) (@Rodot-) +- [1155](https://github.com/tardis-sn/tardis/pull/1155) CodeCov reintegration (1155) (@wkerzendorf) +- [1157](https://github.com/tardis-sn/tardis/pull/1157) Update .mailmap (1157) (@epassaro) ### v3.0.dev3439 (2020/05/20 09:25) +- [1142](https://github.com/tardis-sn/tardis/pull/1142) Split release pipeline (1142) (@epassaro) +- [1151](https://github.com/tardis-sn/tardis/pull/1151) Git ignored VSCode specific files (1151) (@jaladh-singhal) +- [1149](https://github.com/tardis-sn/tardis/pull/1149) Made plot size larger in quickstart notebook (1149) (@jaladh-singhal) +- [1147](https://github.com/tardis-sn/tardis/pull/1147) allow downloading of example file in quickstart (1147) (@sashank27) +- [1105](https://github.com/tardis-sn/tardis/pull/1105) Add skip condition if QT_API is no set (issue #1101) (1105) (@marxwillia) +- [1143](https://github.com/tardis-sn/tardis/pull/1143) Set manual trigger on file (compare refdata) (1143) (@marxwillia) +- [1144](https://github.com/tardis-sn/tardis/pull/1144) add option to execute quickstart in build (1144) (@sashank27) ### v3.0.dev3424 (2020/05/07 11:29) +- [1133](https://github.com/tardis-sn/tardis/pull/1133) Solve pending issues of the release pipeline (1133) (@epassaro) +- [1141](https://github.com/tardis-sn/tardis/pull/1141) fix warnings in quickstart (1141) (@sashank27) +- [1137](https://github.com/tardis-sn/tardis/pull/1137) Increasing glob-like omission of coverage files (1137) (@arjunsavel) +- [1139](https://github.com/tardis-sn/tardis/pull/1139) Added more file types to git ignore (1139) (@jaladh-singhal) +- [1134](https://github.com/tardis-sn/tardis/pull/1134) Update mailmap (1134) (@orbitfold) +- [1135](https://github.com/tardis-sn/tardis/pull/1135) Running tests on MacOS-10.14 (1135) (@orbitfold) +- [1285](https://github.com/tardis-sn/tardis/pull/1285) Final numba PR (1285) (@arjunsavel) +- [1244](https://github.com/tardis-sn/tardis/pull/1244) Fix numba_montecarlo virtual spectrum (1244) (@arjunsavel) +- [1136](https://github.com/tardis-sn/tardis/pull/1136) Debugging relativity on numba_montecarlo (1136) (@arjunsavel) +- [1068](https://github.com/tardis-sn/tardis/pull/1068) Migrate gui to PyQt5 (issue #988) (1068) (@ebjordi) +- [1085](https://github.com/tardis-sn/tardis/pull/1085) Solves issue #680 for tardis.util.base (1085) (@marxwillia) +- [1055](https://github.com/tardis-sn/tardis/pull/1055) renamed capmanager class functions to its new ones (1055) (@not4win) +- [1048](https://github.com/tardis-sn/tardis/pull/1048) Re-activate TARDIS tests (1048) (@epassaro) ### v3.0.dev3409 (2020/02/24 23:02) +- [1046](https://github.com/tardis-sn/tardis/pull/1046) Updated zenodo.json (1046) (@epassaro) +- [1045](https://github.com/tardis-sn/tardis/pull/1045) Fix file paths at `diff` step in release pipeline (1045) (@epassaro) +- [1040](https://github.com/tardis-sn/tardis/pull/1040) Re-activate release job (1040) (@epassaro) +- [1039](https://github.com/tardis-sn/tardis/pull/1039) Update .mailmap (1039) (@epassaro) ### v3.0.dev3403 (2020/02/19 10:55) +- [1031](https://github.com/tardis-sn/tardis/pull/1031) Create Zenodo JSON file (1031) (@epassaro) +- [1036](https://github.com/tardis-sn/tardis/pull/1036) Update zenodo.json (1036) (@epassaro) +- [1035](https://github.com/tardis-sn/tardis/pull/1035) Update .mailmap (1035) (@epassaro) +- [1034](https://github.com/tardis-sn/tardis/pull/1034) Update .mailmap (1034) (@epassaro) +- [1032](https://github.com/tardis-sn/tardis/pull/1032) Add Mark Magee to .mailmap (1032) (@epassaro) +- [1025](https://github.com/tardis-sn/tardis/pull/1025) Add `compilers` to environment YAML file (1025) (@epassaro) +- [1026](https://github.com/tardis-sn/tardis/pull/1026) Minor changes to Azure release (1026) (@epassaro) ### 3.0.dev3396 (2020/02/07 10:00) +- [1027](https://github.com/tardis-sn/tardis/pull/1027) Added Mark Magee (1027) (@MarkMageeAstro) +- [1024](https://github.com/tardis-sn/tardis/pull/1024) Add epassaro orcid (1024) (@epassaro) +- [1022](https://github.com/tardis-sn/tardis/pull/1022) Added my orcid (1022) (@harpolea) ### 3.0.dev3384 (2020/02/02 16:56) +- [1021](https://github.com/tardis-sn/tardis/pull/1021) Set cron job, disable CI and PR (1021) (@epassaro) ### 3.0.dev3383 (2020/02/02 14:01) +- [1015](https://github.com/tardis-sn/tardis/pull/1015) Set up release TARDIS version with Azure Pipelines (1015) (@epassaro) +- [1020](https://github.com/tardis-sn/tardis/pull/1020) Update .mailmap (1020) (@livnehra) +- [1018](https://github.com/tardis-sn/tardis/pull/1018) Updated .mailmap (1018) (@epassaro) +- [1010](https://github.com/tardis-sn/tardis/pull/1010) Pipeline for comparing reference data (1010) (@epassaro) +- [1016](https://github.com/tardis-sn/tardis/pull/1016) Removed GH Action for release versions (1016) (@epassaro) +- [1013](https://github.com/tardis-sn/tardis/pull/1013) Fixed typo in GH Action (1013) (@epassaro) +- [1006](https://github.com/tardis-sn/tardis/pull/1006) Trying to get the right version number for automatic release (1006) (@epassaro) +- [1008](https://github.com/tardis-sn/tardis/pull/1008) Improvements for the update_reference section [docs] (1008) (@epassaro) +- [1011](https://github.com/tardis-sn/tardis/pull/1011) Gui fix (1011) (@marxwillia) +- [1009](https://github.com/tardis-sn/tardis/pull/1009) Fix for packet source unit test (1009) (@epassaro) +- [1007](https://github.com/tardis-sn/tardis/pull/1007) Fix for vboundary tests (1007) (@epassaro) +- [995](https://github.com/tardis-sn/tardis/pull/995) Checking failing tests on Azure (995) (@kaushik94) +- [1005](https://github.com/tardis-sn/tardis/pull/1005) Automatic TARDIS releases (1005) (@epassaro) +- [1004](https://github.com/tardis-sn/tardis/pull/1004) Fixed csvy abundance indexing bug (1004) (@marxwillia) +- [1003](https://github.com/tardis-sn/tardis/pull/1003) Custom source packets (1003) (@marxwillia) +- [994](https://github.com/tardis-sn/tardis/pull/994) Large cleanup operation (994) (@wkerzendorf) +- [992](https://github.com/tardis-sn/tardis/pull/992) Changes made to documentation for update_refdata (992) (@kowal180) +- [967](https://github.com/tardis-sn/tardis/pull/967) log additional properties in hdf witeout when --with-vpacket-logging is present (967) (@kaushik94) +- [969](https://github.com/tardis-sn/tardis/pull/969) Fixes numpydoc for util (969) (@kowal180) +- [985](https://github.com/tardis-sn/tardis/pull/985) Fix typo (985) (@jreichenbach-msu) +- [983](https://github.com/tardis-sn/tardis/pull/983) Fix installation documentation (983) (@jreichenbach-msu) +- [982](https://github.com/tardis-sn/tardis/pull/982) Pinned `numpy` to v1.15 (982) (@epassaro) +- [978](https://github.com/tardis-sn/tardis/pull/978) Add further fix to quickstart link (978) (@jreichenbach-msu) +- [975](https://github.com/tardis-sn/tardis/pull/975) Add links to Quickstart (975) (@jreichenbach-msu) +- [971](https://github.com/tardis-sn/tardis/pull/971) Fix formal integral spikes bug (971) (@chvogl) +- [968](https://github.com/tardis-sn/tardis/pull/968) Fixed GUI #950 tardis/gui/widgets.py (968) (@marxwillia) +- [965](https://github.com/tardis-sn/tardis/pull/965) Isotope time0 (965) (@marxwillia) +- [966](https://github.com/tardis-sn/tardis/pull/966) fix AtomData repr (966) (@wkerzendorf) +- [964](https://github.com/tardis-sn/tardis/pull/964) Raise error if requested atoms are not in the atomic data (964) (@chvogl) +- [959](https://github.com/tardis-sn/tardis/pull/959) Csvy model config dict (959) (@marxwillia) +- [960](https://github.com/tardis-sn/tardis/pull/960) Save integrated spectrum to hdf if requested (960) (@chvogl) +- [957](https://github.com/tardis-sn/tardis/pull/957) add blondin converter (957) (@wkerzendorf) +- [956](https://github.com/tardis-sn/tardis/pull/956) Dilution factor fix (956) (@marxwillia) +- [953](https://github.com/tardis-sn/tardis/pull/953) add code comparison (953) (@wkerzendorf) +- [952](https://github.com/tardis-sn/tardis/pull/952) Base schema fix (952) (@marxwillia) +- [951](https://github.com/tardis-sn/tardis/pull/951) Documentation restructure (951) (@wkerzendorf) +- [936](https://github.com/tardis-sn/tardis/pull/936) csvy_model (936) (@wkerzendorf) +- [945](https://github.com/tardis-sn/tardis/pull/945) Revert "Remove PR Trigger" (945) (@wkerzendorf) +- [928](https://github.com/tardis-sn/tardis/pull/928) Added csvy parser (928) (@marxwillia) +- [933](https://github.com/tardis-sn/tardis/pull/933) Radiative recombination (933) (@chvogl) ### v3.0-alpha.3 (2019/05/13 18:05) +- [930](https://github.com/tardis-sn/tardis/pull/930) Fix for conda-forge package (930) (@epassaro) +- [918](https://github.com/tardis-sn/tardis/pull/918) Density docs (918) (@marxwillia) +- [926](https://github.com/tardis-sn/tardis/pull/926) Adding a TARDIS data repo (926) (@wkerzendorf) +- [924](https://github.com/tardis-sn/tardis/pull/924) Migrate beta_sobolev calculation from cython to numba (924) (@chvogl) +- [925](https://github.com/tardis-sn/tardis/pull/925) Docs/fix changelog (925) (@wkerzendorf) +- [923](https://github.com/tardis-sn/tardis/pull/923) Fix nlte normalization (923) (@wkerzendorf) +- [831](https://github.com/tardis-sn/tardis/pull/831) Fix NLTE Normalization - issue #784 (831) (@livnehra) +- [922](https://github.com/tardis-sn/tardis/pull/922) Revert "Fix nlte normalization " (922) (@wkerzendorf) +- [920](https://github.com/tardis-sn/tardis/pull/920) Fix nlte normalization (920) (@wkerzendorf) +- [921](https://github.com/tardis-sn/tardis/pull/921) Autoupdate changelog (921) (@wkerzendorf) +- [919](https://github.com/tardis-sn/tardis/pull/919) Add possibility to bias vpacket emission based on optical depth (919) (@chvogl) +- [914](https://github.com/tardis-sn/tardis/pull/914) make GUI python3 compatible (914) (@wkerzendorf) +- [902](https://github.com/tardis-sn/tardis/pull/902) general overhaul of the docs for 3.0 (902) (@wkerzendorf) +- [916](https://github.com/tardis-sn/tardis/pull/916) fix the documenation up a bit (916) (@wkerzendorf) +- [915](https://github.com/tardis-sn/tardis/pull/915) Parsing STELLA files for TARDIS (915) (@sarafina325) +- [911](https://github.com/tardis-sn/tardis/pull/911) Use Russian roulette to kill v-packets with negligible weight (911) (@chvogl) +- [697](https://github.com/tardis-sn/tardis/pull/697) Relativity (697) (@chvogl) ### v3.0-alpha.2 (2019/03/11 10:24) ### v3.0.a1 (2019/03/10 11:03) +- [901](https://github.com/tardis-sn/tardis/pull/901) .nojekyll added to docs (901) (@debajyotidasgupta) +- [897](https://github.com/tardis-sn/tardis/pull/897) add pytest azurepipelines (897) (@wkerzendorf) +- [896](https://github.com/tardis-sn/tardis/pull/896) Adding general build artefacts (896) (@wkerzendorf) +- [894](https://github.com/tardis-sn/tardis/pull/894) Azure pipeline for TARDIS (894) (@wkerzendorf) +- [893](https://github.com/tardis-sn/tardis/pull/893) add doctr to TARDIS (893) (@wkerzendorf) +- [892](https://github.com/tardis-sn/tardis/pull/892) adding azure-pipelines (892) (@wkerzendorf) +- [891](https://github.com/tardis-sn/tardis/pull/891) New template setup from astropy (891) (@wkerzendorf) +- [888](https://github.com/tardis-sn/tardis/pull/888) Update installation.rst (888) (@nileshpatra) +- [886](https://github.com/tardis-sn/tardis/pull/886) Pandas ix fix (886) (@wkerzendorf) +- [879](https://github.com/tardis-sn/tardis/pull/879) Python3 version of TARDIS (879) (@wkerzendorf) +- [881](https://github.com/tardis-sn/tardis/pull/881) Adds description of gcc problem to documentation (881) (@ycamacho) +- [859](https://github.com/tardis-sn/tardis/pull/859) Use interpolated values to do formal integral with more shells (859) (@chvogl) +- [873](https://github.com/tardis-sn/tardis/pull/873) Some small fixes related to the documentation and the building process (Fix #842) (873) (@unoebauer) +- [868](https://github.com/tardis-sn/tardis/pull/868) Add Travis Stages: Activate Integration tests (868) (@unoebauer) +- [866](https://github.com/tardis-sn/tardis/pull/866) Add Travis Caching and separate scripts for CI (866) (@wkerzendorf) +- [869](https://github.com/tardis-sn/tardis/pull/869) Travis update2 (869) (@wkerzendorf) +- [864](https://github.com/tardis-sn/tardis/pull/864) Unify unittest hdfs (864) (@unoebauer) +- [865](https://github.com/tardis-sn/tardis/pull/865) Adding CodeCov integration (865) (@wkerzendorf) +- [860](https://github.com/tardis-sn/tardis/pull/860) Enabling the addition of callbacks in run_tardis (860) (@wkerzendorf) +- [863](https://github.com/tardis-sn/tardis/pull/863) Thomson cross section: Continuation of PR #688 (863) (@unoebauer) +- [850](https://github.com/tardis-sn/tardis/pull/850) Add full test for formal integral method (850) (@unoebauer) +- [861](https://github.com/tardis-sn/tardis/pull/861) Describe refdata update and workflow refactor (861) (@wkerzendorf) +- [848](https://github.com/tardis-sn/tardis/pull/848) Add capability to store information about the plasma state during iterations (848) (@unoebauer) +- [857](https://github.com/tardis-sn/tardis/pull/857) Refactor logging (857) (@wkerzendorf) +- [856](https://github.com/tardis-sn/tardis/pull/856) Extend formal integral to line_interaction_type macroatom (856) (@chvogl) +- [855](https://github.com/tardis-sn/tardis/pull/855) Make the conda-forge channel the only channel (855) (@wkerzendorf) +- [853](https://github.com/tardis-sn/tardis/pull/853) Fix formal integral (853) (@chvogl) +- [849](https://github.com/tardis-sn/tardis/pull/849) Missing refdata (849) (@wkerzendorf) +- [851](https://github.com/tardis-sn/tardis/pull/851) add atomic data description (851) (@wkerzendorf) +- [846](https://github.com/tardis-sn/tardis/pull/846) update the OPENMP text to be correct (846) (@wkerzendorf) +- [847](https://github.com/tardis-sn/tardis/pull/847) Revert "change to new cython version" (847) (@wkerzendorf) +- [839](https://github.com/tardis-sn/tardis/pull/839) change to new cython version (839) (@wkerzendorf) +- [845](https://github.com/tardis-sn/tardis/pull/845) Update Documentation: new location of tardis_example (845) (@unoebauer) +- [843](https://github.com/tardis-sn/tardis/pull/843) Fix issue with custom_composition reader (843) (@unoebauer) +- [844](https://github.com/tardis-sn/tardis/pull/844) Remove bbsampling from schema file (844) (@pfreddy) +- [837](https://github.com/tardis-sn/tardis/pull/837) Add json sphinx (837) (@wkerzendorf) +- [841](https://github.com/tardis-sn/tardis/pull/841) Fixed indentation and position of delta_treatment in plasma/standard_plasmas.py (841) (@Heringer-Epson) +- [838](https://github.com/tardis-sn/tardis/pull/838) fix current cython installation problem (838) (@wkerzendorf) +- [821](https://github.com/tardis-sn/tardis/pull/821) Simplify convergence strategies (821) (@unoebauer) +- [833](https://github.com/tardis-sn/tardis/pull/833) restructure landing page to use notebooks (833) (@wkerzendorf) +- [832](https://github.com/tardis-sn/tardis/pull/832) Fixes #830 (832) (@unoebauer) ### v2.0.2 (2018/06/18 16:24) ### v2_test3 (2018/06/18 16:13) +- [829](https://github.com/tardis-sn/tardis/pull/829) build bleeding edge cython (829) (@wkerzendorf) +- [828](https://github.com/tardis-sn/tardis/pull/828) trying to get travis to build (828) (@wkerzendorf) +- [827](https://github.com/tardis-sn/tardis/pull/827) Update travis link to miniconda (827) (@unoebauer) +- [826](https://github.com/tardis-sn/tardis/pull/826) Remove tardis_example.tar.gz from documentation; fixes #824 (826) (@unoebauer) +- [820](https://github.com/tardis-sn/tardis/pull/820) update of mailmap (820) (@wkerzendorf) +- [819](https://github.com/tardis-sn/tardis/pull/819) Reintroduce and update changelog (819) (@unoebauer) +- [815](https://github.com/tardis-sn/tardis/pull/815) Update and Fix Documentation (815) (@unoebauer) +- [816](https://github.com/tardis-sn/tardis/pull/816) Remove old and broken badges (816) (@unoebauer) +- [814](https://github.com/tardis-sn/tardis/pull/814) Fix numpydoc problem (814) (@unoebauer) +- [813](https://github.com/tardis-sn/tardis/pull/813) Request specific sphinx version (813) (@unoebauer) ### v2.0 (2018/04/05 09:03) +- [812](https://github.com/tardis-sn/tardis/pull/812) Update of documentation (812) (@unoebauer) +- [809](https://github.com/tardis-sn/tardis/pull/809) fix dependencies for tardis conda env (809) (@wkerzendorf) +- [761](https://github.com/tardis-sn/tardis/pull/761) Add caching for integrated spectrum: Fix #760 (761) (@wkerzendorf) +- [715](https://github.com/tardis-sn/tardis/pull/715) Merge 'generate_reference_path' and 'reference_path' in integration tests (bug #672) (715) (@wkerzendorf) +- [801](https://github.com/tardis-sn/tardis/pull/801) Decay of isotopes branch (801) (@wkerzendorf) +- [806](https://github.com/tardis-sn/tardis/pull/806) Fix reference dictionary problem (806) (@wkerzendorf) +- [802](https://github.com/tardis-sn/tardis/pull/802) Fix for PR #801 (802) (@wkerzendorf) +- [772](https://github.com/tardis-sn/tardis/pull/772) [TEP007] CMFGEN density parser (772) (@wkerzendorf) +- [771](https://github.com/tardis-sn/tardis/pull/771) [TEP007] Add cmfgen2tardis script (771) (@wkerzendorf) +- [757](https://github.com/tardis-sn/tardis/pull/757) [TEP007] Decay and merge isotopic abundance dataframe (757) (@wkerzendorf) +- [767](https://github.com/tardis-sn/tardis/pull/767) [TEP007] Docs for isotope config (767) (@wkerzendorf) +- [764](https://github.com/tardis-sn/tardis/pull/764) [TEP007] Isotope stratified file support (764) (@wkerzendorf) +- [762](https://github.com/tardis-sn/tardis/pull/762) [TEP007] Isotope uniform config option (762) (@wkerzendorf) +- [756](https://github.com/tardis-sn/tardis/pull/756) [TEP007] [WIP] Isotope Abundances class (756) (@wkerzendorf) +- [803](https://github.com/tardis-sn/tardis/pull/803) include yml files in MANIFEST (803) (@wkerzendorf) +- [799](https://github.com/tardis-sn/tardis/pull/799) tardis/plasma/standard_plasmas.py: old database files warning (799) (@wkerzendorf) +- [797](https://github.com/tardis-sn/tardis/pull/797) Minor Updates: Fixes for #521 and #699 (797) (@wkerzendorf) +- [796](https://github.com/tardis-sn/tardis/pull/796) Prevent pandas SettingWithCopyWarning by copying DataFrames when slicing (796) (@wkerzendorf) +- [795](https://github.com/tardis-sn/tardis/pull/795) Force deactivate LaTeX in GUI - Fix #441 (795) (@wkerzendorf) +- [793](https://github.com/tardis-sn/tardis/pull/793) Add pyside to requirements (needed for GUI) (793) (@wkerzendorf) +- [794](https://github.com/tardis-sn/tardis/pull/794) add new readthedocs.yml (794) (@wkerzendorf) +- [792](https://github.com/tardis-sn/tardis/pull/792) Fix compatibility with networkx 2.0 (792) (@wkerzendorf) +- [791](https://github.com/tardis-sn/tardis/pull/791) Propagate changes to the line index into the GUI code (791) (@wkerzendorf) +- [786](https://github.com/tardis-sn/tardis/pull/786) The final carsus merge (786) (@wkerzendorf) +- [782](https://github.com/tardis-sn/tardis/pull/782) Plasma write_to_tex/dot unit tests (782) (@wkerzendorf) +- [781](https://github.com/tardis-sn/tardis/pull/781) Omit coverage of test related files (781) (@wkerzendorf) +- [785](https://github.com/tardis-sn/tardis/pull/785) [DOC] Update Running tests doc (785) (@wkerzendorf) +- [774](https://github.com/tardis-sn/tardis/pull/774) Replace Comparison values in Plasma Unit Tests with reference HDF file (774) (@wkerzendorf) +- [780](https://github.com/tardis-sn/tardis/pull/780) LevelBoltzmannFactorNLTE.from_config is now a staticmethod (780) (@wkerzendorf) +- [778](https://github.com/tardis-sn/tardis/pull/778) Fix NLTE (778) (@wkerzendorf) +- [776](https://github.com/tardis-sn/tardis/pull/776) Fix compatibility bug in radiative_properties (776) (@wkerzendorf) +- [779](https://github.com/tardis-sn/tardis/pull/779) Save coverage report when tests use tardis-refdata (779) (@wkerzendorf) +- [775](https://github.com/tardis-sn/tardis/pull/775) Transition from atomic-dataset config option to tardis-refdata (775) (@wkerzendorf) +- [769](https://github.com/tardis-sn/tardis/pull/769) [TEP014] [DOC] Updated to_hdf notebook (769) (@wkerzendorf) +- [759](https://github.com/tardis-sn/tardis/pull/759) Formal Integral: including electron scattering (759) (@wkerzendorf) +- [768](https://github.com/tardis-sn/tardis/pull/768) [TEP014] Simulation HDF and deprecated to_hdf cleanup. (768) (@wkerzendorf) +- [773](https://github.com/tardis-sn/tardis/pull/773) Update Documentation (773) (@wkerzendorf) +- [752](https://github.com/tardis-sn/tardis/pull/752) [TEP014] PlasmaWriterMixin (752) (@wkerzendorf) +- [748](https://github.com/tardis-sn/tardis/pull/748) [TEP014] Update Runner and Spectrum classes to use HDFWriter + Unit Tests (748) (@wkerzendorf) +- [765](https://github.com/tardis-sn/tardis/pull/765) Attempt to fix up the GUI (765) (@wkerzendorf) +- [758](https://github.com/tardis-sn/tardis/pull/758) Add new version to tardis_env27 and add pyne (758) (@wkerzendorf) +- [753](https://github.com/tardis-sn/tardis/pull/753) [TEP014][DOC] HDFWriter Documentation (753) (@wkerzendorf) +- [740](https://github.com/tardis-sn/tardis/pull/740) [GSoC] Formal integral Project (740) (@wkerzendorf) +- [750](https://github.com/tardis-sn/tardis/pull/750) [TEP005][QOL] Add MontecarloRunner.spectrum_integrated (750) (@wkerzendorf) +- [745](https://github.com/tardis-sn/tardis/pull/745) [TEP005][DOC] Documentation (745) (@wkerzendorf) +- [746](https://github.com/tardis-sn/tardis/pull/746) [TEP005][CONFIG] Prevent incompatible configurations (746) (@wkerzendorf) +- [741](https://github.com/tardis-sn/tardis/pull/741) Add unit tests for the formal integral (741) (@wkerzendorf) +- [747](https://github.com/tardis-sn/tardis/pull/747) [TEP014] Update Model and Density classes to use HDFWriter + Unit Tests (747) (@wkerzendorf) +- [749](https://github.com/tardis-sn/tardis/pull/749) [TEP014] Change name of HDFWriter to HDFWriterMixin (749) (@wkerzendorf) +- [751](https://github.com/tardis-sn/tardis/pull/751) [QOL] Add default axis to TARDISSpectrum.plot (751) (@wkerzendorf) +- [743](https://github.com/tardis-sn/tardis/pull/743) Fix bug in plasma (743) (@wkerzendorf) +- [744](https://github.com/tardis-sn/tardis/pull/744) [TEP014] Added HDFWriter class + Unit Tests (744) (@wkerzendorf) +- [742](https://github.com/tardis-sn/tardis/pull/742) Fix clash in RTD dependencies (742) (@wkerzendorf) +- [735](https://github.com/tardis-sn/tardis/pull/735) Move common ctest fixtures into conftest.py (735) (@wkerzendorf) +- [729](https://github.com/tardis-sn/tardis/pull/729) Refactor spectrum (729) (@wkerzendorf) +- [730](https://github.com/tardis-sn/tardis/pull/730) Fix test_plasma_simple not skipping properly (730) (@wkerzendorf) +- [712](https://github.com/tardis-sn/tardis/pull/712) Colorize Logger (712) (@wkerzendorf) +- [718](https://github.com/tardis-sn/tardis/pull/718) Unit test for untested method of montecarlo simulation code (718) (@unoebauer) +- [724](https://github.com/tardis-sn/tardis/pull/724) Rebase PR #678 (724) (@wkerzendorf) +- [709](https://github.com/tardis-sn/tardis/pull/709) Add note about broken GUI to docu (709) (@wkerzendorf) +- [708](https://github.com/tardis-sn/tardis/pull/708) Add new installation instructions (708) (@wkerzendorf) +- [704](https://github.com/tardis-sn/tardis/pull/704) Fix ignoring model tests (704) (@wkerzendorf) +- [700](https://github.com/tardis-sn/tardis/pull/700) Add contributing guidelines (700) (@wkerzendorf) +- [686](https://github.com/tardis-sn/tardis/pull/686) converted spectrum_frequency (686) (@wkerzendorf) +- [696](https://github.com/tardis-sn/tardis/pull/696) Add missing diagnostics property to runner's to_hdf list (696) (@wkerzendorf) +- [694](https://github.com/tardis-sn/tardis/pull/694) Significantly reduce peak memory usage when vpacket logging is enabled (694) (@wkerzendorf) +- [682](https://github.com/tardis-sn/tardis/pull/682) Import montecarlo.base in the __init__ module of the package. (682) (@wkerzendorf) +- [670](https://github.com/tardis-sn/tardis/pull/670) Integrate continuum interactions into cmontecarlo (670) (@wkerzendorf) +- [652](https://github.com/tardis-sn/tardis/pull/652) [TEP006] Aggregate TARDIS restructure and configuration system cleanup (652) (@wkerzendorf) +- [677](https://github.com/tardis-sn/tardis/pull/677) Update link to tardis_example.yml in documentation - Fix #676 (677) (@wkerzendorf) +- [674](https://github.com/tardis-sn/tardis/pull/674) Change matplotlib backend - fix test_integration remote plotting issue (674) (@yeganer) +- [664](https://github.com/tardis-sn/tardis/pull/664) Kd final test (664) (@wkerzendorf) +- [668](https://github.com/tardis-sn/tardis/pull/668) change to tardis atom data on git lfs (668) (@wkerzendorf) +- [666](https://github.com/tardis-sn/tardis/pull/666) Remove News from main TARDIS github page (666) (@wkerzendorf) +- [667](https://github.com/tardis-sn/tardis/pull/667) Update SOCIS and GSOC students credits (667) (@wkerzendorf) +- [665](https://github.com/tardis-sn/tardis/pull/665) Add to_hdf compression (665) (@wkerzendorf) +- [663](https://github.com/tardis-sn/tardis/pull/663) Develop (663) (@wkerzendorf) +- [507](https://github.com/tardis-sn/tardis/pull/507) Unit tests for untested methods of tardis/util.py (507) (@) +- [657](https://github.com/tardis-sn/tardis/pull/657) Require pyyaml 3.12 (657) (@wkerzendorf) +- [659](https://github.com/tardis-sn/tardis/pull/659) Update installation docs (659) (@wkerzendorf) +- [653](https://github.com/tardis-sn/tardis/pull/653) Facility to provide per-setup atom data as well as save report locally. (653) (@wkerzendorf) +- [641](https://github.com/tardis-sn/tardis/pull/641) Fix detailed radiative rates (641) (@wkerzendorf) +- [642](https://github.com/tardis-sn/tardis/pull/642) Use pytest-html==1.10.0, modify DokuReport class accordingly. (642) (@wkerzendorf) +- [630](https://github.com/tardis-sn/tardis/pull/630) Create an overview page on Dokuwiki. (630) (@yeganer) +- [620](https://github.com/tardis-sn/tardis/pull/620) Runner script to automate execution of integration tests. (620) (@wkerzendorf) +- [628](https://github.com/tardis-sn/tardis/pull/628) Remove exponent property from yaml files with exponential density (628) (@wkerzendorf) +- [626](https://github.com/tardis-sn/tardis/pull/626) Revert "Add exponent as a property for exponential density" (626) (@wkerzendorf) +- [542](https://github.com/tardis-sn/tardis/pull/542) Updates to He NLTE treatment. (542) (@wkerzendorf) +- [612](https://github.com/tardis-sn/tardis/pull/612) Add facility to generate and accept HDF files as reference data for Integration Tests. (612) (@wkerzendorf) +- [614](https://github.com/tardis-sn/tardis/pull/614) Omit the integration_tests when running coveralls (614) (@wkerzendorf) +- [619](https://github.com/tardis-sn/tardis/pull/619) Fixed incorrect name in error message (619) (@wkerzendorf) +- [618](https://github.com/tardis-sn/tardis/pull/618) to_hdf: If only the last run is stored, do not add a counter in the name (618) (@wkerzendorf) +- [617](https://github.com/tardis-sn/tardis/pull/617) Add a to_hdf method on TARDISSpectrum (617) (@wkerzendorf) +- [600](https://github.com/tardis-sn/tardis/pull/600) Parametrize the Slow Test class with two setups. (600) (@wkerzendorf) +- [613](https://github.com/tardis-sn/tardis/pull/613) Fix bug in montecarlo.pyx (613) (@wkerzendorf) +- [595](https://github.com/tardis-sn/tardis/pull/595) Line absorption rate estimator (595) (@wkerzendorf) +- [606](https://github.com/tardis-sn/tardis/pull/606) Merge to_hdf (606) (@wkerzendorf) +- [597](https://github.com/tardis-sn/tardis/pull/597) Use abundances, densities filepaths relative to w7 config file. (597) (@wkerzendorf) +- [569](https://github.com/tardis-sn/tardis/pull/569) Added a conda environment for tardis (569) (@wkerzendorf) +- [565](https://github.com/tardis-sn/tardis/pull/565) Change the way AtomData quantities are initialized (565) (@wkerzendorf) +- [599](https://github.com/tardis-sn/tardis/pull/599) Update the tardis_example tar file provided in the documentation. (599) (@wkerzendorf) +- [598](https://github.com/tardis-sn/tardis/pull/598) Fix convergence handling in run_legacy_simulation - fix issue #593 (598) (@wkerzendorf) +- [590](https://github.com/tardis-sn/tardis/pull/590) Link images of comparison plots in DokuReport using hookwrapper. (590) (@wkerzendorf) +- [591](https://github.com/tardis-sn/tardis/pull/591) Fix path of CSS and JS files used in html report. (591) (@wkerzendorf) +- [594](https://github.com/tardis-sn/tardis/pull/594) Provide tardis.yaml_load shortcut (594) (@wkerzendorf) +- [592](https://github.com/tardis-sn/tardis/pull/592) Fix virt energy (592) (@wkerzendorf) +- [583](https://github.com/tardis-sn/tardis/pull/583) Subclass pytest-html's HTMLReport to DokuReport class for report generation and upload. (583) (@yeganer) +- [588](https://github.com/tardis-sn/tardis/pull/588) Embed comparison plots in Dokuwiki Report. (588) (@) +- [587](https://github.com/tardis-sn/tardis/pull/587) Move the three spectra attributes from Radial1DModel to MontecarloRunner (587) (@wkerzendorf) +- [578](https://github.com/tardis-sn/tardis/pull/578) Shift slow test related pytest hooks in lower level conftest.py (578) (@) +- [581](https://github.com/tardis-sn/tardis/pull/581) Update several files to match package_template (581) (@yeganer) +- [576](https://github.com/tardis-sn/tardis/pull/576) [config-system] Validator rewrite: Use jsonschema (576) (@wkerzendorf) +- [549](https://github.com/tardis-sn/tardis/pull/549) [TEP006] Create a JSON schema in YAML to replace the old tardis_config_definition.yml (549) (@ftsamis) +- [575](https://github.com/tardis-sn/tardis/pull/575) Replace misused calls to yaml.load with a helper function. (575) (@wkerzendorf) +- [570](https://github.com/tardis-sn/tardis/pull/570) Enable generation of html report of integration tests, and upload to dokuwiki. (570) (@wkerzendorf) +- [574](https://github.com/tardis-sn/tardis/pull/574) tardis/base.py: Remove duplicate code from run_tardis (574) (@wkerzendorf) +- [573](https://github.com/tardis-sn/tardis/pull/573) io/util.py (YAMLLoader): Use OrderedDict to store loaded YAML (573) (@wkerzendorf) +- [572](https://github.com/tardis-sn/tardis/pull/572) Change the way YAMLLoader resolves some properties (572) (@wkerzendorf) +- [532](https://github.com/tardis-sn/tardis/pull/532) Documentation overhaul (532) (@wkerzendorf) +- [571](https://github.com/tardis-sn/tardis/pull/571) [config] Set the exponent property as mandatory when density is exponential (571) (@ftsamis) +- [566](https://github.com/tardis-sn/tardis/pull/566) Initial laydown of comparison plots for TestW7. (566) (@) +- [567](https://github.com/tardis-sn/tardis/pull/567) Accept keyword arguments for Configuration.from_yaml (567) (@wkerzendorf) +- [561](https://github.com/tardis-sn/tardis/pull/561) TestW7: Assertions for spectrum quantities, fixture for handling baseline data. (561) (@wkerzendorf) +- [515](https://github.com/tardis-sn/tardis/pull/515) [config-system] Add a custom YAML Loader to parse astropy quantities (515) (@wkerzendorf) +- [555](https://github.com/tardis-sn/tardis/pull/555) Use pytest's monkeypatch.chdir to change the working directory in the config_reader tests (555) (@wkerzendorf) +- [558](https://github.com/tardis-sn/tardis/pull/558) Integration Test class for Stratified W7 setup. (558) (@wkerzendorf) +- [557](https://github.com/tardis-sn/tardis/pull/557) Enable skipping slow tests. (557) (@unoebauer) +- [544](https://github.com/tardis-sn/tardis/pull/544) Continue cmontecarlo tests refactor. Extend #530. (544) (@unoebauer) +- [543](https://github.com/tardis-sn/tardis/pull/543) Fix issue #535: Treat rel. paths inside config relative to the config file (543) (@wkerzendorf) +- [551](https://github.com/tardis-sn/tardis/pull/551) Add SOCIS 2016 advertisement (551) (@wkerzendorf) +- [547](https://github.com/tardis-sn/tardis/pull/547) Fix Issue #548 (547) (@wkerzendorf) +- [545](https://github.com/tardis-sn/tardis/pull/545) added mailmap to compile the commits for each person (545) (@wkerzendorf) +- [539](https://github.com/tardis-sn/tardis/pull/539) Adding OSX to our travis build (539) (@wkerzendorf) +- [541](https://github.com/tardis-sn/tardis/pull/541) Move progress bar update after calculation (541) (@yeganer) +- [540](https://github.com/tardis-sn/tardis/pull/540) Mirroring C enums in Python for CMontecarlo tests. (540) (@yeganer) +- [538](https://github.com/tardis-sn/tardis/pull/538) Upgrading to the new Readthedocs infrastructure (538) (@wkerzendorf) +- [530](https://github.com/tardis-sn/tardis/pull/530) Refactor cmontecarlo tests for exercising parametrization. (530) (@yeganer) +- [537](https://github.com/tardis-sn/tardis/pull/537) Ignore invalid OpenMP nthreads values (537) (@yeganer) +- [527](https://github.com/tardis-sn/tardis/pull/527) Unit tests for untested methods of tardis/atomic.py (527) (@) +- [533](https://github.com/tardis-sn/tardis/pull/533) Remove rpacket.recently_crossed_boundary flag (533) (@wkerzendorf) +- [514](https://github.com/tardis-sn/tardis/pull/514) Performance (514) (@wkerzendorf) +- [531](https://github.com/tardis-sn/tardis/pull/531) Organize headers in C-Extension (531) (@wkerzendorf) +- [526](https://github.com/tardis-sn/tardis/pull/526) Docs: Include conda-requirements in installation.rst (526) (@ssim) ### v1.0.1 (2015/03/03 08:12) ### v1.0 (2015/03/03 07:58) ### 1.0rc3 (2015/03/03 07:54) diff --git a/CITATION.cff b/CITATION.cff index 253ecde0686..1f1b8d94734 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -3,8 +3,8 @@ cff-version: 1.0.3 message: If you use this software, please cite it using these metadata. # FIXME title as repository name might not be the best name, please make human readable -title: 'tardis-sn/tardis: TARDIS v2023.11.26' -doi: 10.5281/zenodo.10207663 +title: 'tardis-sn/tardis: TARDIS v2024.08.04' +doi: 10.5281/zenodo.13207705 # FIXME splitting of full names is error prone, please check if given/family name are correct authors: - given-names: Wolfgang @@ -94,12 +94,12 @@ authors: family-names: Fullard affiliation: Michigan State University orcid: https://orcid.org/0000-0001-7343-1678 -- given-names: Isaac - family-names: Smith - affiliation: - given-names: Atharva family-names: Arya affiliation: +- given-names: Isaac + family-names: Smith + affiliation: - given-names: Kevin family-names: Cawley affiliation: @@ -107,14 +107,17 @@ authors: family-names: Singhal affiliation: orcid: https://orcid.org/0000-0002-8310-0829 -- given-names: Dhruv - family-names: Sondhi +- given-names: Joshua + family-names: Shields + affiliation: +- given-names: Jack + family-names: O'Brien affiliation: - given-names: Talytha family-names: Barbosa affiliation: -- given-names: Jack - family-names: O'Brien +- given-names: Dhruv + family-names: Sondhi affiliation: - given-names: Jenny family-names: Yu @@ -122,12 +125,12 @@ authors: - given-names: Maryam family-names: Patel affiliation: -- given-names: Kaushik - family-names: Varanasi - affiliation: - given-names: Shikha family-names: Rathi affiliation: +- given-names: Kaushik + family-names: Varanasi + affiliation: - given-names: Sona family-names: Chitchyan affiliation: @@ -135,121 +138,136 @@ authors: family-names: Gillanders affiliation: University of Oxford orcid: https://orcid.org/0000-0002-8094-6108 -- given-names: Joshua - family-names: Shields +- given-names: Shreyas + family-names: Singh affiliation: - given-names: Arjun family-names: Savel affiliation: -- given-names: Shreyas - family-names: Singh - affiliation: -- given-names: Martin - family-names: Reinecke +- given-names: Alexander + family-names: Holas affiliation: - given-names: Youssef family-names: Eweis affiliation: +- given-names: Martin + family-names: Reinecke + affiliation: - given-names: Tomas family-names: Bylund affiliation: - given-names: William family-names: Black affiliation: +- given-names: Sumit + family-names: Gupta + affiliation: - given-names: Laud family-names: Bentil affiliation: -- given-names: Alexander - family-names: Holas - affiliation: - given-names: Jordi family-names: Eguren affiliation: orcid: https://orcid.org/0000-0002-2328-8030 +- given-names: Ansh + family-names: Kumar + affiliation: - given-names: Arib family-names: Alam affiliation: -- given-names: Ansh +- given-names: Asish family-names: Kumar affiliation: - given-names: Matthew family-names: Bartnik affiliation: -- given-names: Rohith - family-names: Varma Buddaraju - affiliation: - given-names: Mark family-names: Magee affiliation: +- given-names: Anirban + family-names: Dutta + affiliation: +- given-names: Rohith + family-names: Varma Buddaraju + affiliation: - given-names: Ran family-names: Livneh affiliation: +- given-names: Jing + family-names: Lu + affiliation: +- given-names: Erin + family-names: Visser + affiliation: +- given-names: Ayushi + family-names: Daksh + affiliation: - given-names: Satwik family-names: Kambham affiliation: -- given-names: Sashank - family-names: Mishra +- given-names: Jayant + family-names: Bhakar affiliation: - orcid: https://orcid.org/0000-0001-8302-1584 - given-names: Srinath family-names: Rajagopalan affiliation: -- given-names: Ayushi - family-names: Daksh +- given-names: Israel + family-names: Roldan affiliation: -- given-names: Jayant - family-names: Bhakar +- given-names: Sashank + family-names: Mishra + affiliation: + orcid: https://orcid.org/0000-0001-8302-1584 +- given-names: Sarthak + family-names: Srivastava affiliation: - given-names: John family-names: Reichenbach affiliation: +- given-names: Rinkle + family-names: Jain + affiliation: - given-names: Andreas family-names: Floers affiliation: - given-names: GitHub family-names: Actions affiliation: -- given-names: Rinkle - family-names: Jain +- given-names: Aarya + family-names: Chaumal affiliation: -- given-names: Sourav - family-names: Singh +- given-names: Harshul + family-names: Gupta affiliation: - given-names: Antreev family-names: Brar affiliation: -- given-names: Anirban - family-names: Dutta - affiliation: -- given-names: Aarya - family-names: Chaumal +- given-names: Sourav + family-names: Singh affiliation: -- given-names: Yuki - family-names: Matsumura +- given-names: Aman + family-names: Kumar affiliation: -- given-names: Abhishek - family-names: Patidar +- given-names: Caroline + family-names: Sofiatti affiliation: - given-names: Nathan family-names: Kowalski affiliation: -- given-names: Aman - family-names: Kumar - affiliation: -- given-names: Harshul - family-names: Gupta - affiliation: - given-names: Jonatan family-names: Selsing affiliation: - given-names: Chinmay family-names: Talegaonkar affiliation: -- given-names: Caroline - family-names: Sofiatti +- given-names: Yuki + family-names: Matsumura affiliation: -- given-names: Shilpi - family-names: Prasad +- given-names: Abhishek + family-names: Patidar + affiliation: +- given-names: Shashank + family-names: Venkat affiliation: - given-names: Johannes family-names: Buchner @@ -257,6 +275,9 @@ authors: - given-names: Kevin family-names: Yap affiliation: +- given-names: Laureano + family-names: Martinez + affiliation: - given-names: Le family-names: Truong affiliation: @@ -272,20 +293,23 @@ authors: - given-names: Nilesh family-names: Patra affiliation: -- given-names: Dmitry - family-names: Volodin +- given-names: Nutan + family-names: Chen affiliation: - given-names: Parikshit family-names: Singh Rathore affiliation: +- given-names: Pratik + family-names: Patel + affiliation: - given-names: Sampark family-names: Sharma affiliation: -- given-names: Shashank - family-names: Venkat +- given-names: Dmitry + family-names: Volodin affiliation: -- given-names: Jing - family-names: Lu +- given-names: Shilpi + family-names: Prasad affiliation: - given-names: Suyash family-names: Gupta @@ -299,21 +323,15 @@ authors: - given-names: Yash family-names: Aggarwal affiliation: -- given-names: Pratik - family-names: Patel - affiliation: - given-names: Debajyoti family-names: Dasgupta affiliation: -- given-names: ABHISHEK - family-names: PATIDAR - affiliation: -- given-names: Laureano - family-names: Martinez - affiliation: - given-names: Chaitanya family-names: Kolliboyina affiliation: +- given-names: ABHISHEK + family-names: PATIDAR + affiliation: - given-names: Ashwin family-names: Nayak U affiliation: @@ -323,7 +341,7 @@ authors: - given-names: Atul family-names: Kumar affiliation: -version: release-2023.11.26 -date-released: 2023-11-26 +version: release-2024.08.04 +date-released: 2024-08-04 repository-code: https://github.com/tardis-sn/tardis license: cc-by-4.0 diff --git a/README.rst b/README.rst index 8603332dea9..1a269086dc1 100644 --- a/README.rst +++ b/README.rst @@ -110,15 +110,14 @@ The following BibTeX entries are needed for the references: adsnote = {Provided by the SAO/NASA Astrophysics Data System} } -.. |CITATION| replace:: kerzendorf_2023_10207663 - -.. |DOI_BADGE| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592480.svg - :target: https://doi.org/10.5281/zenodo.592480 +.. |CITATION| replace:: kerzendorf_2024_13207705 +.. |DOI_BADGE| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.13207705-blue + :target: https://doi.org/10.5281/zenodo.13207705 .. code-block:: bibtex - @software{kerzendorf_2023_10207663, + @software{kerzendorf_2024_13207705, author = {Kerzendorf, Wolfgang and Sim, Stuart and Vogl, Christian and @@ -143,88 +142,94 @@ The following BibTeX entries are needed for the references: Barna, Barnabás and Gautam, Gaurav and Fullard, Andrew and - Smith, Isaac and Arya, Atharva and + Smith, Isaac and Cawley, Kevin and Singhal, Jaladh and - Sondhi, Dhruv and - Barbosa, Talytha and + Shields, Joshua and O'Brien, Jack and + Barbosa, Talytha and + Sondhi, Dhruv and Yu, Jenny and Patel, Maryam and - Varanasi, Kaushik and Rathi, Shikha and + Varanasi, Kaushik and Chitchyan, Sona and Gillanders, James and - Shields, Joshua and - Savel, Arjun and Singh, Shreyas and - Reinecke, Martin and + Savel, Arjun and + Holas, Alexander and Eweis, Youssef and + Reinecke, Martin and Bylund, Tomas and Black, William and + Gupta, Sumit and Bentil, Laud and - Holas, Alexander and Eguren, Jordi and - Alam, Arib and Kumar, Ansh and + Alam, Arib and + Kumar, Asish and Bartnik, Matthew and - Varma Buddaraju, Rohith and Magee, Mark and + Dutta, Anirban and + Varma Buddaraju, Rohith and Livneh, Ran and - Kambham, Satwik and - Mishra, Sashank and - Rajagopalan, Srinath and + Lu, Jing and + Visser, Erin and Daksh, Ayushi and + Kambham, Satwik and Bhakar, Jayant and + Rajagopalan, Srinath and + Roldan, Israel and + Mishra, Sashank and + Srivastava, Sarthak and Reichenbach, John and + Jain, Rinkle and Floers, Andreas and Actions, GitHub and - Jain, Rinkle and - Singh, Sourav and - Brar, Antreev and - Dutta, Anirban and Chaumal, Aarya and - Matsumura, Yuki and - Patidar, Abhishek and - Kowalski, Nathan and - Kumar, Aman and Gupta, Harshul and + Brar, Antreev and + Singh, Sourav and + Kumar, Aman and + Sofiatti, Caroline and + Kowalski, Nathan and Selsing, Jonatan and Talegaonkar, Chinmay and - Sofiatti, Caroline and - Prasad, Shilpi and + Matsumura, Yuki and + Patidar, Abhishek and + Venkat, Shashank and Buchner, Johannes and Yap, Kevin and + Martinez, Laureano and Truong, Le and Sandler, Morgan and Zaheer, Musabbiha and Sarafina, Nance and Patra, Nilesh and - Volodin, Dmitry and + Chen, Nutan and Singh Rathore, Parikshit and + Patel, Pratik and Sharma, Sampark and - Venkat, Shashank and - Lu, Jing and + Volodin, Dmitry and + Prasad, Shilpi and Gupta, Suyash and Lemoine, Thom and Wahi, Ujjwal and Aggarwal, Yash and - Patel, Pratik and Dasgupta, Debajyoti and - PATIDAR, ABHISHEK and - Martinez, Laureano and Kolliboyina, Chaitanya and + PATIDAR, ABHISHEK and Nayak U, Ashwin and Kharkar, Atharwa and Kumar, Atul}, - title = {tardis-sn/tardis: TARDIS v2023.11.26}, - month = nov, - year = 2023, + title = {tardis-sn/tardis: TARDIS v2024.08.04}, + month = aug, + year = 2024, publisher = {Zenodo}, - version = {release-2023.11.26}, - doi = {10.5281/zenodo.10207663}, - url = {https://doi.org/10.5281/zenodo.10207663} + version = {release-2024.08.04}, + doi = {10.5281/zenodo.13207705}, + url = {https://doi.org/10.5281/zenodo.13207705} } ******* diff --git a/docs/resources/credits.rst b/docs/resources/credits.rst index cacb3e9bd38..b25245bdbfd 100644 --- a/docs/resources/credits.rst +++ b/docs/resources/credits.rst @@ -74,14 +74,14 @@ The following BibTeX entries are needed for the references: adsnote = {Provided by the SAO/NASA Astrophysics Data System} } -.. |CITATION| replace:: kerzendorf_2023_10207663 +.. |CITATION| replace:: kerzendorf_2024_13207705 -.. |DOI_BADGE| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592480.svg - :target: https://doi.org/10.5281/zenodo.592480 +.. |DOI_BADGE| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.13207705-blue + :target: https://doi.org/10.5281/zenodo.13207705 .. code-block:: bibtex - @software{kerzendorf_2023_10207663, + @software{kerzendorf_2024_13207705, author = {Kerzendorf, Wolfgang and Sim, Stuart and Vogl, Christian and @@ -106,87 +106,93 @@ The following BibTeX entries are needed for the references: Barna, Barnabás and Gautam, Gaurav and Fullard, Andrew and - Smith, Isaac and Arya, Atharva and + Smith, Isaac and Cawley, Kevin and Singhal, Jaladh and - Sondhi, Dhruv and - Barbosa, Talytha and + Shields, Joshua and O'Brien, Jack and + Barbosa, Talytha and + Sondhi, Dhruv and Yu, Jenny and Patel, Maryam and - Varanasi, Kaushik and Rathi, Shikha and + Varanasi, Kaushik and Chitchyan, Sona and Gillanders, James and - Shields, Joshua and - Savel, Arjun and Singh, Shreyas and - Reinecke, Martin and + Savel, Arjun and + Holas, Alexander and Eweis, Youssef and + Reinecke, Martin and Bylund, Tomas and Black, William and + Gupta, Sumit and Bentil, Laud and - Holas, Alexander and Eguren, Jordi and - Alam, Arib and Kumar, Ansh and + Alam, Arib and + Kumar, Asish and Bartnik, Matthew and - Varma Buddaraju, Rohith and Magee, Mark and + Dutta, Anirban and + Varma Buddaraju, Rohith and Livneh, Ran and - Kambham, Satwik and - Mishra, Sashank and - Rajagopalan, Srinath and + Lu, Jing and + Visser, Erin and Daksh, Ayushi and + Kambham, Satwik and Bhakar, Jayant and + Rajagopalan, Srinath and + Roldan, Israel and + Mishra, Sashank and + Srivastava, Sarthak and Reichenbach, John and + Jain, Rinkle and Floers, Andreas and Actions, GitHub and - Jain, Rinkle and - Singh, Sourav and - Brar, Antreev and - Dutta, Anirban and Chaumal, Aarya and - Matsumura, Yuki and - Patidar, Abhishek and - Kowalski, Nathan and - Kumar, Aman and Gupta, Harshul and + Brar, Antreev and + Singh, Sourav and + Kumar, Aman and + Sofiatti, Caroline and + Kowalski, Nathan and Selsing, Jonatan and Talegaonkar, Chinmay and - Sofiatti, Caroline and - Prasad, Shilpi and + Matsumura, Yuki and + Patidar, Abhishek and + Venkat, Shashank and Buchner, Johannes and Yap, Kevin and + Martinez, Laureano and Truong, Le and Sandler, Morgan and Zaheer, Musabbiha and Sarafina, Nance and Patra, Nilesh and - Volodin, Dmitry and + Chen, Nutan and Singh Rathore, Parikshit and + Patel, Pratik and Sharma, Sampark and - Venkat, Shashank and - Lu, Jing and + Volodin, Dmitry and + Prasad, Shilpi and Gupta, Suyash and Lemoine, Thom and Wahi, Ujjwal and Aggarwal, Yash and - Patel, Pratik and Dasgupta, Debajyoti and - PATIDAR, ABHISHEK and - Martinez, Laureano and Kolliboyina, Chaitanya and + PATIDAR, ABHISHEK and Nayak U, Ashwin and Kharkar, Atharwa and Kumar, Atul}, - title = {tardis-sn/tardis: TARDIS v2023.11.26}, - month = nov, - year = 2023, + title = {tardis-sn/tardis: TARDIS v2024.08.04}, + month = aug, + year = 2024, publisher = {Zenodo}, - version = {release-2023.11.26}, - doi = {10.5281/zenodo.10207663}, - url = {https://doi.org/10.5281/zenodo.10207663} + version = {release-2024.08.04}, + doi = {10.5281/zenodo.13207705}, + url = {https://doi.org/10.5281/zenodo.13207705} } From c905e0345127eaa48a8facb70eb86db46c320c0b Mon Sep 17 00:00:00 2001 From: Jack O'Brien Date: Tue, 6 Aug 2024 13:44:54 -0400 Subject: [PATCH 10/10] Opacity state restructure (#2773) * created file for opacity solver * Added opacity states for the continuum and macroatom * Updated the opacity state and macroatom state to work with legacy plasma * Added numba initialize from opacity state, added methods to solve opacity state with the solver * moved line2macro_level_upper to the macroatom state * renamed a macroatom variable, added solver to montecarlo solver * ran black * corrected an import * corrected an import * ran black * Added line_interaction_type to the to_numba function, should be reqorked in the future * fixed initialization of opacity state * Updated handling of continuum vs noncontinuum macroblock references * Fixed a typo * refactored the state objects to put them in the correct folders * another typo * added basic docstrings to the continuum state * Added docstrings to macroatom state * Updated docstrings onithe opacity_state file * Added docstrings to the solver * Updated Docstring Style * ran black * changed Opacity solver to take kwargs * ran black * Added class attributes to Opacity Solver * Changed names of the opacity state and numba equivalent * Added test for the opacity solver * added conftest to the opacities module * fixed up tests for the opacity_solver * ran black * Added new test for the numba opacity state * ran black, updated name of the test * improved tau_sobelev disable_line_scattering initialization * Fixed tau_sobolev initialization * added some comments * Changed scope of the simulation in conftest --- tardis/opacities/continuum/continuum_state.py | 194 ++++++++++++++++ .../opacities/macro_atom/macroatom_state.py | 90 ++++++++ tardis/opacities/opacity_solver.py | 67 ++++++ tardis/opacities/opacity_state.py | 208 +++++++++++++++++- tardis/opacities/tests/conftest.py | 11 + tardis/opacities/tests/test_opacity_solver.py | 67 ++++++ .../tests/test_opacity_state_numba.py | 83 +++++++ tardis/transport/montecarlo/base.py | 23 +- 8 files changed, 732 insertions(+), 11 deletions(-) create mode 100644 tardis/opacities/continuum/continuum_state.py create mode 100644 tardis/opacities/macro_atom/macroatom_state.py create mode 100644 tardis/opacities/opacity_solver.py create mode 100644 tardis/opacities/tests/conftest.py create mode 100644 tardis/opacities/tests/test_opacity_solver.py create mode 100644 tardis/opacities/tests/test_opacity_state_numba.py diff --git a/tardis/opacities/continuum/continuum_state.py b/tardis/opacities/continuum/continuum_state.py new file mode 100644 index 00000000000..8d3618e30f3 --- /dev/null +++ b/tardis/opacities/continuum/continuum_state.py @@ -0,0 +1,194 @@ +import numpy as np + + +class ContinuumState: + def __init__( + self, + nu_i, + level2continuum_idx, + p_fb_deactivation, + photo_ion_cross_sections, + chi_bf, + ff_cooling_factor, + fb_emission_cdf, + photo_ion_idx, + k_packet_idx, + ): + """ + Current State of the Continuum Required for Opacity Computation + + Parameters + ---------- + nu_i : pd.DataFrame + frequencies for the bound-free thresholds + level2continuum_idx : pd.DataFrame + mapping from levels to the continuum + p_fb_deactivation : pd.DataFrame + probabilities of free-bound deactivation channels + photo_ion_cross_sections : pd.DataFrame + Photoionization cross sections + chi_bf : pd.DataFrame + Bound-free opacities + ff_cooling_factor : np.ndarray + free-free cooling factor + fb_emission_cdf : pd.DataFrame + free-bound emission cumulative distribution function + photo_ion_idx : pd.DataFrame + photoionization indices + k_packet_idx : pd.DataFrame + k-packet indices + """ + self.nu_i = nu_i + self.level2continuum_idx = level2continuum_idx + self.p_fb_deactivation = p_fb_deactivation + self.photo_ion_cross_sections = photo_ion_cross_sections + self._chi_bf = chi_bf + self.ff_cooling_factor = ff_cooling_factor + self.fb_emission_cdf = fb_emission_cdf + self.photo_ion_idx = photo_ion_idx + self.k_packet_idx = k_packet_idx + + @classmethod + def from_legacy_plasma(cls, plasma): + """ + Generates a ContinuumState object from a tardis BasePlasma + + Parameters + ---------- + plasma : tarids.plasma.BasePlasma + legacy base plasma + + Returns + ------- + ContinuumState + """ + nu_i = plasma.nu_i + level2continuum_idx = plasma.level2continuum_idx + p_fb_deactivation = plasma.p_fb_deactivation + photo_ion_cross_sections = plasma.photo_ion_cross_sections + chi_bf = plasma.chi_bf + ff_cooling_factor = plasma.ff_cooling_factor + fb_emission_cdf = plasma.fb_emission_cdf + photo_ion_idx = plasma.photo_ion_idx + k_packet_idx = plasma.k_packet_idx + + return cls( + nu_i, + level2continuum_idx, + p_fb_deactivation, + photo_ion_cross_sections, + chi_bf, + ff_cooling_factor, + fb_emission_cdf, + photo_ion_idx, + k_packet_idx, + ) + + @property + def bf_threshold_list_nu(self): + """ + List of Bound-Free Threshold Frequencies + + Returns + ------- + pd.DataFrame + """ + return self.nu_i.loc[self.level2continuum_idx.index] + + @property + def phot_nus(self): + """ + Frequencies corresponding to Photoionization Cross Sections + + Returns + ------- + pd.DataFrame + """ + return self.photo_ion_cross_sections.nu.loc[ + self.level2continuum_idx.index + ] + + @property + def photo_ion_block_references(self): + """Photoionization Block References + + Returns + ------- + np.ndarray + """ + return np.pad( + self.phot_nus.groupby(level=[0, 1, 2], sort=False) + .count() + .values.cumsum(), + [1, 0], + ) + + @property + def photo_ion_nu_threshold_mins(self): + """ + Minimum Edges of the photoionization threshold frequencies + + Returns + ------- + pd.DataFrame + """ + return self.phot_nus.groupby(level=[0, 1, 2], sort=False).first() + + @property + def photo_ion_nu_threshold_maxs(self): + """ + Maximum Edges of the photoionization threshold frequencies + + Returns + ------- + pd.DataFrame + """ + return self.phot_nus.groupby(level=[0, 1, 2], sort=False).last() + + @property + def x_sect(self): + """ + Photoionization Cross Sections mapped to the continuum indices + + Returns + ------- + pd.DataFrame + """ + return self.photo_ion_cross_sections.x_sect.loc[ + self.level2continuum_idx.index + ] + + @property + def chi_bf(self): + """ + Bound-Free Opacities indices corresponding to the continuum levels + + Returns + ------- + pd.DataFrame + """ + return self._chi_bf.loc[self.level2continuum_idx.index] + + @property + def emissivities(self): + """ + Free-bound Emissivities corresponding to the continuum levels + + Returns + ------- + pd.DataFrame + """ + return self.fb_emission_cdf.loc[self.level2continuum_idx.index] + + @property + def photo_ion_activation_idx(self): + """ + Index corresponding to photoionization activation + + Returns + ------- + pd.DataFrame + """ + return self.photo_ion_idx.loc[ + self.level2continuum_idx.index, "destination_level_idx" + ] diff --git a/tardis/opacities/macro_atom/macroatom_state.py b/tardis/opacities/macro_atom/macroatom_state.py new file mode 100644 index 00000000000..b3cb78eebb6 --- /dev/null +++ b/tardis/opacities/macro_atom/macroatom_state.py @@ -0,0 +1,90 @@ +from tardis.transport.montecarlo.configuration import montecarlo_globals +from tardis.io.util import HDFWriterMixin + + +class MacroAtomState(HDFWriterMixin): + + hdf_name = "macro_atom_state" + + hdf_properties = [ + "transition_probabilities", + "transition_type", + "destination_level_id", + "transition_line_id", + "macro_block_references", + "line2macro_level_upper", + ] + + def __init__( + self, + transition_probabilities, + transition_type, + destination_level_id, + transition_line_id, + macro_block_references, + line2macro_level_upper, + ): + """ + Current State of the MacroAtom + + Parameters + ---------- + transition_probabilities : pd.DataFrame + Macro Atom Transition probabilities between levels + transition_type : pd.DataFrame) + Macro Atom transition types + destination_level_id : pd.DataFrame + ID of destination levels of the Macro Atom + transition_line_id : pd.DataFrame + ID of lines corresponding to Macro Atom transitions + macro_block_references : pd.DataFrame or np.ndarray + Index references to the Macro Atom blocks + line2macro_level_upper : pd.DataFrame + Mapping from lines to Macro Atom upper levels + """ + self.transition_probabilities = transition_probabilities + self.transition_type = transition_type + self.destination_level_id = destination_level_id + self.transition_line_id = transition_line_id + self.macro_block_references = macro_block_references + self.line2macro_level_upper = line2macro_level_upper + + @classmethod + def from_legacy_plasma(cls, plasma): + """ + Generates a MacroAtomState object from a tardis BasePlasma + + Parameters + ---------- + plasma : tarids.plasma.BasePlasma + legacy base plasma + + Returns + ------- + MacroAtomState + """ + transition_probabilities = plasma.transition_probabilities + transition_type = plasma.macro_atom_data["transition_type"] + destination_level_id = plasma.macro_atom_data["destination_level_idx"] + transition_line_id = plasma.macro_atom_data["lines_idx"] + line2macro_level_upper = ( + plasma.atomic_data.lines_upper2macro_reference_idx + ) + + if ( + montecarlo_globals.CONTINUUM_PROCESSES_ENABLED + ): # TODO: Unify this in the plasma solver + macro_block_references = plasma.macro_block_references + else: + macro_block_references = plasma.atomic_data.macro_atom_references[ + "block_references" + ] + + return cls( + transition_probabilities, + transition_type, + destination_level_id, + transition_line_id, + macro_block_references, + line2macro_level_upper, + ) diff --git a/tardis/opacities/opacity_solver.py b/tardis/opacities/opacity_solver.py new file mode 100644 index 00000000000..9b3b63f48ad --- /dev/null +++ b/tardis/opacities/opacity_solver.py @@ -0,0 +1,67 @@ +from tardis.opacities.tau_sobolev import calculate_sobolev_line_opacity +from tardis.opacities.opacity_state import ( + OpacityState, +) +import numpy as np +import pandas as pd + + +class OpacitySolver(object): + + line_interaction_type: str = "scatter" + disable_line_scattering: bool = False + + def __init__( + self, line_interaction_type="scatter", disable_line_scattering=False + ): + """Solver class for opacities + + Parameters + ---------- + line_interaction_type: str + "scatter", "downbranch", or "macroatom" + disable_line_scattering: bool + """ + + self.line_interaction_type = line_interaction_type + self.disable_line_scattering = disable_line_scattering + + def solve(self, legacy_plasma) -> OpacityState: + """ + Solves the opacity state + + Parameters + ---------- + plasma : tarids.plasma.BasePlasma + legacy base plasma + + Returns + ------- + OpacityState + """ + if self.disable_line_scattering: + tau_sobolev = pd.DataFrame( + np.zeros( + ( + legacy_plasma.atomic_data.lines.shape[ + 0 + ], # number of lines + legacy_plasma.abundance.shape[1], # number of shells + ), + dtype=np.float64, + ), + index=legacy_plasma.atomic_data.lines.index, + ) + else: + tau_sobolev = calculate_sobolev_line_opacity( + legacy_plasma.atomic_data.lines, + legacy_plasma.level_number_density, + legacy_plasma.time_explosion, + legacy_plasma.stimulated_emission_factor, + ) + + opacity_state = OpacityState.from_legacy_plasma( + legacy_plasma, tau_sobolev + ) + + return opacity_state diff --git a/tardis/opacities/opacity_state.py b/tardis/opacities/opacity_state.py index 7fbab4be781..ef5cc7d19ac 100644 --- a/tardis/opacities/opacity_state.py +++ b/tardis/opacities/opacity_state.py @@ -4,6 +4,79 @@ from tardis.opacities.tau_sobolev import calculate_sobolev_line_opacity from tardis.transport.montecarlo.configuration import montecarlo_globals +from tardis.opacities.continuum.continuum_state import ContinuumState +from tardis.opacities.macro_atom.macroatom_state import MacroAtomState + + +class OpacityState: + def __init__( + self, + electron_density, + t_electrons, + line_list_nu, + tau_sobolev, + macroatom_state, + continuum_state, + ): + """ + Opacity State in Python + + Parameters + ---------- + electron_density : pd.DataFrame + t_electrons : numpy.ndarray + line_list_nu : pd.DataFrame + tau_sobolev : pd.DataFrame + macroatom_state: tardis.opacities.macro_atom.macroatom_state.MacroAtomState + continuum_state: tardis.opacities.continuum.continuum_state.ContinuumState + """ + self.electron_density = electron_density + self.t_electrons = t_electrons + self.line_list_nu = line_list_nu + + self.tau_sobolev = tau_sobolev + + # Continuum Opacity Data + self.continuum_state = continuum_state + self.macroatom_state = macroatom_state + + @classmethod + def from_legacy_plasma(cls, plasma, tau_sobolev): + """ + Generates an OpacityStatePython object from a tardis BasePlasma + + Parameters + ---------- + plasma : tarids.plasma.BasePlasma + legacy base plasma + tau_sobolev : pd.DataFrame + Expansion Optical Depths + + Returns + ------- + OpacityStatePython + """ + if hasattr(plasma, "macro_atom_data"): + macroatom_state = MacroAtomState.from_legacy_plasma(plasma) + else: + macroatom_state = None + + if hasattr(plasma, "photo_ion_cross_sections"): + continuum_state = ContinuumState.from_legacy_plasma(plasma) + else: + continuum_state = None + + atomic_data = plasma.atomic_data + + return cls( + plasma.electron_densities, + plasma.t_electrons, + atomic_data.lines.nu, + tau_sobolev, + macroatom_state, + continuum_state, + ) + opacity_state_spec = [ ("electron_density", float64[:]), @@ -32,7 +105,7 @@ @jitclass(opacity_state_spec) -class OpacityState: +class OpacityStateNumba: def __init__( self, electron_density, @@ -116,7 +189,7 @@ def __getitem__(self, i: slice): OpacityState : a shallow copy of the current instance """ # NOTE: This currently will not work with continuum processes since it does not slice those arrays - return OpacityState( + return OpacityStateNumba( self.electron_density[i], self.t_electrons[i], self.line_list_nu, @@ -142,6 +215,135 @@ def __getitem__(self, i: slice): ) +def opacity_state_to_numba( + opacity_state: OpacityState, line_interaction_type +) -> OpacityStateNumba: + """ + Initialize the OpacityStateNumba object and copy over the data over from OpacityState class + + Parameters + ---------- + opacity_state : tardis.opacities.opacity_state.OpacityState + line_interaction_type : enum + """ + + electron_densities = opacity_state.electron_density.values + t_electrons = opacity_state.t_electrons + line_list_nu = opacity_state.line_list_nu.values + + # NOTE: Disabled line scattering is handled by the opacitystate solver + tau_sobolev = np.ascontiguousarray( + opacity_state.tau_sobolev, dtype=np.float64 + ) + + if line_interaction_type == "scatter": + # to adhere to data types, we must have an array of minimum size 1 + array_size = 1 + transition_probabilities = np.zeros( + (array_size, array_size), dtype=np.float64 + ) # to adhere to data types + line2macro_level_upper = np.zeros(array_size, dtype=np.int64) + macro_block_references = np.zeros(array_size, dtype=np.int64) + transition_type = np.zeros(array_size, dtype=np.int64) + destination_level_id = np.zeros(array_size, dtype=np.int64) + transition_line_id = np.zeros(array_size, dtype=np.int64) + else: + transition_probabilities = np.ascontiguousarray( + opacity_state.macroatom_state.transition_probabilities.values.copy(), + dtype=np.float64, + ) + line2macro_level_upper = ( + opacity_state.macroatom_state.line2macro_level_upper + ) + # TODO: Fix setting of block references for non-continuum mode + + macro_block_references = np.asarray( + opacity_state.macroatom_state.macro_block_references + ) + + transition_type = opacity_state.macroatom_state.transition_type.values + + # Destination level is not needed and/or generated for downbranch + destination_level_id = ( + opacity_state.macroatom_state.destination_level_id.values + ) + transition_line_id = ( + opacity_state.macroatom_state.transition_line_id.values + ) + + if montecarlo_globals.CONTINUUM_PROCESSES_ENABLED: + bf_threshold_list_nu = ( + opacity_state.continuum_state.bf_threshold_list_nu.values + ) + p_fb_deactivation = np.ascontiguousarray( + opacity_state.continuum_state.p_fb_deactivation.values.copy(), + dtype=np.float64, + ) + + phot_nus = opacity_state.continuum_state.phot_nus + photo_ion_block_references = ( + opacity_state.continuum_state.photo_ion_block_references + ) + photo_ion_nu_threshold_mins = ( + opacity_state.continuum_state.photo_ion_nu_threshold_mins.values + ) + photo_ion_nu_threshold_maxs = ( + opacity_state.continuum_state.photo_ion_nu_threshold_maxs.values + ) + + chi_bf = opacity_state.continuum_state.chi_bf.values + x_sect = opacity_state.continuum_state.x_sect.values + + phot_nus = phot_nus.values + ff_opacity_factor = ( + opacity_state.continuum_state.ff_cooling_factor + / np.sqrt(t_electrons) + ).astype(np.float64) + emissivities = opacity_state.continuum_state.emissivities.values + photo_ion_activation_idx = ( + opacity_state.continuum_state.photo_ion_activation_idx.values + ) + k_packet_idx = np.int64(opacity_state.continuum_state.k_packet_idx) + else: + bf_threshold_list_nu = np.zeros(0, dtype=np.float64) + p_fb_deactivation = np.zeros((0, 0), dtype=np.float64) + photo_ion_nu_threshold_mins = np.zeros(0, dtype=np.float64) + photo_ion_nu_threshold_maxs = np.zeros(0, dtype=np.float64) + photo_ion_block_references = np.zeros(0, dtype=np.int64) + chi_bf = np.zeros((0, 0), dtype=np.float64) + x_sect = np.zeros(0, dtype=np.float64) + phot_nus = np.zeros(0, dtype=np.float64) + ff_opacity_factor = np.zeros(0, dtype=np.float64) + emissivities = np.zeros((0, 0), dtype=np.float64) + photo_ion_activation_idx = np.zeros(0, dtype=np.int64) + k_packet_idx = np.int64(-1) + + return OpacityStateNumba( + electron_densities, + t_electrons, + line_list_nu, + tau_sobolev, + transition_probabilities, + line2macro_level_upper, + macro_block_references, + transition_type, + destination_level_id, + transition_line_id, + bf_threshold_list_nu, + p_fb_deactivation, + photo_ion_nu_threshold_mins, + photo_ion_nu_threshold_maxs, + photo_ion_block_references, + chi_bf, + x_sect, + phot_nus, + ff_opacity_factor, + emissivities, + photo_ion_activation_idx, + k_packet_idx, + ) + + def opacity_state_initialize( plasma, line_interaction_type, @@ -258,7 +460,7 @@ def opacity_state_initialize( photo_ion_activation_idx = np.zeros(0, dtype=np.int64) k_packet_idx = np.int64(-1) - return OpacityState( + return OpacityStateNumba( electron_densities, t_electrons, line_list_nu, diff --git a/tardis/opacities/tests/conftest.py b/tardis/opacities/tests/conftest.py new file mode 100644 index 00000000000..af116184d6d --- /dev/null +++ b/tardis/opacities/tests/conftest.py @@ -0,0 +1,11 @@ +import pytest +from copy import deepcopy +from tardis.simulation import Simulation + + +@pytest.fixture(scope="module") +def nb_simulation_verysimple(config_verysimple, atomic_dataset): + atomic_data = deepcopy(atomic_dataset) + sim = Simulation.from_config(config_verysimple, atom_data=atomic_data) + sim.iterate(10) + return sim diff --git a/tardis/opacities/tests/test_opacity_solver.py b/tardis/opacities/tests/test_opacity_solver.py new file mode 100644 index 00000000000..a62be7134a2 --- /dev/null +++ b/tardis/opacities/tests/test_opacity_solver.py @@ -0,0 +1,67 @@ +import pytest +import numpy as np +import numpy.testing as npt +import pandas.testing as pdt +from tardis.opacities.opacity_solver import OpacitySolver +from tardis.opacities.opacity_state import OpacityState +from tardis.opacities.tau_sobolev import calculate_sobolev_line_opacity + + +@pytest.mark.parametrize( + "line_interaction_type,disable_line_scattering", + [ + ("scatter", False), + ("macroatom", False), + ("macroatom", True), + ("downbranch", False), + ("downbranch", True), + ], +) +def test_opacity_solver( + nb_simulation_verysimple, line_interaction_type, disable_line_scattering +): + + legacy_plasma = nb_simulation_verysimple.plasma + + opacity_solver = OpacitySolver( + line_interaction_type=line_interaction_type, + disable_line_scattering=disable_line_scattering, + ) + actual = opacity_solver.solve(legacy_plasma) + + pdt.assert_series_equal( + actual.electron_density, legacy_plasma.electron_densities + ) + pdt.assert_series_equal( + actual.line_list_nu, legacy_plasma.atomic_data.lines.nu + ) + if not disable_line_scattering: + pdt.assert_frame_equal(actual.tau_sobolev, legacy_plasma.tau_sobolevs) + if line_interaction_type == "scatter": + pass # TODO: Impliment once solver has proper settings + else: + macroatom_state = actual.macroatom_state + pdt.assert_frame_equal( + macroatom_state.transition_probabilities, + legacy_plasma.transition_probabilities, + ) + npt.assert_allclose( + macroatom_state.line2macro_level_upper, + legacy_plasma.atomic_data.lines_upper2macro_reference_idx, + ) + pdt.assert_series_equal( + macroatom_state.macro_block_references, + legacy_plasma.atomic_data.macro_atom_references["block_references"], + ) + pdt.assert_series_equal( + macroatom_state.transition_type, + legacy_plasma.atomic_data.macro_atom_data["transition_type"], + ) + pdt.assert_series_equal( + macroatom_state.destination_level_id, + legacy_plasma.atomic_data.macro_atom_data["destination_level_idx"], + ) + pdt.assert_series_equal( + macroatom_state.transition_line_id, + legacy_plasma.atomic_data.macro_atom_data["lines_idx"], + ) diff --git a/tardis/opacities/tests/test_opacity_state_numba.py b/tardis/opacities/tests/test_opacity_state_numba.py new file mode 100644 index 00000000000..6ac3a206089 --- /dev/null +++ b/tardis/opacities/tests/test_opacity_state_numba.py @@ -0,0 +1,83 @@ +import pytest +from tardis.opacities.opacity_state import opacity_state_to_numba +from tardis.opacities.opacity_solver import OpacitySolver +import numpy.testing as npt +import numpy as np + + +@pytest.mark.parametrize( + "line_interaction_type,sliced", + [ + ("scatter", False), + ("macroatom", False), + ("macroatom", True), + ("downbranch", False), + ("downbranch", True), + ], +) +def test_opacity_state_to_numba( + nb_simulation_verysimple, line_interaction_type, sliced +): + legacy_plasma = nb_simulation_verysimple.plasma + + opacity_solver = OpacitySolver( + line_interaction_type=line_interaction_type, + disable_line_scattering=False, + ) + opacity_state = opacity_solver.solve(legacy_plasma) + actual = opacity_state_to_numba(opacity_state, line_interaction_type) + + if sliced: + index = slice(2, 5) + actual = actual[index] + else: + index = ... + + npt.assert_allclose( + actual.electron_density, legacy_plasma.electron_densities.values[index] + ) + npt.assert_allclose( + actual.line_list_nu, legacy_plasma.atomic_data.lines.nu.values + ) + npt.assert_allclose( + actual.tau_sobolev, legacy_plasma.tau_sobolevs.values[:, index] + ) + if line_interaction_type == "scatter": + empty = np.zeros(1, dtype=np.int64) + npt.assert_allclose( + actual.transition_probabilities, np.zeros((1, 1), dtype=np.float64) + ) + npt.assert_allclose(actual.line2macro_level_upper, empty) + npt.assert_allclose(actual.macro_block_references, empty) + npt.assert_allclose(actual.transition_type, empty) + npt.assert_allclose(actual.destination_level_id, empty) + npt.assert_allclose(actual.transition_line_id, empty) + else: + npt.assert_allclose( + actual.transition_probabilities, + legacy_plasma.transition_probabilities.values[:, index], + ) + npt.assert_allclose( + actual.line2macro_level_upper, + legacy_plasma.atomic_data.lines_upper2macro_reference_idx, + ) + npt.assert_allclose( + actual.macro_block_references, + legacy_plasma.atomic_data.macro_atom_references[ + "block_references" + ].values, + ) + npt.assert_allclose( + actual.transition_type, + legacy_plasma.atomic_data.macro_atom_data["transition_type"].values, + ) + npt.assert_allclose( + actual.destination_level_id, + legacy_plasma.atomic_data.macro_atom_data[ + "destination_level_idx" + ].values, + ) + npt.assert_allclose( + actual.transition_line_id, + legacy_plasma.atomic_data.macro_atom_data["lines_idx"].values, + ) diff --git a/tardis/transport/montecarlo/base.py b/tardis/transport/montecarlo/base.py index af865836598..cd9e00c5b59 100644 --- a/tardis/transport/montecarlo/base.py +++ b/tardis/transport/montecarlo/base.py @@ -24,7 +24,7 @@ MonteCarloTransportState, ) from tardis.opacities.opacity_state import ( - opacity_state_initialize, + opacity_state_to_numba, ) from tardis.transport.montecarlo.packet_trackers import ( generate_rpacket_tracker_list, @@ -37,6 +37,8 @@ update_iterations_pbar, ) +from tardis.opacities.opacity_solver import OpacitySolver + logger = logging.getLogger(__name__) @@ -94,6 +96,11 @@ def __init__( mc_tracker.DEBUG_MODE = debug_packets mc_tracker.BUFFER = logger_buffer + self.opacity_solver = OpacitySolver( + self.line_interaction_type, + self.montecarlo_configuration.DISABLE_LINE_SCATTERING, + ) + def initialize_transport_state( self, simulation_state, @@ -112,24 +119,24 @@ def initialize_transport_state( ) geometry_state = simulation_state.geometry.to_numba() - opacity_state = opacity_state_initialize( - plasma, - self.line_interaction_type, - self.montecarlo_configuration.DISABLE_LINE_SCATTERING, + + opacity_state = self.opacity_solver.solve(plasma) + opacity_state_numba = opacity_state_to_numba( + opacity_state, self.opacity_solver.line_interaction_type ) - opacity_state = opacity_state[ + opacity_state_numba = opacity_state_numba[ simulation_state.geometry.v_inner_boundary_index : simulation_state.geometry.v_outer_boundary_index ] estimators = initialize_estimator_statistics( - opacity_state.tau_sobolev.shape, gamma_shape + opacity_state_numba.tau_sobolev.shape, gamma_shape ) transport_state = MonteCarloTransportState( packet_collection, estimators, geometry_state=geometry_state, - opacity_state=opacity_state, + opacity_state=opacity_state_numba, time_explosion=simulation_state.time_explosion, )