Skip to content

Commit

Permalink
Renamed montecarlo_logger.py to montecarlo_tracking.py (#1740)
Browse files Browse the repository at this point in the history
* Renamed montecarlo_logger to montecarlo_tracking

* Changed the import to montecarlo_tracking

* Renamed import as mc_logger to mc_tracker
  • Loading branch information
DhruvSondhi authored Jul 26, 2021
1 parent 8903c13 commit 313f131
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
File renamed without changes.
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_logger 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
10 changes: 5 additions & 5 deletions tardis/montecarlo/montecarlo_numba/single_packet_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

C_SPEED_OF_LIGHT = const.c.to("cm/s").value

from tardis.io.logger.montecarlo_logger import log_decorator
from tardis.io.logger import montecarlo_logger as mc_logger
from tardis.io.logger.montecarlo_tracking import log_decorator
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 313f131

Please sign in to comment.