Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JP-824: Add option to save combined background image #5954

Merged
1 change: 0 additions & 1 deletion jwst/background/background_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def average_background(bkg_list, sigma, maxiters):

# Compute the combined ERR as the uncertainty in the mean
avg_bkg.err = (np.sqrt(merr.sum(axis=0)) / (num_bkg - merr.mask.sum(axis=0))).data
# avg_bkg.err[merr.mask.sum(axis=0)] = np.nan

return avg_bkg

Expand Down
5 changes: 3 additions & 2 deletions jwst/regtest/test_miri_lrs_slit_spec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ def run_pipeline(jail, rtdata_module):
"--save_bsub=true",
"--steps.assign_wcs.save_results=true",
"--steps.flat_field.save_results=true",
"--steps.srctype.save_results=true"]
"--steps.srctype.save_results=true",
"--steps.bkg_subtract.save_combined_background=true"]
Step.from_cmdline(args)

return rtdata


@pytest.mark.bigdata
@pytest.mark.parametrize("output", [
"bsub", "flat_field", "assign_wcs", "srctype", "cal", "x1d"])
"bsub", "flat_field", "assign_wcs", "srctype", "cal", "x1d", "combinedbackground"])
def test_miri_lrs_slit_spec2(run_pipeline, fitsdiff_default_kwargs, output):
"""Regression test of the calwebb_spec2 pipeline on MIRI
LRS fixedslit data using along-slit-nod pattern for
Expand Down