Skip to content

Commit

Permalink
Fix of bad index offsets in clean_idwinterp
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor Kovacs committed Jun 22, 2016
1 parent aa8571d commit 90d235e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astroscrappy/astroscrappy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ cdef void clean_idwinterp(float[:, ::1] cleanarr, bool[:, ::1] crmask,
for k in range(-2, 3):
x = i + k
if not (crmask[y, x] or mask[y, x]):
val = val + weights[l, k] * cleanarr[y, x]
wsum = wsum + weights[l, k]
val = val + weights[l+2, k+2] * cleanarr[y, x]
wsum = wsum + weights[l+2, k+2]
if wsum < 1e-6:
cleanarr[j, i] = background_level
else:
Expand Down

0 comments on commit 90d235e

Please sign in to comment.