diff --git a/jwst/dark_current/dark_current_step.py b/jwst/dark_current/dark_current_step.py index 0bf01cfdb8..9ff2eea5b5 100755 --- a/jwst/dark_current/dark_current_step.py +++ b/jwst/dark_current/dark_current_step.py @@ -173,5 +173,4 @@ def dark_output_data_2_ramp_model(out_data, out_model): out_model.data = out_data.data out_model.groupdq = out_data.groupdq out_model.pixeldq = out_data.pixeldq - out_model.err = out_data.err return out_model diff --git a/jwst/dark_current/tests/test_dark_sub.py b/jwst/dark_current/tests/test_dark_sub.py index 72cbda35da..7c1c6ea7a4 100644 --- a/jwst/dark_current/tests/test_dark_sub.py +++ b/jwst/dark_current/tests/test_dark_sub.py @@ -353,8 +353,12 @@ def test_2_int(make_rampmodel, make_darkmodel): # Refac done def test_frame_avg(make_rampmodel, make_darkmodel): - '''Check that if NFRAMES>1 or GROUPGAP>0, the frame-averaged dark data are - subtracted group-by-group from science data groups and the ERR arrays are not modified''' + """ + Test frame averaging. + + Check that if NFRAMES>1 or GROUPGAP>0, the frame-averaged dark data are + subtracted group-by-group from science data groups. + """ # size of integration nints = 1 @@ -393,9 +397,6 @@ def test_frame_avg(make_rampmodel, make_darkmodel): assert outfile.data[0, 2, 500, 500] == pytest.approx(2.05) assert outfile.data[0, 3, 500, 500] == pytest.approx(2.65) - # check that the error array is not modified. - np.testing.assert_array_equal(outfile.err[:, :], 0) - # ------------------------------------------------------------------------------ def test_basic_step(make_rampmodel, make_darkmodel): diff --git a/jwst/dq_init/tests/test_dq_init.py b/jwst/dq_init/tests/test_dq_init.py index e18fae409c..cd3714dfed 100644 --- a/jwst/dq_init/tests/test_dq_init.py +++ b/jwst/dq_init/tests/test_dq_init.py @@ -1,8 +1,6 @@ import numpy as np import pytest -import warnings -from stdatamodels.validate import ValidationWarning from stdatamodels.jwst.datamodels import MaskModel, GuiderRawModel, RampModel, dqflags from jwst.dq_init import DQInitStep @@ -107,45 +105,6 @@ def test_groupdq(): err_msg='groupdq not initialized to zero') -def test_err(): - """Check that a 4-D ERR array is initialized and all values are zero.""" - - # size of integration - instrument = 'MIRI' - nints = 1 - ngroups = 5 - xsize = 1032 - ysize = 1024 - xstart = 1 - ystart = 1 - - # create raw input data for step - dm_ramp = make_rawramp(instrument, nints, ngroups, ysize, xsize, ystart, xstart) - - # create a MaskModel for the dq input mask - dq, dq_def = make_maskmodel(ysize, xsize) - - # write mask model - ref_data = MaskModel(dq=dq, dq_def=dq_def) - ref_data.meta.instrument.name = instrument - ref_data.meta.subarray.xstart = xstart - ref_data.meta.subarray.xsize = xsize - ref_data.meta.subarray.ystart = ystart - ref_data.meta.subarray.ysize = ysize - - # Filter out validation warnings from ref_data - warnings.filterwarnings("ignore", category=ValidationWarning) - - # run correction step - outfile = do_dqinit(dm_ramp, ref_data) - - # check that ERR array was created and initialized to zero - errarr = outfile.err - - assert errarr.ndim == 4 # check that output err array is 4-D - assert np.all(errarr == 0) # check that values are 0 - - def test_dq_subarray(): """Test that the pipeline properly extracts the subarray from the reference file.""" # put dq flags in specific pixels and make sure they match in the output subarray file diff --git a/jwst/jump/jump.py b/jwst/jump/jump.py index febae44348..e02baf574e 100644 --- a/jwst/jump/jump.py +++ b/jwst/jump/jump.py @@ -61,7 +61,7 @@ def run_detect_jumps(output_model, gain_model, readnoise_model, readnoise_model) new_gdq, new_pdq, number_crs, number_extended_events, stddev\ = detect_jumps(frames_per_group, output_model.data, output_model.groupdq, - output_model.pixeldq, output_model.err, + output_model.pixeldq, gain_2d, readnoise_2d, rejection_thresh, three_grp_thresh, four_grp_thresh, max_cores, diff --git a/jwst/linearity/tests/test_linearity.py b/jwst/linearity/tests/test_linearity.py index 89b5084cb3..f83efef0e5 100644 --- a/jwst/linearity/tests/test_linearity.py +++ b/jwst/linearity/tests/test_linearity.py @@ -291,36 +291,6 @@ def test_lin_subarray(): assert (outpixdq[76, 104] == 1) -def test_err_array(): - """Test that the error array is not changed by the linearity step""" - - # size of integration - ngroups = 10 - xsize = 1032 - ysize = 1024 - - # create a JWST datamodel for MIRI data - im = RampModel((1, ngroups, ysize, xsize)) - im.data += 1 - im.err += 2 - # set file header values - im.meta.instrument.detector = 'MIRIMAGE' - im.meta.instrument.name = 'MIRI' - im.meta.observation.date = '2018-01-01' - im.meta.observation.time = '00:00:00' - im.meta.subarray.xstart = 1 - im.meta.subarray.xsize = xsize - im.meta.subarray.ystart = 1 - im.meta.subarray.ysize = ysize - - # run pipeline - outfile = LinearityStep.call(im) - - # check output of error array - # test that the science data are not changed - np.testing.assert_allclose(im.err, outfile.err) - - def make_rampmodel(nints, ngroups, ysize, xsize): """Function to provide ramp model to tests""" diff --git a/jwst/ramp_fitting/tests/test_ramp_fit.py b/jwst/ramp_fitting/tests/test_ramp_fit.py index 84e580f558..dee75bda4a 100644 --- a/jwst/ramp_fitting/tests/test_ramp_fit.py +++ b/jwst/ramp_fitting/tests/test_ramp_fit.py @@ -1004,4 +1004,3 @@ def base_print(label, arr): arr_str = np.array2string(arr, max_line_width=np.nan, separator=", ") print(label) print(arr_str) - diff --git a/jwst/refpix/irs2_subtract_reference.py b/jwst/refpix/irs2_subtract_reference.py index 8b7730bb0b..4ad8190184 100644 --- a/jwst/refpix/irs2_subtract_reference.py +++ b/jwst/refpix/irs2_subtract_reference.py @@ -186,7 +186,7 @@ def correct_model(output_model, irs2_model, scipix_n_default=16, refpix_r_defaul else: # don't change orientation output_model.data = temp_data - # Strip interleaved ref pixels from the PIXELDQ, GROUPDQ, and ERR extensions. + # Strip interleaved ref pixels from the PIXELDQ and GROUPDQ extensions. if not preserve_refpix: strip_ref_pixels(output_model, irs2_mask) @@ -244,7 +244,7 @@ def make_irs2_mask(nx, ny, scipix_n, refpix_r): def strip_ref_pixels(output_model, irs2_mask): - """Copy out the normal pixels from PIXELDQ, GROUPDQ, and ERR arrays. + """Copy out the normal pixels from PIXELDQ and GROUPDQ arrays. Parameters ---------- @@ -267,8 +267,6 @@ def strip_ref_pixels(output_model, irs2_mask): temp_array = output_model.groupdq output_model.groupdq = temp_array[..., irs2_mask, :] - temp_array = output_model.err - output_model.err = temp_array[..., irs2_mask, :] elif detector == "NRS2": # Reverse the direction of the mask, and select rows. temp_mask = irs2_mask[::-1] @@ -279,8 +277,6 @@ def strip_ref_pixels(output_model, irs2_mask): temp_array = output_model.groupdq output_model.groupdq = temp_array[..., temp_mask, :] - temp_array = output_model.err - output_model.err = temp_array[..., temp_mask, :] else: # Select columns. temp_array = output_model.pixeldq @@ -289,9 +285,6 @@ def strip_ref_pixels(output_model, irs2_mask): temp_array = output_model.groupdq output_model.groupdq = temp_array[..., irs2_mask] - temp_array = output_model.err - output_model.err = temp_array[..., irs2_mask] - def clobber_ref(data, output, odd_even, mask, ref_flags, is_irs2, scipix_n=16, refpix_r=4): diff --git a/jwst/refpix/tests/test_refpix.py b/jwst/refpix/tests/test_refpix.py index 246e8bd488..dbdfc7265b 100644 --- a/jwst/refpix/tests/test_refpix.py +++ b/jwst/refpix/tests/test_refpix.py @@ -987,15 +987,12 @@ def test_preserve_refpix(detector, irs2, preserve): if not irs2: # parameter ignored for non-irs2 data assert out.data.shape == (1, ngroups, ysize, xsize) - assert out.err.shape == (1, ngroups, ysize, xsize) assert out.pixeldq.shape == (ysize, xsize) elif preserve: # output data shape is the same assert out.data.shape == (1, ngroups, ysize, xsize) - assert out.err.shape == (1, ngroups, ysize, xsize) assert out.pixeldq.shape == (ysize, xsize) else: # output data is trimmed to remove interleaved refpix assert out.data.shape == (1, ngroups, xsize, xsize) - assert out.err.shape == (1, ngroups, xsize, xsize) assert out.pixeldq.shape == (xsize, xsize)