tardis-sn / tardis

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

Gammaray packet sampling documentation #2825

Closed CePowers closed 1 month ago

CePowers commented 2 months ago

:pencil: Description

Type: :memo: documentation

I created a new file to start the packet sampling portion of the gamma ray documentation and added some initial information.

: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 2 months ago

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

```diff 2 I001 [*] Import block is un-sorted or un-formatted 2 E999 [ ] SyntaxError: Expected an expression 1 W291 [*] Trailing whitespace 1 F401 [*] `tardis.visualization.shell_info_from_hdf` imported but unused ```

Complete output(might be large):

```diff docs/io/visualization/how_to_generating_widgets.ipynb:cell 5:1:1: I001 [*] Import block is un-sorted or un-formatted docs/io/visualization/how_to_generating_widgets.ipynb:cell 5:3:5: F401 [*] `tardis.visualization.shell_info_from_hdf` imported but unused docs/physics/tardisgamma/gammaraypacketinitialization.rst:1:1: E999 SyntaxError: Expected an expression docs/physics/tardisgamma/packetsampling.rst:1:8: E999 SyntaxError: Simple statements must be separated by newlines or semicolons docs/physics/tardisgamma/packetsampling.rst:9:85: W291 [*] Trailing whitespace tardis/visualization/widgets/util.py:3:1: I001 [*] Import block is un-sorted or un-formatted Found 6 errors. [*] 4 fixable with the `--fix` option. ```
tardis-bot commented 2 months ago

*beep* *bop*

Hi, human.

The docs workflow has failed :x:

Click here to see the build log.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 72.24%. Comparing base (62395d3) to head (ad84d8e). Report is 15 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2825 +/- ## ========================================== + Coverage 70.99% 72.24% +1.25% ========================================== Files 209 209 Lines 15650 17225 +1575 ========================================== + Hits 11111 12445 +1334 - Misses 4539 4780 +241 ```

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

tardis-bot commented 2 months ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing master (71aad198a31392cf2b12ba1faf03667a25886952) and the latest commit (ad84d8e995e84613c14bd438e3113e40161059af). 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 [3b6084f2] | After [ad84d8e9] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 46.3±30μs | 53.8±30μs | ~1.16 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 3.37±0.6μs | 3.73±0.3μs | ~1.11 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 42.3±30μs | 46.5±20μs | ~1.10 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | 601±200ns | 541±200ns | ~0.90 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 3.33±0.04ms | 2.79±0.01ms | ~0.84 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 39.0±4μs | 31.7±0.1μs | ~0.81 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 2.51±2μs | 1.95±1μs | ~0.78 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 32.3±10μs | 24.7±7μs | ~0.76 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 7.51±1μs | 8.08±2μs | 1.08 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 6.38±0.9μs | 6.68±1μs | 1.05 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 3.33±0.4μs | 3.44±0.4μs | 1.03 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 37.2±0.03s | 38.1±0.02s | 1.02 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 1.02±0m | 1.04±0m | 1.02 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 1.61±0.3μs | 1.63±0.3μs | 1.01 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 591±200ns | 591±200ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 205±0.1ns | 206±0.4ns | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 3.89±0.03ms | 3.86±0.06ms | 0.99 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 2.11±0m | 2.09±0m | 0.99 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 2.68±0.4ms | 2.66±0.4ms | 0.99 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 542±200ns | 531±100ns | 0.98 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 66.2±0.07ms | 64.9±0.6ms | 0.98 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 751±0.9ns | 724±0.9ns | 0.96 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 1.25±0μs | 1.18±0.01μs | 0.95 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 1.83±0.1ms | 1.73±0.02ms | 0.94 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | ```

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

CePowers commented 1 month ago

This pull request is built on a previous branch that I no longer have access to after a fresh installation of tardis. I will create a new pull request on a new branch.