tardis-sn / stardis

TARDIS stellar radiative transfer
https://tardis-sn.github.io/stardis/
11 stars 15 forks source link

Restructure: Add radiation field #123

Closed jvshields closed 1 year ago

jvshields commented 1 year ago

:pencil: Description

Type: :beetle: bugfix | :rocket: feature | :biohazard: breaking change | :vertical_traffic_light: testing | :memo: documentation | :roller_coaster: infrastructure

The last major branch of the Stardis restructure. This PR restructures everything to do with radiation, creating both a RadiationField class and an Opacities class that carry along the relevant quantities, and then hooking those up throughout the code.

Other than moving files around, this PR should contain no functional changes to the code.

:pushpin: Resources

Examples, notebooks, and links to useful references.

:vertical_traffic_light: Testing

How did you test these changes?

:ballot_box_with_check: Checklist

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

tardis-bot commented 1 year ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing main (fce755ae749afabdcd988041240eb0d7fbe5d7a6) and the latest commit (1c723f23b957e79192fe5cbfb1c201ab2dbf5eaa). Here are the logs produced by ASV. Results can also be downloaded as artifacts here. Significantly changed benchmarks:

```diff ```

All benchmarks:

```diff All benchmarks: before after ratio [fce755ae] [1c723f23] failed failed n/a run_stardis.BenchmarkStardis.time_calc_alpha failed failed n/a run_stardis.BenchmarkStardis.time_raytrace failed failed n/a run_stardis.BenchmarkStardis.time_run_stardis ```
codecov[bot] commented 1 year ago

Codecov Report

Merging #123 (a7aff07) into main (fce755a) will decrease coverage by 0.50%. Report is 7 commits behind head on main. The diff coverage is 66.66%.

:exclamation: Current head a7aff07 differs from pull request most recent head 1c723f2. Consider uploading reports for the commit 1c723f2 to get more accurate results

@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
- Coverage   76.62%   76.13%   -0.50%     
==========================================
  Files          21       27       +6     
  Lines         646      771     +125     
==========================================
+ Hits          495      587      +92     
- Misses        151      184      +33     
Files Changed Coverage Δ
...adiation_field/opacities/opacities_solvers/util.py 78.72% <ø> (ø)
...diation_field/opacities/opacities_solvers/voigt.py 25.00% <ø> (ø)
...is/radiation_field/radiation_field_solvers/base.py 32.60% <42.85%> (ø)
...on_field/opacities/opacities_solvers/broadening.py 50.00% <44.44%> (ø)
...radiation_field/opacities/tests/test_broadening.py 61.11% <61.11%> (ø)
...rdis/radiation_field/source_functions/blackbody.py 72.72% <72.72%> (ø)
stardis/base.py 100.00% <100.00%> (ø)
stardis/radiation_field/__init__.py 100.00% <100.00%> (ø)
stardis/radiation_field/base.py 100.00% <100.00%> (ø)
stardis/radiation_field/opacities/__init__.py 100.00% <100.00%> (ø)
... and 5 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jvshields commented 1 year ago

Merging to get the code in before I disappear for awhile. If this breaks things we'll immediately revert.