Skip to content

Commit

Permalink
Loggerify.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed May 9, 2020
1 parent 77cf54f commit 128f0b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions flarestack/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import numpy as np
import copy
import logging
from numpy.lib.recfunctions import append_fields, drop_fields
from flarestack.core.injector import MCInjector, EffectiveAreaInjector
from flarestack.utils.make_SoB_splines import make_background_spline
Expand Down Expand Up @@ -33,9 +34,9 @@ def get_current(self):
if self.current is not None:
return self.datasets[self.current]
else:
print("Warning: no file listed as current.")
logging.warning("Warning: no file listed as current.")
key = sorted(list(self.datasets.keys()))
print("Using key {0} out of {1}".format(
logging.warning("Using key {0} out of {1}".format(
key, self.datasets.keys())
)
return self.datasets[key]
Expand Down Expand Up @@ -82,6 +83,8 @@ def get_seasons(self, *args, **kwargs):

for season in cd.values():
season.set_subselection_fraction(subselection_fraction)


return cd

def get_single_season(self, name):
Expand Down

0 comments on commit 128f0b9

Please sign in to comment.