From ee8288f14bc8bf1306ab00bcea05cc16a11ced17 Mon Sep 17 00:00:00 2001 From: D Davis <49163225+ddavis-stsci@users.noreply.github.com> Date: Tue, 6 Aug 2024 08:44:33 -0400 Subject: [PATCH] rcal-827 Add reg test for DMS373 (#1348) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- CHANGES.rst | 2 ++ romancal/regtest/test_mos_pipeline.py | 40 +++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 9a6ee03d4..9717d6bfb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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] diff --git a/romancal/regtest/test_mos_pipeline.py b/romancal/regtest/test_mos_pipeline.py index 9d48b0dff..885dc90a0 100644 --- a/romancal/regtest/test_mos_pipeline.py +++ b/romancal/regtest/test_mos_pipeline.py @@ -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") + )