From e028096288c7d7758bf7eba10aaa33fecbf215ed Mon Sep 17 00:00:00 2001 From: Brian Healy Date: Wed, 9 Aug 2023 16:30:50 -0500 Subject: [PATCH 1/2] Fix API photometry filter naming and plot filename --- api/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app.py b/api/app.py index 8246ad7b..172be995 100644 --- a/api/app.py +++ b/api/app.py @@ -171,7 +171,7 @@ def run_nmma_model(data_dict): ] for row in data: tt = Time(row["mjd"], format="mjd").isot - filt = row["filter"][-1] + filt = row["filter"] # [-1] mag = row["mag"] magerr = row["magerr"] f.write(f"{tt} {filt} {mag} {magerr}\n") @@ -241,7 +241,7 @@ def run_nmma_model(data_dict): suffix=".png", prefix="nmmaplot_", delete=False ) f.close() - plot_file = os.path.join(plotdir, "lightcurves.png") + plot_file = os.path.join(plotdir, f"{cand_name}_{source}_lightcurves.png") plot_data = base64.b64encode(open(plot_file, "rb").read()).decode() local_temp_files.append(f.name) From ea91dddb8e3f607bfe54b344a56b17dca615b689 Mon Sep 17 00:00:00 2001 From: Brian Healy Date: Wed, 9 Aug 2023 16:31:44 -0500 Subject: [PATCH 2/2] Remove comment --- api/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app.py b/api/app.py index 172be995..8e219748 100644 --- a/api/app.py +++ b/api/app.py @@ -171,7 +171,7 @@ def run_nmma_model(data_dict): ] for row in data: tt = Time(row["mjd"], format="mjd").isot - filt = row["filter"] # [-1] + filt = row["filter"] mag = row["mag"] magerr = row["magerr"] f.write(f"{tt} {filt} {mag} {magerr}\n")