diff --git a/geminidr/core/primitives_spect.py b/geminidr/core/primitives_spect.py index 83fe11e39..9d621c4a4 100644 --- a/geminidr/core/primitives_spect.py +++ b/geminidr/core/primitives_spect.py @@ -2331,7 +2331,8 @@ def extractSpectra(self, adinputs=None, **params): ad_spec.filename = ad.filename ad_spec.orig_filename = ad.orig_filename skysub_needed = (subtract_sky and - self.timestamp_keys['skyCorrectFromSlit'] not in ad.phu) + (self.timestamp_keys['subtractSky'] not in ad.phu and + self.timestamp_keys['skyCorrectFromSlit'] not in ad.phu)) if skysub_needed: log.stdinfo(f"Sky subtraction has not been performed on {ad.filename}" " - extracting sky from separate apertures")