Skip to content

Commit

Permalink
Fix frame transformations of continuum opacity (#2347)
Browse files Browse the repository at this point in the history
  • Loading branch information
chvogl authored Jul 7, 2023
1 parent 0896a43 commit d9b2165
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tardis/montecarlo/montecarlo_numba/single_packet_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ def single_packet_loop(
numba_plasma, comov_nu, r_packet.current_shell_id
)
chi_continuum = chi_e + chi_bf_tot + chi_ff

escat_prob = chi_e / chi_continuum # probability of e-scatter
if montecarlo_configuration.full_relativity:
chi_continuum *= doppler_factor
distance, interaction_type, delta_shell = trace_packet(
r_packet,
numba_radial_1d_geometry,
Expand All @@ -129,6 +132,8 @@ def single_packet_loop(
else:
escat_prob = 1.0
chi_continuum = chi_e
if montecarlo_configuration.full_relativity:
chi_continuum *= doppler_factor
distance, interaction_type, delta_shell = trace_packet(
r_packet,
numba_radial_1d_geometry,
Expand Down
3 changes: 3 additions & 0 deletions tardis/montecarlo/montecarlo_numba/vpacket.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ def trace_vpacket_within_shell(
else:
chi_continuum = chi_e

if montecarlo_configuration.full_relativity:
chi_continuum *= doppler_factor

tau_continuum = chi_continuum * distance_boundary
tau_trace_combined = tau_continuum

Expand Down

0 comments on commit d9b2165

Please sign in to comment.