From 18108dad93b272a990e2c6d2ac7bd44f4d2f6fd7 Mon Sep 17 00:00:00 2001 From: Tamim Fatahi Date: Thu, 29 Jul 2021 17:04:03 -0700 Subject: [PATCH 1/3] Adding in planet scraper. --- exotic/exotic_gui.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/exotic/exotic_gui.py b/exotic/exotic_gui.py index 83caba9b..8db6603d 100644 --- a/exotic/exotic_gui.py +++ b/exotic/exotic_gui.py @@ -947,7 +947,16 @@ def save_input(): input_data['sName'] = star_entry.get() input_data['pName'] = planet_entry.get() nea_obj = NASAExoplanetArchive(planet=input_data['pName']) - input_data['pName'], CandidatePlanetBool, pDict = nea_obj.planet_info() + if not os.path.exists('pl_names.json') or time.time() - os.path.getmtime('pl_names.json') > 2592000: + nea_obj.planet_names(filename="pl_names.json") + if os.path.exists('pl_names.json'): + with open("pl_names.json", "r") as f: + planets = json.load(f) + for key, value in planets.items(): + if input_data['pName'].lower().replace(' ', '').replace('-', '') == key: + input_data['pName'] = value + break + input_data['pName'], CandidatePlanetBool, pDict = nea_obj.planet_info(planet=input_data['pName']) for key in pDict: input_data[key] = pDict[key] root.destroy() @@ -1162,7 +1171,6 @@ def save_input(): "Observing Notes": input_data['obsnotes'], } - elif obsinfo.get() == 'inits': with open(input_data['inits_dir'], "r") as confirmed: original_inits = json.load(confirmed) From 19568d6615ebb69e301330146bea35713a92631b Mon Sep 17 00:00:00 2001 From: Tamim Fatahi Date: Thu, 29 Jul 2021 17:08:57 -0700 Subject: [PATCH 2/3] Adding additional patch --- exotic/inputs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exotic/inputs.py b/exotic/inputs.py index 31344499..6810517c 100644 --- a/exotic/inputs.py +++ b/exotic/inputs.py @@ -134,7 +134,8 @@ def comp_params(self, init_file, planet_dict): user_info = { 'images': 'Directory with FITS files', 'save': 'Directory to Save Plots', 'flats': 'Directory of Flats', 'darks': 'Directory of Darks', 'biases': 'Directory of Biases', - 'aavso_num': 'AAVSO Observer Code (N/A if none)', 'second_obs': 'Secondary Observer Codes (N/A if none)', + 'aavso_num': ('AAVSO Observer Code (N/A if none)', 'AAVSO Observer Code (blank if none)'), + 'second_obs': ('Secondary Observer Codes (N/A if none)', 'Secondary Observer Codes (blank if none)'), 'date': 'Observation date', 'lat': 'Obs. Latitude', 'long': 'Obs. Longitude', 'elev': ('Obs. Elevation (meters)', 'Obs. Elevation (meters; Note: leave blank if unknown)'), 'camera': 'Camera Type (CCD or DSLR)', From 752cd418b8154108ece0957fdd15ac3c37b330fc Mon Sep 17 00:00:00 2001 From: Rob Zellem Date: Thu, 29 Jul 2021 17:22:38 -0700 Subject: [PATCH 3/3] v1.3.1: bugfix for NEA API in GUI --- exotic/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exotic/version.py b/exotic/version.py index 67bc602a..9c73af26 100644 --- a/exotic/version.py +++ b/exotic/version.py @@ -1 +1 @@ -__version__ = "1.3.0" +__version__ = "1.3.1"