Skip to content

Commit

Permalink
JP-2928: Update NIRSpec IRS2 detector1 test to use flight data (#8687)
Browse files Browse the repository at this point in the history
  • Loading branch information
melanieclarke authored Aug 6, 2024
2 parents be80530 + 7a95556 commit c9d3eb5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions jwst/regtest/test_nirspec_irs2_detector1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -27,13 +27,13 @@ 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",
])


@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):
Expand All @@ -42,9 +42,12 @@ 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}")

# 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()

0 comments on commit c9d3eb5

Please sign in to comment.