diff --git a/geminidr/core/primitives_spect.py b/geminidr/core/primitives_spect.py index c95e7c8db..c9034012d 100644 --- a/geminidr/core/primitives_spect.py +++ b/geminidr/core/primitives_spect.py @@ -2292,7 +2292,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")