tardis-sn / tardis

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

Update line_interaction_in_r after moving the packet #2811

Closed Sumit112192 closed 2 days ago

Sumit112192 commented 2 weeks ago

:pencil: Description

Type: :beetle: bugfix

The line_interaction_in_r was being updated before the r_packet was moved.

tardis-bot commented 2 weeks ago

*beep* *bop* Hi human, I ran ruff on the latest commit (5568ff05ed40ba8c67bed786fcf1ef6931a56997). 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 1 RET508 [ ] Unnecessary `elif` after `break` statement ```

Complete output(might be large):

```diff tardis/transport/montecarlo/interaction.py:1:1: I001 [*] Import block is un-sorted or un-formatted tardis/transport/montecarlo/r_packet_transport.py:115:13: RET508 Unnecessary `elif` after `break` statement tardis/transport/montecarlo/tests/test_rpacket_last_interaction_tracker.py:1:1: I001 [*] Import block is un-sorted or un-formatted Found 3 errors. [*] 2 fixable with the `--fix` option. ```
Sumit112192 commented 2 weeks ago

Just a minor change. PR https://github.com/tardis-sn/tardis-regression-data/pull/23 for the regression data update.

Sumit112192 commented 2 weeks ago

@andrewfullard @wkerzendorf Please review.

tardis-bot commented 2 weeks ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing master (260207cb7cee6829390d77fbf48de53843818f09) and the latest commit (5568ff05ed40ba8c67bed786fcf1ef6931a56997). 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 [260207cb] | After [5568ff05] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 2.62±0.7μs | 2.99±0.3μs | ~1.14 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 5.77±0.7μs | 6.50±1μs | ~1.13 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 51.6±20μs | 43.9±20μs | ~0.85 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | 53.6±20μs | 43.8±20μs | ~0.82 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 25.0±7μs | 26.7±7μs | 1.07 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 601±100ns | 621±200ns | 1.03 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 3.37±0.02ms | 3.48±0.01ms | 1.03 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 2.53±0.01ms | 2.61±0.01ms | 1.03 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 2.49±0.4ms | 2.56±0.4ms | 1.03 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 1.43±0.4μs | 1.46±0.4μs | 1.02 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 521±100ns | 521±200ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 39.4±0.02s | 39.5±0.07s | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 2.07±0m | 2.07±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 208±0.04ns | 207±0.2ns | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 1.66±0ms | 1.67±0.01ms | 1.00 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | 1.05±0m | 1.04±0m | 0.99 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 743±5ns | 735±0.1ns | 0.99 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 571±100ns | 561±100ns | 0.98 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 31.4±0.08μs | 30.7±0.04μs | 0.98 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 65.4±0.1ms | 62.0±0.01ms | 0.95 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 1.26±0μs | 1.18±0.01μs | 0.94 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 7.88±2μs | 7.38±2μs | 0.94 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 3.50±0.4μs | 3.25±0.5μs | 0.93 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 2.21±3μs | 2.01±2μs | 0.91 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | ```

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

andrewfullard commented 4 days ago

Test failures are now the "expected" ones related to #2808

Sumit112192 commented 4 days ago

Since liv plot data is merged. Other PRs tests would fail now.