From a0bfc08962ba8275d1bbc9765246473f64ea0753 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Wed, 9 Jun 2021 03:13:19 +0100 Subject: [PATCH] Working on the last pieces of the probability. There is an issue with the amt of M1 --- binarycpython/utils/functions.py | 2 +- binarycpython/utils/grid.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/binarycpython/utils/functions.py b/binarycpython/utils/functions.py index a8b54fa58..6678b05e4 100644 --- a/binarycpython/utils/functions.py +++ b/binarycpython/utils/functions.py @@ -207,7 +207,7 @@ def get_moe_distefano_dataset(options): if not options.get("file", None): print("Using the default Moe and de Stefano 2017 datafile") - json_data = moe_distefano_data.moe_distefano_2017_data + json_data = copy.deepcopy(moe_distefano_data.moe_distefano_2017_data) else: if not os.path.isfile(options["file"]): diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index 5c21d811c..7e7070077 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -1641,6 +1641,11 @@ class Population: # Clean up the interpolator functions self._clean_interpolators() + # Also remove the rest of the contents + keys_moecache = list(Moecache.keys()) + for key in keys_moecache: + del Moecache[key] + ################################################### # Gridcode functions # @@ -3158,6 +3163,7 @@ class Population: json_data = get_moe_distefano_dataset(options) # entry of log10M1 is a list containing 1 dict. We can take the dict out of the list + json_data["log10M1"] = json_data["log10M1"][0] # Get all the masses @@ -3775,7 +3781,3 @@ eccentricity3=0 for key in interpolator_keys: Moecache[key].destroy() del Moecache[key] - - - - -- GitLab