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

Fix Virtual Packet Logging Bug #1846

Merged
merged 2 commits into from
Jan 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tardis/montecarlo/montecarlo_numba/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def montecarlo_radial1d(
runner.spectrum_frequency.value,
number_of_vpackets,
packet_seeds,
montecarlo_configuration.VPACKET_LOGGING,
iteration=iteration,
show_progress_bars=show_progress_bars,
no_of_packets=no_of_packets,
Expand Down Expand Up @@ -134,6 +135,7 @@ def montecarlo_main_loop(
spectrum_frequency,
number_of_vpackets,
packet_seeds,
virtual_packet_logging,
iteration,
show_progress_bars,
no_of_packets,
Expand All @@ -153,6 +155,8 @@ def montecarlo_main_loop(
number_of_vpackets : int
VPackets released per interaction
packet_seeds : numpy.array
virtual_packet_logging : bool
Option to enable virtual packet logging.
"""
output_nus = np.empty_like(packet_collection.packets_output_nu)
last_interaction_types = (
Expand Down Expand Up @@ -262,7 +266,7 @@ def montecarlo_main_loop(
continue
v_packets_energy_hist[idx] += vpackets_energy[j]

if montecarlo_configuration.VPACKET_LOGGING:
if virtual_packet_logging:
for vpacket_collection in vpacket_collections:
vpackets_nu = vpacket_collection.nus[: vpacket_collection.idx]
vpackets_energy = vpacket_collection.energies[
Expand Down