Skip to content

Commit

Permalink
do not mask <0 values
Browse files Browse the repository at this point in the history
  • Loading branch information
milyra committed Jan 8, 2018
1 parent 9a63e34 commit e089a51
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions atmcorr/wrap_6S.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ def perform_correction(radiance, corrparams):

for i in range(nbands):
# Perform the atmospheric correction
with np.errstate(invalid='ignore'):
# safe to ignore: failing elements already NaN
mask_nan = radiance[i] == 0
y = xa[i] * radiance[i] - xb[i]
y[mask_nan] = np.nan
refl_band = y / (xc[i] * y + 1.0)
with np.errstate(invalid='ignore'):
# safe to ignore: NaN elements remain NaN
Expand Down

0 comments on commit e089a51

Please sign in to comment.