tardis-sn / tardis

TARDIS - Temperature And Radiative Diffusion In Supernovae
https://tardis-sn.github.io/tardis
204 stars 406 forks source link

Gamma decay energy documentation #2866

Open CePowers opened 3 weeks ago

CePowers commented 3 weeks ago

:pencil: Description

Type: :memo: documentation

Created a new file to explain how much energy comes from the radioactive decay that produces gamma rays.

: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.

review-notebook-app[bot] commented 3 weeks ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

tardis-bot commented 3 weeks ago

*beep* *bop* Hi human, I ran ruff on the latest commit (15cfb8c04038aa151101ba81af45dd17d68bea38). Here are the outputs produced. Results can also be downloaded as artifacts here. Summarised output:

```diff 11 W191 [ ] Indentation contains tabs 2 E999 [ ] SyntaxError: Expected a statement 1 I001 [*] Import block is un-sorted or un-formatted 1 W292 [*] No newline at end of file ```

Complete output(might be large):

```diff docs/physics/tardisgamma/decayenergy.ipynb:cell 2:1:1: I001 [*] Import block is un-sorted or un-formatted docs/physics/tardisgamma/index.rst:1:1: E999 SyntaxError: Expected an expression docs/physics/tardisgamma/index.rst:13:16: W292 [*] No newline at end of file docs/tardis.bib:1:1: E999 SyntaxError: Expected a statement docs/tardis.bib:308:1: W191 Indentation contains tabs docs/tardis.bib:309:1: W191 Indentation contains tabs docs/tardis.bib:310:1: W191 Indentation contains tabs docs/tardis.bib:311:1: W191 Indentation contains tabs docs/tardis.bib:312:1: W191 Indentation contains tabs docs/tardis.bib:313:1: W191 Indentation contains tabs docs/tardis.bib:314:1: W191 Indentation contains tabs docs/tardis.bib:315:1: W191 Indentation contains tabs docs/tardis.bib:316:1: W191 Indentation contains tabs docs/tardis.bib:317:1: W191 Indentation contains tabs docs/tardis.bib:318:1: W191 Indentation contains tabs Found 15 errors. [*] 2 fixable with the `--fix` option. ```
codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.87%. Comparing base (6ee870e) to head (15cfb8c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2866 +/- ## ========================================== - Coverage 70.24% 69.87% -0.38% ========================================== Files 214 214 Lines 15981 15981 ========================================== - Hits 11226 11166 -60 - Misses 4755 4815 +60 ```

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


🚨 Try these New Features:

tardis-bot commented 3 weeks ago

*beep* *bop*

Hi, human.

The docs workflow has succeeded :heavy_check_mark:

Click here to see your results.

tardis-bot commented 3 weeks ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing master (6ee870e0d55719d091076caa07a2217a750129a7) and the latest commit (15cfb8c04038aa151101ba81af45dd17d68bea38). Here are the logs produced by ASV. Results can also be downloaded as artifacts here.

Significantly changed benchmarks:

```diff ```

All benchmarks:

```diff Benchmarks that have stayed the same: | Change | Before [6ee870e0] | After [15cfb8c0] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 481±100ns | 601±80ns | ~1.25 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 2.68±0ms | 3.12±0.05ms | ~1.16 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 3.53±0.01ms | 4.07±0.04ms | ~1.15 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 6.59±1μs | 5.68±0.6μs | ~0.86 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 1.68±0.3μs | 1.38±0.5μs | ~0.82 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 2.48±2μs | 1.98±1μs | ~0.80 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 70.2±50μs | 42.4±20μs | ~0.60 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | 23.3±6μs | 25.6±7μs | 1.10 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 531±100ns | 561±100ns | 1.06 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 511±200ns | 531±200ns | 1.04 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 39.3±0.07s | 40.9±0.02s | 1.04 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 32.0±0.03μs | 33.4±0.03μs | 1.04 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 730±0.4ns | 755±0.5ns | 1.03 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 46.3±40μs | 47.1±30μs | 1.02 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 1.62±0.01ms | 1.65±0.01ms | 1.02 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | 7.17±1μs | 7.31±1μs | 1.02 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 1.05±0m | 1.06±0m | 1.01 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 205±0.2ns | 206±0.2ns | 1.01 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 2.08±0m | 2.07±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 1.20±0μs | 1.20±0μs | 1.00 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 2.94±0.7μs | 2.91±0.6μs | 0.99 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 66.5±0.3ms | 64.5±0.1ms | 0.97 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 2.59±0.4ms | 2.52±0.5ms | 0.97 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 3.43±0.7μs | 3.33±0.5μs | 0.97 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | ```

If you want to see the graph of the results, you can check it here

jvshields commented 4 days ago

I think the content of the notebook is good, but I would strongly encourage doing the calculations with astropy units, rather than just floats and stating what units the numbers are in in plain text.