Skip to content

Commit

Permalink
Do not detect saturated pixels if they are bad otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed May 1, 2023
1 parent 8a8581e commit 89a7a01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jwst/resample/resample_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ def build_driz_weight(model, weight_type=None, good_bits=None):
if selective_median:
# apply median filter selectively only at
# points of partially saturated sources:
jumps = np.where(model.dq & saturation)
jumps = np.where(
np.logical_and(model.dq & saturation, dqmask)
)
w2 = kernel_size // 2
for r, c in zip(*jumps):
x1 = max(0, c - w2)
Expand Down

0 comments on commit 89a7a01

Please sign in to comment.