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