diff --git a/CHANGES.rst b/CHANGES.rst index c589dccd29..b912f10ceb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -47,6 +47,9 @@ outlier_detection - Add association id to ``outlier_i2d`` intermediate filenames. [#8418] +- Pass the ``weight_type`` parameter to all resampling function calls so that + the default weighting can be overridden by the input step parameter. [#8290] + pipeline -------- diff --git a/jwst/outlier_detection/outlier_detection.py b/jwst/outlier_detection/outlier_detection.py index fc29873094..ef584132ec 100644 --- a/jwst/outlier_detection/outlier_detection.py +++ b/jwst/outlier_detection/outlier_detection.py @@ -113,7 +113,7 @@ def _convert_inputs(self): dq=self.inputs.dq[i]) image.meta = self.inputs.meta image.wht = build_driz_weight(image, - weight_type='ivm', + weight_type=self.outlierpars['weight_type'], good_bits=bits) self.input_models.append(image) self.converted = True @@ -199,7 +199,7 @@ def do_detection(self): for i in range(len(self.input_models)): drizzled_models[i].wht = build_driz_weight( self.input_models[i], - weight_type='ivm', + weight_type=pars['weight_type'], good_bits=pars['good_bits']) # Initialize intermediate products used in the outlier detection diff --git a/jwst/outlier_detection/outlier_detection_scaled.py b/jwst/outlier_detection/outlier_detection_scaled.py index a7252bd9af..e3b8c2cfcf 100644 --- a/jwst/outlier_detection/outlier_detection_scaled.py +++ b/jwst/outlier_detection/outlier_detection_scaled.py @@ -102,7 +102,7 @@ def do_detection(self): for image in self.input_models: image.wht = resample_utils.build_driz_weight( image, - weight_type='ivm', + weight_type=pars['weight_type'], good_bits=pars['good_bits'] ) diff --git a/jwst/outlier_detection/outlier_detection_spec.py b/jwst/outlier_detection/outlier_detection_spec.py index 1cc60db1c7..4adf2b4b06 100644 --- a/jwst/outlier_detection/outlier_detection_spec.py +++ b/jwst/outlier_detection/outlier_detection_spec.py @@ -88,7 +88,7 @@ def do_detection(self): for i in range(len(self.input_models)): drizzled_models[i].wht = resample_utils.build_driz_weight( self.input_models[i], - weight_type='ivm', + weight_type=pars['weight_type'], good_bits=pars['good_bits']) # Initialize intermediate products used in the outlier detection diff --git a/jwst/outlier_detection/outlier_detection_step.py b/jwst/outlier_detection/outlier_detection_step.py index 077fdcf782..2c90435045 100644 --- a/jwst/outlier_detection/outlier_detection_step.py +++ b/jwst/outlier_detection/outlier_detection_step.py @@ -102,7 +102,8 @@ def process(self, input_data): # Setup outlier detection parameters pars = { - 'weight_type': self.weight_type, + 'weight_type': self.weight_type, # for calling the resample step + 'wht_type': self.weight_type, # for calling the resample class directly 'pixfrac': self.pixfrac, 'kernel': self.kernel, 'fillval': self.fillval,