From 0e6980b0d10e0b0937db88b3d2cd80818201b788 Mon Sep 17 00:00:00 2001
From: David Hendriks <davidhendriks93@gmail.com>
Date: Mon, 26 Jul 2021 19:17:14 +0100
Subject: [PATCH] fixing bugs of moe distefano

---
 binarycpython/utils/grid.py | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py
index 466d99aab..1f8f781c2 100644
--- a/binarycpython/utils/grid.py
+++ b/binarycpython/utils/grid.py
@@ -126,7 +126,7 @@ class Population:
         self.custom_options = {}
 
         # Load M&s options
-        self.grid_options['m&s_options'] = copy.deepcopy(moe_distefano_default_options)
+        self.grid_options['m&s_options'] = copy.deepcopy(moe_di_stefano_default_options)
 
         # Write M&S options to a file
         os.makedirs(os.path.join(self.grid_options["tmp_dir"], "moe_distefano"), exist_ok=True)
@@ -3265,7 +3265,7 @@ class Population:
             with open(os.path.join(os.path.join(self.grid_options["tmp_dir"], "moe_distefano"), "moeopts.dat"), "w") as f:
                 f.write(json.dumps(self.grid_options['m&s_options'], indent=4))
 
-    def _load_moe_di stefano_data(self):
+    def _load_moe_di_stefano_data(self):
         """
         Function to load the moe & di stefano data
         """
@@ -3273,7 +3273,7 @@ class Population:
         # Only if the grid is loaded and Moecache contains information
         if (not self.grid_options['_loaded_ms_data']) and not Moecache:
             # Load the JSON data
-            json_data = get_moe_distefano_dataset(self.grid_options['m&s_options'], verbosity=self.grid_options['verbosity'])
+            json_data = get_moe_di_stefano_dataset(self.grid_options['m&s_options'], verbosity=self.grid_options['verbosity'])
 
             # 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]
@@ -3875,9 +3875,7 @@ eccentricity3=0
         # ] += "; self.grid_options['m&s_ensemble_options'] = {}".format(o)
 
         verbose_print(
-            "\tMoe_di_Stefano_2017: Added final call to the pdf function".format(
-                max_multiplicity
-            ),
+            "\tMoe_di_Stefano_2017: Added final call to the pdf function",
             self.grid_options["verbosity"],
             _MS_VERBOSITY_LEVEL,
         )
@@ -3896,13 +3894,13 @@ eccentricity3=0
         """
 
         # Set the user input
-        self.set_moe_distefano_settings(options=options)
+        self.set_moe_di_stefano_settings(options=options)
 
         # Load the data
-        self._load_moe_distefano_data()
+        self._load_moe_di_stefano_data()
 
         # construct the grid here
-        self._set_moe_distefano_distributions()
+        self._set_moe_di_stefano_distributions()
 
     def _clean_interpolators(self):
         """
@@ -3987,7 +3985,7 @@ eccentricity3=0
                 )
 
                 # Load the data
-                self._load_moe_distefano_data()
+                self._load_moe_di_stefano_data()
 
             # record the prev value
             prev_M1_value_ms = self.grid_options['m&s_options'].get('M_1', None)
-- 
GitLab