From a56cd411af1d132569e1afe5cbd4ee1be2195ed0 Mon Sep 17 00:00:00 2001 From: Dhruv Sondhi Date: Mon, 19 Jul 2021 20:31:01 +0530 Subject: [PATCH] Renamed import as mc_logger to mc_tracker --- tardis/montecarlo/base.py | 6 +++--- tardis/montecarlo/montecarlo_numba/single_packet_loop.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tardis/montecarlo/base.py b/tardis/montecarlo/base.py index 3e884c79995..9ab1fbada27 100644 --- a/tardis/montecarlo/base.py +++ b/tardis/montecarlo/base.py @@ -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 @@ -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") diff --git a/tardis/montecarlo/montecarlo_numba/single_packet_loop.py b/tardis/montecarlo/montecarlo_numba/single_packet_loop.py index 4b351383762..c3d105e1d82 100644 --- a/tardis/montecarlo/montecarlo_numba/single_packet_loop.py +++ b/tardis/montecarlo/montecarlo_numba/single_packet_loop.py @@ -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 @@ -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] @@ -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,