Skip to content

Commit

Permalink
BUG delete_seg not a key
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr authored May 17, 2023
1 parent a324b7c commit 9c3407d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions eastlake/steps/delete_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9c3407d

Please sign in to comment.