From 97c334922ea8f32e1a86123f3c0a68f50f95fd29 Mon Sep 17 00:00:00 2001 From: Eddie Schlafly Date: Fri, 20 Dec 2024 11:06:54 -0500 Subject: [PATCH 1/4] Loosen saturation test. --- romancal/saturation/tests/test_saturation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/romancal/saturation/tests/test_saturation.py b/romancal/saturation/tests/test_saturation.py index 6d080af45..4d5e0a5ba 100644 --- a/romancal/saturation/tests/test_saturation.py +++ b/romancal/saturation/tests/test_saturation.py @@ -83,7 +83,10 @@ def test_read_pattern_saturation_flagging(setup_wfi_datamodels): output = flag_saturation(ramp, satmap) # Make sure that groups after the third get flagged - assert np.all(output.groupdq[2:, 5, 5] == group.SATURATED) + # To accommodate https://github.com/spacetelescope/stcal/pull/321 + # this test was loosed to be SATURATED | DO_NOT_USE + assert np.all( + (output.groupdq[2:, 5, 5] & (group.SATURATED | group.DO_NOT_USE)) != 0) def test_ad_floor_flagging(setup_wfi_datamodels): From fd2c0ec59ede855252501699bbd904cf83796475 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:08:56 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- romancal/saturation/tests/test_saturation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/romancal/saturation/tests/test_saturation.py b/romancal/saturation/tests/test_saturation.py index 4d5e0a5ba..ab3f9c28b 100644 --- a/romancal/saturation/tests/test_saturation.py +++ b/romancal/saturation/tests/test_saturation.py @@ -86,7 +86,8 @@ def test_read_pattern_saturation_flagging(setup_wfi_datamodels): # To accommodate https://github.com/spacetelescope/stcal/pull/321 # this test was loosed to be SATURATED | DO_NOT_USE assert np.all( - (output.groupdq[2:, 5, 5] & (group.SATURATED | group.DO_NOT_USE)) != 0) + (output.groupdq[2:, 5, 5] & (group.SATURATED | group.DO_NOT_USE)) != 0 + ) def test_ad_floor_flagging(setup_wfi_datamodels): From c4a049e8ae339f5f57568a0c1f5d199e3891bf8d Mon Sep 17 00:00:00 2001 From: Eddie Schlafly Date: Fri, 20 Dec 2024 11:10:34 -0500 Subject: [PATCH 3/4] Add change log. --- changes/1571.saturation.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/1571.saturation.rst diff --git a/changes/1571.saturation.rst b/changes/1571.saturation.rst new file mode 100644 index 000000000..4f7732856 --- /dev/null +++ b/changes/1571.saturation.rst @@ -0,0 +1 @@ +Loosen saturation unit test to allow DO_NOT_USE From 215ba8175fa98fad9f7d663478ec4c29e5b4115f Mon Sep 17 00:00:00 2001 From: Eddie Schlafly Date: Fri, 20 Dec 2024 11:44:17 -0500 Subject: [PATCH 4/4] Update romancal min numpy version to reflect stcal min numpy version. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b722706c2..ab643c843 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ # "gwcs >=0.21.0", "gwcs @ git+https://github.com/spacetelescope/gwcs.git@master", "jsonschema >=4.8", - "numpy >=1.24", + "numpy >=1.25", "photutils >=1.13.0", "pyparsing >=2.4.7", "requests >=2.26",