From 9c3407d2d0b6b539cb3971bd3cc20946cfec2b25 Mon Sep 17 00:00:00 2001 From: "Matthew R. Becker" Date: Wed, 17 May 2023 11:45:05 -0500 Subject: [PATCH] BUG delete_seg not a key --- eastlake/steps/delete_sources.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/eastlake/steps/delete_sources.py b/eastlake/steps/delete_sources.py index 0247e4b..9b2022c 100644 --- a/eastlake/steps/delete_sources.py +++ b/eastlake/steps/delete_sources.py @@ -50,14 +50,13 @@ def execute(self, stash, new_params=None): os.remove(coadd_file) # Also check for seg file - if self.config["delete_seg"]: - seg_file = stash.get_filepaths( - "seg_file", tilename, band=band, - keyerror=False, - ) - if (seg_file is not None): - if os.path.isfile(seg_file): - self.logger.error("removing file %s" % seg_file) + seg_file = stash.get_filepaths( + "seg_file", tilename, band=band, + keyerror=False, + ) + if (seg_file is not None): + if os.path.isfile(seg_file): + self.logger.error("removing file %s" % seg_file) # Also check for bkg and bkg-rms files bkg_file = coadd_file.replace(".fits", "bkg.fits")