From 31164eabe9e0b4d84f9bf34fafb12e01e87207c4 Mon Sep 17 00:00:00 2001 From: jemorrison Date: Wed, 20 Nov 2024 12:45:17 -0700 Subject: [PATCH 1/5] add log message on number of pixels flagged --- jwst/badpix_selfcal/badpix_selfcal_step.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jwst/badpix_selfcal/badpix_selfcal_step.py b/jwst/badpix_selfcal/badpix_selfcal_step.py index b83aaa0f63..12261441ee 100644 --- a/jwst/badpix_selfcal/badpix_selfcal_step.py +++ b/jwst/badpix_selfcal/badpix_selfcal_step.py @@ -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("Number of new bad pixels flagged %d " %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): From 01c55125dab97cc15875ceac6ac016f57855614e Mon Sep 17 00:00:00 2001 From: jemorrison Date: Thu, 21 Nov 2024 07:35:17 -0700 Subject: [PATCH 2/5] changed snytax --- jwst/badpix_selfcal/badpix_selfcal_step.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwst/badpix_selfcal/badpix_selfcal_step.py b/jwst/badpix_selfcal/badpix_selfcal_step.py index 12261441ee..0cb8c19069 100644 --- a/jwst/badpix_selfcal/badpix_selfcal_step.py +++ b/jwst/badpix_selfcal/badpix_selfcal_step.py @@ -128,7 +128,7 @@ def process(self, input, selfcal_list=None, bkg_list=None): # apply the flags to the science data input_sci = badpix_selfcal.apply_flags(input_sci, bad_indices) - self.log.info("Number of new bad pixels flagged %d " %len(bad_indices[0])) + 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): From 2ab8f8e199dde5b9eb9ae375fdf6adabbe57f6f9 Mon Sep 17 00:00:00 2001 From: jemorrison Date: Fri, 22 Nov 2024 09:01:32 -0700 Subject: [PATCH 3/5] added changes --- changes/8973.badpix_selfcal.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/8973.badpix_selfcal.rst diff --git a/changes/8973.badpix_selfcal.rst b/changes/8973.badpix_selfcal.rst new file mode 100644 index 0000000000..0d40d2b80d --- /dev/null +++ b/changes/8973.badpix_selfcal.rst @@ -0,0 +1 @@ +added number of pixels flagged as DO_NOT_USE From 7eb9432e8b9fc45c50998e347aaaad18a4307723 Mon Sep 17 00:00:00 2001 From: jemorrison Date: Fri, 22 Nov 2024 09:04:17 -0700 Subject: [PATCH 4/5] fix typo --- jwst/badpix_selfcal/badpix_selfcal_step.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jwst/badpix_selfcal/badpix_selfcal_step.py b/jwst/badpix_selfcal/badpix_selfcal_step.py index 0cb8c19069..7cead42102 100644 --- a/jwst/badpix_selfcal/badpix_selfcal_step.py +++ b/jwst/badpix_selfcal/badpix_selfcal_step.py @@ -128,7 +128,7 @@ def process(self, input, selfcal_list=None, bkg_list=None): # 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])}") + 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): From 5f2b0bc8068df1d6e9034cef598886d2b86e998a Mon Sep 17 00:00:00 2001 From: jemorrison Date: Mon, 25 Nov 2024 13:22:30 -0700 Subject: [PATCH 5/5] removed change log --- changes/8973.badpix_selfcal.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changes/8973.badpix_selfcal.rst diff --git a/changes/8973.badpix_selfcal.rst b/changes/8973.badpix_selfcal.rst deleted file mode 100644 index 0d40d2b80d..0000000000 --- a/changes/8973.badpix_selfcal.rst +++ /dev/null @@ -1 +0,0 @@ -added number of pixels flagged as DO_NOT_USE