From 03118a2493acc33ab31b3beb820325fea7da1ab7 Mon Sep 17 00:00:00 2001 From: Heloise Stevance Date: Thu, 25 May 2023 14:50:45 +0100 Subject: [PATCH 1/2] added a comment --- hoki/sedfitting/kvn.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hoki/sedfitting/kvn.py b/hoki/sedfitting/kvn.py index 9049d4b..7d6be05 100644 --- a/hoki/sedfitting/kvn.py +++ b/hoki/sedfitting/kvn.py @@ -289,6 +289,7 @@ def make_templates(self, # In the refactor this should be split into several fun self.log_age_cols = log_age_cols + ### TODO: put this in a function and make bpass_list_spectra a cached property? (Make binray and single priv.att) # Making list of relevant spectra files if binary and single: self.bpass_list_spectra = glob.glob(self.model_path + 'spectra*') @@ -304,6 +305,7 @@ def make_templates(self, # In the refactor this should be split into several fun self.bpass_list_spectra.sort() + ### TODO: also make this a cached property (z_list will need to be a private attribute we can use in the func) # Allow user to select a list of metallicities? if z_list is not None: self.z_list=z_list From 00d862cb3dce3311a76f07c264d4fd769c9e0e22 Mon Sep 17 00:00:00 2001 From: Heloise Stevance Date: Fri, 9 Jun 2023 16:36:41 +0100 Subject: [PATCH 2/2] added an assert statement in cmd make to check that the last character opf MODELS_PATH has a slash --- hoki/cmd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hoki/cmd.py b/hoki/cmd.py index adb92cd..c8f9469 100644 --- a/hoki/cmd.py +++ b/hoki/cmd.py @@ -138,6 +138,9 @@ def make(self, mag_filter, col_filters): f"If you've just done that and it looks like it didn't work, try to restart " \ f"your notebook or terminal ;). " + assert MODELS_PATH[-1]=="/" or MODELS_PATH[-1]=='\\', f"DEBUGGING ASSISTANT: Directory MODELS_PATH = {MODELS_PATH}"\ + f"does not end with '/' or '\\' " + self.path = MODELS_PATH