Skip to content

Commit

Permalink
in Badpixel_self cal add log message on number of pixels flagged (spa…
Browse files Browse the repository at this point in the history
  • Loading branch information
melanieclarke authored Nov 26, 2024
2 parents 05488e6 + 5f2b0bc commit 94041ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jwst/badpix_selfcal/badpix_selfcal_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ def process(self, input, selfcal_list=None, bkg_list=None):
warnings.filterwarnings("ignore", category=RuntimeWarning, message="All-NaN")
minimg = np.nanmin(np.asarray(selfcal_3d), axis=0)
bad_indices = badpix_selfcal.badpix_selfcal(minimg, self.flagfrac_lower, self.flagfrac_upper, self.kernel_size, dispaxis)



# apply the flags to the science data
input_sci = badpix_selfcal.apply_flags(input_sci, bad_indices)

self.log.info(f"Number of new bad pixels flagged: {len(bad_indices[0])}")
# apply the flags to the background data to be passed to background sub step
if len(bkg_list) > 0:
for i, background_model in enumerate(bkg_list):
Expand Down

0 comments on commit 94041ec

Please sign in to comment.