Skip to content

Commit

Permalink
Use test in pipe_tasks's testProcessCcd.py to fix the hdu handling
Browse files Browse the repository at this point in the history
The BackgroundList code needs a serious rewrite!
  • Loading branch information
RobertLuptonTheGood committed Apr 4, 2017
1 parent 806b744 commit 934d455
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/lsst/afw/math/backgroundList.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ def readFits(fileName, hdu=0, flags=0):

self = BackgroundList()

hdu -= 1 # we want to start at 0 (post RFC-304), but are about to increment
INT_MIN = -(1 << 31)
if hdu == INT_MIN:
hdu = -1
else:
hdu -= 1 # we want to start at 0 (post RFC-304), but are about to increment

while True:
hdu += 1

Expand Down

0 comments on commit 934d455

Please sign in to comment.