Skip to content

Commit

Permalink
Merge pull request #60 from pllim/bgsub-no-extname
Browse files Browse the repository at this point in the history
Relaxed BackgroundSub check for science ext
  • Loading branch information
pllim committed Dec 3, 2015
2 parents d3d414c + ea3bfed commit 6ab2ec1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stginga/plugins/BackgroundSub.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,11 @@ def redo(self):

header = image.get_header()
extname = header.get(self._ext_key, self._no_keyword).upper()
if extname != self._sci_extname:
self.logger.debug(

# Only calculate for science extension.
# If EXTNAME does not exist, just assume user knows best.
if extname not in (self._sci_extname, self._no_keyword):
self.logger.warn(
'Background calculation not possible for {0} extension in '
'{1}'.format(extname, image.get('name')))
return True
Expand Down

0 comments on commit 6ab2ec1

Please sign in to comment.