From 0e3006459571819ff717f140c37c692bd011a4d8 Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Mon, 5 Aug 2024 15:21:42 -0400 Subject: [PATCH 1/3] Update NIRSpec IRS2 detector1 test to use flight data --- jwst/regtest/test_nirspec_irs2_detector1.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jwst/regtest/test_nirspec_irs2_detector1.py b/jwst/regtest/test_nirspec_irs2_detector1.py index 8af8bfbcee..d38d12b973 100644 --- a/jwst/regtest/test_nirspec_irs2_detector1.py +++ b/jwst/regtest/test_nirspec_irs2_detector1.py @@ -12,7 +12,7 @@ def run_detector1pipeline(rtdata_module): """Run calwebb_detector1 pipeline on NIRSpec data with IRS2 readout mode.""" rtdata = rtdata_module - rtdata.get_data("nirspec/irs2/jw0010010_11010_nrs1_chimera_uncal.fits") + rtdata.get_data("nirspec/irs2/jw01335004001_03101_00002_nrs2_uncal.fits") Step.from_cmdline([ "calwebb_detector1", @@ -33,7 +33,8 @@ def run_detector1pipeline(rtdata_module): @pytest.mark.bigdata @pytest.mark.parametrize("suffix", ['dq_init', 'saturation', 'superbias', - 'refpix', 'linearity', 'dark_current', 'jump', '0_ramp_fit', 'gain_scale', + 'refpix', 'linearity', 'dark_current', 'jump', + '0_ramp_fit', 'gain_scale', 'rate']) def test_nirspec_irs2_detector1(run_detector1pipeline, rtdata_module, fitsdiff_default_kwargs, suffix): @@ -42,7 +43,7 @@ def test_nirspec_irs2_detector1(run_detector1pipeline, rtdata_module, """ rtdata = rtdata_module - output_filename = f"jw0010010_11010_nrs1_chimera_{suffix}.fits" + output_filename = f"jw01335004001_03101_00002_nrs2_{suffix}.fits" rtdata.output = output_filename rtdata.get_truth(f"truth/test_nirspec_irs2_detector1/{output_filename}") From e13d34315c7371dd0378b7f08ef59009b339d69a Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Mon, 5 Aug 2024 15:48:27 -0400 Subject: [PATCH 2/3] Keep default jump detection threshold --- jwst/regtest/test_nirspec_irs2_detector1.py | 1 - 1 file changed, 1 deletion(-) diff --git a/jwst/regtest/test_nirspec_irs2_detector1.py b/jwst/regtest/test_nirspec_irs2_detector1.py index d38d12b973..3a14b37cbd 100644 --- a/jwst/regtest/test_nirspec_irs2_detector1.py +++ b/jwst/regtest/test_nirspec_irs2_detector1.py @@ -27,7 +27,6 @@ def run_detector1pipeline(rtdata_module): "--steps.jump.save_results=True", "--steps.ramp_fit.save_results=True", "--steps.gain_scale.save_results=True", - "--steps.jump.rejection_threshold=200", ]) From 59bb5ff6ab79310cb130d3d473182fe75c6071d2 Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Tue, 6 Aug 2024 09:32:00 -0400 Subject: [PATCH 3/3] Add tolerances --- jwst/regtest/test_nirspec_irs2_detector1.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jwst/regtest/test_nirspec_irs2_detector1.py b/jwst/regtest/test_nirspec_irs2_detector1.py index 3a14b37cbd..407a8bd2dc 100644 --- a/jwst/regtest/test_nirspec_irs2_detector1.py +++ b/jwst/regtest/test_nirspec_irs2_detector1.py @@ -46,5 +46,8 @@ def test_nirspec_irs2_detector1(run_detector1pipeline, rtdata_module, rtdata.output = output_filename rtdata.get_truth(f"truth/test_nirspec_irs2_detector1/{output_filename}") + # Set tolerances so comparisons work across architectures + fitsdiff_default_kwargs["rtol"] = 1e-4 + fitsdiff_default_kwargs["atol"] = 1e-4 diff = FITSDiff(rtdata.output, rtdata.truth, **fitsdiff_default_kwargs) assert diff.identical, diff.report()