-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JP-3325: bypass extract1d for SOSS observations in FULL subarray (#8225)
Co-authored-by: Ned Molter <[email protected]> Co-authored-by: Howard Bushouse <[email protected]>
- Loading branch information
1 parent
bb57c7e
commit 88f14f6
Showing
7 changed files
with
93 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import stdatamodels.jwst.datamodels as dm | ||
from jwst.extract_1d import Extract1dStep | ||
from jwst.photom import PhotomStep | ||
import pytest | ||
import numpy as np | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def mock_niriss_full(): | ||
model = dm.CubeModel((3, 3, 3)) | ||
model.meta.instrument.name = 'NIRISS' | ||
model.meta.instrument.detector = 'NIS' | ||
model.meta.observation.date = '2023-07-22' | ||
model.meta.observation.time = '06:24:45.569' | ||
model.meta.instrument.name = 'NIRISS' | ||
model.meta.instrument.detector = 'NIS' | ||
model.meta.instrument.filter = 'CLEAR' | ||
model.meta.exposure.type = 'NIS_SOSS' | ||
model.meta.subarray.name = 'FULL' | ||
model.data = np.arange(27).reshape((3, 3, 3)) | ||
return model | ||
|
||
|
||
def test_expected_skip_niriss_soss_full(mock_niriss_full): | ||
|
||
with mock_niriss_full as model: | ||
result = Extract1dStep().process(model) | ||
result2 = PhotomStep().process(result) | ||
assert result2.meta.cal_step.photom == 'SKIPPED' | ||
assert result2.meta.cal_step.extract_1d == 'SKIPPED' | ||
assert np.all(result2.data == model.data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters