Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cg-laser committed Nov 22, 2024
1 parent 60964b8 commit 1efa01a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions NuRadioReco/modules/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from _deprecated import *
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from NuRadioReco.modules.base.module import register_run
import numpy as np
import logging
import warnings
from NuRadioReco.utilities import units

logger = logging.getLogger('NuRadioReco.triggerTimeAdjuster')
Expand All @@ -18,9 +19,9 @@ def __init__(self, log_level=logging.NOTSET):
logger.setLevel(log_level)
self.__sampling_rate_warning_issued = False
self.begin()
logger.warning(f"triggerTimeAdjuster is deprecated and will be removed soon. In most cased you can safely delete the application\
of this module as it is automatically applied in NuRadioMC simulations. If you really need to use this module, \
please use the channelReadoutWindowCutter module instead.")
warnings.warn("triggerTimeAdjuster is deprecated and will be removed soon. In most cased you can safely delete the application "
"of this module as it is automatically applied in NuRadioMC simulations. If you really need to use this module, "
"please use the channelReadoutWindowCutter module instead.", DeprecationWarning)

def begin(self):
pass
Expand Down Expand Up @@ -79,9 +80,9 @@ def run(self, event, station, detector, mode='sim_to_data'):
If the ``trigger_name`` was specified in the ``begin`` function,
only this trigger is considered.
"""
logger.warning(f"triggerTimeAdjuster is deprecated and will be removed soon. In most cased you can safely delete the application\
of this module as it is automatically applied in NuRadioMC simulations. If you really need to use this module, \
please use the channelReadoutWindowCutter module instead.")
warnings.warn("triggerTimeAdjuster is deprecated and will be removed soon. In most cased you can safely delete the application "
"of this module as it is automatically applied in NuRadioMC simulations. If you really need to use this module, "
"please use the channelReadoutWindowCutter module instead.", DeprecationWarning)
counter = 0
for i, (name, instance, kwargs) in enumerate(event.iter_modules(station.get_id())):
if name == 'triggerTimeAdjuster':
Expand Down
4 changes: 2 additions & 2 deletions NuRadioReco/modules/channelLengthAdjuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class channelLengthAdjuster:
def __init__(self):
self.number_of_samples = None
self.offset = None
logger.warning("In most cases it is advisable to run a trigger module and use the channelReadoutWindowCutter module to cut the traces to the readout window \
instead of this simple module.")
logger.warning("In most cases it is advisable to run a trigger module and use the channelReadoutWindowCutter module to cut the traces to the readout window "
"instead of this simple module.")
self.begin(())

def begin(self, number_of_samples=256, offset=50):
Expand Down

0 comments on commit 1efa01a

Please sign in to comment.