-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
absolute derivitive calculation in outlier detection has edge effects #8636
Comments
Comment by Brett Graham on JIRA: A modified |
Comment by Brett Graham on JIRA: Here is a regression test run with the above linked fixed showing 62 test failures. A more thorough investigation of these differences will be needed but many have different |
xref: #8402 |
Brett Graham Following up on this; do we know of any cases where this is causing us to flag science pixels erroneously? Typically the outermost ring of pixels tends to be unreliable anyway, and thus wouldn't be contributing to final science data products. What's the difference with the PR above? Does it ignore off-edge pixels? |
Thanks for taking a look. The function also effectively dilates >> arr = np.arange(25, dtype='f4').reshape((5, 5))
>> arr[2, 2] = np.nan
>> abs_deriv(arr)
array([[ 5., 5., 5., 5., 5.],
[ 5., 5., nan, 5., 9.],
[10., nan, nan, nan, 14.],
[15., 5., nan, 5., 19.],
[20., 21., 22., 23., 24.]]) This will also lead to missed outliers if they are next to The above PR ignored differences for off edge pixels. So for a pixel at the edge of the input (let's say 0, 0) the current code computes the derivative by taking:
For the above PR it's:
|
Comment by Brett Graham on JIRA: PR open for stcal to address the issues: spacetelescope/stcal#311 As this is now common code reviewers were requested for roman and jwst. |
Comment by Brett Graham on JIRA: PR spacetelescope/stcal#311 merged, regression tests okified. |
Issue JP-3683 was created on JIRA by Brett Graham:
The
abs_deriv
function used in outlier detection assumes 0 values for off-edge pixels which leads to edge effects.jwst/jwst/outlier_detection/outlier_detection.py
Line 517 in 033b817
For example providing the following as input:
I would expect that the output should be 5 everywhere in the result (since for example the absolute difference between for example arr[4, 4] and arr[3, 4] is 5
The text was updated successfully, but these errors were encountered: