Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamma decay energy documentation #2866

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

CePowers
Copy link
Contributor

📝 Description

Type: 📝 documentation

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

📌 Resources

Examples, notebooks, and links to useful references.

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

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

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tardis-bot
Copy link
Contributor

tardis-bot commented Oct 28, 2024

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

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

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.

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.72%. Comparing base (fd4369f) to head (1f1fbeb).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2866      +/-   ##
==========================================
- Coverage   70.08%   69.72%   -0.36%     
==========================================
  Files         216      216              
  Lines       16034    16034              
==========================================
- Hits        11237    11180      -57     
- Misses       4797     4854      +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tardis-bot
Copy link
Contributor

*beep* *bop*

Hi, human.

The docs workflow has succeeded ✔️

Click here to see your results.

@tardis-bot
Copy link
Contributor

tardis-bot commented Oct 28, 2024

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

Significantly changed benchmarks:

All benchmarks:

Benchmarks that have stayed the same:

| Change   | Before [b95388b6] <master>   | After [36d52be7]    | Ratio   | Benchmark (Parameter)                                                                                                               |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
|          | 511±200ns                    | 611±100ns           | ~1.20   | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation                                |
|          | 2.50±0ms                     | 2.88±0.01ms         | ~1.15   | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter')                                     |
|          | 1.85±0.7μs                   | 2.05±0.9μs          | ~1.11   | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators       |
|          | 49.4±20μs                    | 39.5±20μs           | ~0.80   | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission                                         |
|          | 2.86±0.7μs                   | 3.14±0.4μs          | 1.10    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell                              |
|          | 2.68±0.4μs                   | 2.88±0.5μs          | 1.07    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket                                       |
|          | 1.15±0μs                     | 1.21±0μs            | 1.06    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary                |
|          | 1.36±0.4μs                   | 1.44±0.3μs          | 1.06    | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line                    |
|          | 2.34±0.4ms                   | 2.41±0.4ms          | 1.03    | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop                        |
|          | 3.60±0ms                     | 3.67±0ms            | 1.02    | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom')                                   |
|          | 43.1±30μs                    | 43.5±20μs           | 1.01    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter                                          |
|          | 712±0.3ns                    | 721±0.5ns           | 1.01    | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter                                       |
|          | 30.3±0.01μs                  | 30.7±0.01μs         | 1.01    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list                  |
|          | 61.1±0.2ms                   | 61.6±0.2ms          | 1.01    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe                  |
|          | 571±100ns                    | 571±200ns           | 1.00    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation                              |
|          | 2.07±0m                      | 2.07±0m             | 1.00    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions                                 |
|          | 1.63±0ms                     | 1.64±0ms            | 1.00    | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop                             |
|          | 39.9±0.1s                    | 39.3±0s             | 0.99    | run_tardis.BenchmarkRunTardis.time_run_tardis                                                                                       |
|          | 1.05±0m                      | 1.04±0m             | 0.99    | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking                                                                      |
|          | 207±0.3ns                    | 203±0.2ns           | 0.98    | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body                                       |
|          | 20.2±5μs                     | 19.8±4μs            | 0.98    | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
|          | 7.08±2μs                     | 6.72±1μs            | 0.95    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley                                    |
|          | 5.92±0.6μs                   | 5.59±0.9μs          | 0.94    | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket                                           |
|          | 591±100ns                    | 541±100ns           | 0.92    | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation                                      |

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

@Knights-Templars Knights-Templars marked this pull request as draft October 28, 2024 14:22
@CePowers CePowers marked this pull request as ready for review November 12, 2024 16:08
andrewfullard
andrewfullard previously approved these changes Nov 18, 2024
@Knights-Templars Knights-Templars enabled auto-merge (squash) November 18, 2024 15:12
@jvshields
Copy link
Contributor

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.

auto-merge was automatically disabled November 19, 2024 14:30

Head branch was pushed to by a user without write access

jvshields
jvshields previously approved these changes Nov 25, 2024
Copy link
Contributor

@jvshields jvshields left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to merge this, though if you want to make improve it by a little more, I had in mind with astropy units to make things more consistent by effectively checking units when you do the calculations you programmed. You're more or less bypassing that by using .value on most of the quantities you define, like in cell 10. Rather, if your units work out then you shouldn't have to strip them with .value.

@andrewfullard
Copy link
Contributor

Looks like you used milli-eV instead of mega-eV, which is a difference between meV and MeV in astropy units.

@@ -0,0 +1,160 @@
{
Copy link
Contributor

@jvshields jvshields Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reference at the end of the line seems broken.


Reply via ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants