From 9958b70d462a4d8b683e2a857755838d860043d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Neveu?= Date: Fri, 23 Aug 2024 19:54:08 +0000 Subject: [PATCH] missing else --- spectractor/fit/fit_spectrogram.py | 1 + spectractor/fit/fit_spectrum.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spectractor/fit/fit_spectrogram.py b/spectractor/fit/fit_spectrogram.py index e7578a66..78fcf5a0 100644 --- a/spectractor/fit/fit_spectrogram.py +++ b/spectractor/fit/fit_spectrogram.py @@ -69,6 +69,7 @@ def __init__(self, spectrum, atmgrid_file_name="", fit_angstrom_exponent=False, if not is_gaiaspec: if not is_gaia_full: raise ValueError(f"{spectrum.target.label=} must be a CALSPEC or GAIA star.") + else: raise ValueError(f"{spectrum.target.label=} must be a CALSPEC star according to getCalspec package.") self.spectrum = spectrum self.filename = spectrum.filename.replace("spectrum", "spectrogram") diff --git a/spectractor/fit/fit_spectrum.py b/spectractor/fit/fit_spectrum.py index 03907f06..3917490f 100644 --- a/spectractor/fit/fit_spectrum.py +++ b/spectractor/fit/fit_spectrum.py @@ -70,7 +70,8 @@ def __init__(self, spectrum, atmgrid_file_name="", fit_angstrom_exponent=False, if not is_gaiaspec: if not is_gaia_full: raise ValueError(f"{spectrum.target.label=} must be a CALSPEC or GAIA star.") - raise ValueError(f"{spectrum.target.label=} must be a CALSPEC star according to getCalspec package.") + else: + raise ValueError(f"{spectrum.target.label=} must be a CALSPEC star according to getCalspec package.") self.spectrum = spectrum p = np.array([1, 0, 0.05, 1.2, 400, 5, 1, self.spectrum.header['D2CCD'], self.spectrum.header['PIXSHIFT'], 0]) fixed = [False] * p.size