From d982610285ad716a8ca3b48b1485ebf61f8d28cd Mon Sep 17 00:00:00 2001 From: Josh Walawender Date: Mon, 4 Jun 2018 14:33:40 -1000 Subject: [PATCH] Catch mistake quitting interactive soln before done --- MOSFIRE/Wavelength.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MOSFIRE/Wavelength.py b/MOSFIRE/Wavelength.py index ed63ef5..a67a33e 100644 --- a/MOSFIRE/Wavelength.py +++ b/MOSFIRE/Wavelength.py @@ -388,7 +388,15 @@ def fit_lambda_helper(slitno): slitedges = edgedata - sol_1d = center_solutions[slitidx]["sol_1d"] + try: + sol_1d = center_solutions[slitidx]["sol_1d"] + except TypeError: + error('Unable to obtain wavelength solution for slit.') + error('Did you sucessfully fit a wavelength solution for every slit?') + error('If so, you should have gotten the red "Done!" written across the') + error('wavelength plot in the interactive solution step') + raise TypeError('Unable to obtain wavelength solution for slit.') + edge = slitedges[slitidx] linelist = center_solutions[slitidx]["linelist"]