Skip to content

Commit

Permalink
rcal-827 Add reg test for DMS373 (#1348)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ddavis-stsci and pre-commit-ci[bot] authored Aug 6, 2024
1 parent af92054 commit ee8288f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Documentation
general
-------

- Add regression test for DMS373, mosaic pipeline [#1348]

- Update the exposure pipeline to accept a roman datamodel as input [#1296]

- Update okify script to use GA directory structure [#1282]
Expand Down
40 changes: 40 additions & 0 deletions romancal/regtest/test_mos_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,43 @@ def test_level3_mos_pipeline(rtdata, ignore_asdf_paths):
"DMS86 MSG: Testing completion of resample in the Level 3 image output......."
+ passfail(model.meta.cal_step.resample == "COMPLETE")
)


@pytest.mark.bigdata
@pytest.mark.soctests
@metrics_logger("DMS373")
def test_hlp_mosaic_pipeline(rtdata, ignore_asdf_paths):
"""Tests for level 3 mosaic requirements DMS373"""

cal_files = [
"WFI/image/r0000101001001001001_01101_0001_WFI01_cal.asdf",
"WFI/image/r0000101001001001001_01101_0002_WFI01_cal.asdf",
"WFI/image/r0000101001001001001_01101_0003_WFI01_cal.asdf",
]

for cal_file in cal_files:
rtdata.get_data(cal_file)

input_asn = "L3_mosaic_asn.json"
rtdata.get_data(f"WFI/image/{input_asn}")
rtdata.input = input_asn

# Test Pipeline
output = "r0099101001001001001_r274dp63x31y81_prompt_F158_i2d.asdf"
rtdata.output = output
args = [
"roman_mos",
rtdata.input,
]
MosaicPipeline.from_cmdline(args)
rtdata.get_truth(f"truth/WFI/image/{output}")
pipeline = MosaicPipeline()
diff = compare_asdf(rtdata.output, rtdata.truth, **ignore_asdf_paths)
assert diff.identical, diff.report()

model = rdm.open(rtdata.output, lazy_load=False)

pipeline.log.info(
"DMS373 MSG: Testing the creation of a Level 3 mosaic image resampled to a skycell"
+ passfail(model.meta.cal_step.resample == "COMPLETE")
)

0 comments on commit ee8288f

Please sign in to comment.