Skip to content

Commit

Permalink
Change flat_correct to use results of arithmetic methods
Browse files Browse the repository at this point in the history
The methods return a new CCDData, leaving the original unchanged.
  • Loading branch information
mwcraig committed Jun 10, 2014
1 parent 6b135a6 commit c123252
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ccdproc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,15 @@ def flat_correct(ccd, flat, min_value=None):
"""
#Use the min_value to replace any values in the flat
if min_value is not None:
flat.data[flat.data < min_value] = min_value
flat.data[flat.data < min_value] = min_value

# normalize the flat
flat.divide(flat.data.mean())
flat_normed = flat.divide(flat.data.mean())

# divide through the flat
ccd.divide(flat)
flat_corrected = ccd.divide(flat_normed)

return ccd
return flat_corrected


def sigma_func(arr):
Expand Down

0 comments on commit c123252

Please sign in to comment.