Skip to content

Commit

Permalink
Renamed import as mc_logger to mc_tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvSondhi committed Jul 19, 2021
1 parent 91c1d91 commit 10ae886
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tardis/montecarlo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
configuration_initialize,
)
from tardis.montecarlo.montecarlo_numba import numba_config
from tardis.io.logger import montecarlo_tracking as mc_logger
from tardis.io.logger import montecarlo_tracking as mc_tracker

import numpy as np

Expand Down Expand Up @@ -135,8 +135,8 @@ def __init__(
self.virt_packet_initial_mus = np.ones(2) * -1.0

# set up logger based on config
mc_logger.DEBUG_MODE = debug_packets
mc_logger.BUFFER = logger_buffer
mc_tracker.DEBUG_MODE = debug_packets
mc_tracker.BUFFER = logger_buffer

if self.spectrum_method == "integrated":
self.optional_hdf_properties.append("spectrum_integrated")
Expand Down
8 changes: 4 additions & 4 deletions tardis/montecarlo/montecarlo_numba/single_packet_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
C_SPEED_OF_LIGHT = const.c.to("cm/s").value

from tardis.io.logger.montecarlo_tracking import log_decorator
from tardis.io.logger import montecarlo_tracking as mc_logger
from tardis.io.logger import montecarlo_tracking as mc_tracker

# @log_decorator
@njit
Expand Down Expand Up @@ -67,7 +67,7 @@ def single_packet_loop(
r_packet, vpacket_collection, numba_model, numba_plasma
)

if mc_logger.DEBUG_MODE:
if mc_tracker.DEBUG_MODE:
r_packet_track_nu = [r_packet.nu]
r_packet_track_mu = [r_packet.mu]
r_packet_track_r = [r_packet.r]
Expand Down Expand Up @@ -114,14 +114,14 @@ def single_packet_loop(
trace_vpacket_volley(
r_packet, vpacket_collection, numba_model, numba_plasma
)
if mc_logger.DEBUG_MODE:
if mc_tracker.DEBUG_MODE:
r_packet_track_nu.append(r_packet.nu)
r_packet_track_mu.append(r_packet.mu)
r_packet_track_r.append(r_packet.r)
r_packet_track_interaction.append(interaction_type)
r_packet_track_distance.append(distance)

if mc_logger.DEBUG_MODE:
if mc_tracker.DEBUG_MODE:
return (
r_packet_track_nu,
r_packet_track_mu,
Expand Down

0 comments on commit 10ae886

Please sign in to comment.