diff --git a/romancal/source_detection/source_detection_step.py b/romancal/source_detection/source_detection_step.py index 12966848a..26de824ae 100644 --- a/romancal/source_detection/source_detection_step.py +++ b/romancal/source_detection/source_detection_step.py @@ -77,12 +77,11 @@ def process(self, input): self.data = input_model.data # mask DO_NOT_USE pixels - + self.coverage_mask = ( (dqflags.pixel["DO_NOT_USE"]) & input_model.dq ).astype(bool) - # if a pre-determined threshold value for detection for the whole # image is provided, use this if self.scalar_threshold is not None: @@ -118,8 +117,7 @@ def process(self, input): elif self.calc_threshold is not None: # subtrack background from data if calculating abs. threshold - sources = daofind(self.data - bkg.background, - mask=self.coverage_mask) + sources = daofind(self.data - bkg.background, mask=self.coverage_mask) # reduce table to minimal number of columns, just source ID, # positions, and fluxes