tardis-sn / stardis

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

Improve broadening range treatment #161

Closed jvshields closed 10 months ago

jvshields commented 10 months ago

Broadening range restrictions (the space around a line where the line was considered as adding to opacity) were previously non-functional. This meant that all of our simulations, especially the broader ones, scaled highly non-linearly with the wavelength range because all lines were considered as adding to all opacities at all wavelengths or frequencies.

This pr makes that broadening range restriction functional and should create a large speedup for broad wavelength simulations.

The pr also includes a bit of cleaning to make the function generally neater and remove a couple of non-functional calculations (a lot of resetting indices of dataframes that didn't make any functional change).

codecov[bot] commented 10 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (2e61ddb) 67.55% compared to head (85f17b6) 68.15%. Report is 1 commits behind head on main.

Files Patch % Lines
...adiation_field/opacities/opacities_solvers/base.py 81.81% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #161 +/- ## ========================================== + Coverage 67.55% 68.15% +0.59% ========================================== Files 30 31 +1 Lines 1159 1165 +6 ========================================== + Hits 783 794 +11 + Misses 376 371 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.