diff --git a/binarycpython/utils/functions.py b/binarycpython/utils/functions.py index a8b54fa5865e6d6e40fa5ab8d56d7dcfc1782a01..6678b05e4f51f792eea6e33ffe2e21337a74e03c 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 5c21d811c4d4b8edf72dafddcc31ff2ef4da486c..7e7070077302d71814dba7eea8d02b1ee19b96be 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] - - - -