Skip to content
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

JP-3768: Move outlier detection median computers to stcal #8840

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/8840.outlier_detection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Moved median computers out of the jwst repository and into stcal.
12 changes: 0 additions & 12 deletions jwst/outlier_detection/tests/test_algorithms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np

from jwst.outlier_detection.tso import moving_median_over_zeroth_axis
from jwst.outlier_detection.utils import nanmedian3D


def test_rolling_median():
Expand All @@ -15,14 +14,3 @@ def test_rolling_median():
result = moving_median_over_zeroth_axis(arr, w)
expected = expected_time_axis[:, np.newaxis, np.newaxis] * spatial_axis[np.newaxis, :, :]
assert np.allclose(result, expected)


def test_nanmedian3D():

shp = (11, 50, 60)
cube = np.random.normal(size=shp)
cube[5, 5:7, 5:8] = np.nan
med = nanmedian3D(cube)

assert med.dtype == np.float32
assert np.allclose(med, np.nanmedian(cube, axis=0), equal_nan=True)
164 changes: 0 additions & 164 deletions jwst/outlier_detection/tests/test_utils.py

This file was deleted.

Loading
Loading