Skip to content

Commit

Permalink
Update pickle import statement to lowercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed Nov 28, 2019
1 parent c22e349 commit aff1750
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flarestack/core/unblinding.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from flarestack.core.time_pdf import TimePDF
from flarestack.shared import name_pickle_output_dir, plot_output_dir, \
analysis_pickle_path, limit_output_path
import pickle as Pickle
import pickle
from flarestack.core.ts_distributions import plot_background_ts_distribution
import matplotlib.pyplot as plt
from flarestack.utils.catalogue_loader import load_catalogue
Expand Down Expand Up @@ -157,7 +157,7 @@ def calculate_upper_limits(self):
new_path = self.unblind_dict["background_ts"] + subdir + "/"

with open(analysis_pickle_path(new_path), "r") as f:
mh_dict = Pickle.load(f)
mh_dict = pickle.load(f)
e_pdf_dict = mh_dict["inj_dict"]["injection_sig_energy_pdf"]

rh = ResultsHandler(self.unblind_dict)
Expand Down Expand Up @@ -237,7 +237,7 @@ def calculate_upper_limits(self):
}

with open(self.limit_path, "wb") as f:
Pickle.dump(res_dict, f)
pickle.dump(res_dict, f)

except OSError:
logging.warning("Unable to set limits. No TS distributions found.")
Expand All @@ -256,7 +256,7 @@ def compare_to_background_TS(self):

with open(merged_pkl) as mp:

merged_data = Pickle.load(mp)
merged_data = pickle.load(mp)

ts_array += list(merged_data["TS"])

Expand Down

0 comments on commit aff1750

Please sign in to comment.