You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When computing the differences in abs_deriv edge effects are handled by assuming that edge pixels abut 0 values (so the difference between an edge pixel and a non-existent neighboring pixel off the edge is equal to the value of the edge pixel).
Note that for pixel [2, 2] with a value of 8, the maximum absolute difference between adjacent pixels is 2 for all non-edge differences but the result is 8 due to the edge treatment.
I suspect that this leads to increased outlier pixel flagging for edge pixels. However if this is intended this issue can be closed.
The text was updated successfully, but these errors were encountered:
Also I believe the following would ignore edge differences (so don't include a difference between an edge pixel and an off-edge pixel 0 value in the difference):
The
abs_deriv
function included in outlier detection:jwst/jwst/outlier_detection/outlier_detection.py
Line 472 in 415de86
Compute absolute differences between adjacent pixels in the median image:
jwst/jwst/outlier_detection/outlier_detection.py
Line 426 in 415de86
which is used in computation of the
cr_mask
:jwst/jwst/outlier_detection/outlier_detection.py
Line 437 in 415de86
and
jwst/jwst/outlier_detection/outlier_detection.py
Line 446 in 415de86
When computing the differences in
abs_deriv
edge effects are handled by assuming that edge pixels abut 0 values (so the difference between an edge pixel and a non-existent neighboring pixel off the edge is equal to the value of the edge pixel).For the following toy array:
The function returns:
Note that for pixel [2, 2] with a value of 8, the maximum absolute difference between adjacent pixels is 2 for all non-edge differences but the result is 8 due to the edge treatment.
I suspect that this leads to increased outlier pixel flagging for edge pixels. However if this is intended this issue can be closed.
The text was updated successfully, but these errors were encountered: