Skip to content

Commit

Permalink
missing else
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyneveu committed Aug 23, 2024
1 parent 5aa42b2 commit 9958b70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions spectractor/fit/fit_spectrogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion spectractor/fit/fit_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9958b70

Please sign in to comment.