From 87f8827a9e16240fe5ac088d73d1417fa4c452de Mon Sep 17 00:00:00 2001 From: Melanie Clarke Date: Thu, 9 Jan 2025 17:56:21 -0500 Subject: [PATCH] Update docs --- docs/jwst/clean_flicker_noise/arguments.rst | 9 +++++++++ docs/jwst/clean_flicker_noise/main.rst | 9 ++++++++- jwst/clean_flicker_noise/clean_flicker_noise_step.py | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/jwst/clean_flicker_noise/arguments.rst b/docs/jwst/clean_flicker_noise/arguments.rst index 8fc131709e..aa5cc3ff77 100644 --- a/docs/jwst/clean_flicker_noise/arguments.rst +++ b/docs/jwst/clean_flicker_noise/arguments.rst @@ -31,6 +31,15 @@ the behavior of the processing. affected by failed-open MSA shutters. For MIRI imaging, mask regions of the detector not used for science. +``--apply_flat_field`` (boolean, default=False) + If set, images are flat-corrected prior to fitting background + and noise levels. A full-frame flat field image + (reference type FLAT) is required. For modes that do not provide + FLAT files via CRDS, including all NIRSpec modes, a manually + generated override flat is required to enable this option. + Use the `override_flat` parameter to provide an alternate flat image + as needed. + ``--n_sigma`` (float, default=2.0) The sigma-clipping threshold to use when searching for outliers and illuminated pixels to be excluded from use in the background diff --git a/docs/jwst/clean_flicker_noise/main.rst b/docs/jwst/clean_flicker_noise/main.rst index c7356c690a..1a614dcce7 100644 --- a/docs/jwst/clean_flicker_noise/main.rst +++ b/docs/jwst/clean_flicker_noise/main.rst @@ -184,6 +184,9 @@ information on all referenced parameters. This will mask out regions of the detector under the metering structure. + #. If `apply_flat_field` is set and a flat file is available, divide the + draft rate data by the flat image. + #. Iteratively sigma clip the data to get a center value (mean or median) and sigma value (standard deviation). @@ -200,6 +203,9 @@ information on all referenced parameters. #. Make a diff image (current group – previous group) to correct. + #. If `apply_flat_field` is set and a flat file is available, divide the + diff image by the flat image. + #. Fit and remove a background level, using the scene mask to identify background pixels. @@ -231,7 +237,8 @@ information on all referenced parameters. detector channel. #. Restore the background level to the cleaned, background-subtracted - diff image. + diff image. Also restore the flat structure if needed by multiplying the + cleaned diff by the flat image. #. Add the cleaned diff back to a cleaned version of the previous group image. diff --git a/jwst/clean_flicker_noise/clean_flicker_noise_step.py b/jwst/clean_flicker_noise/clean_flicker_noise_step.py index 170ceef146..663468a52c 100644 --- a/jwst/clean_flicker_noise/clean_flicker_noise_step.py +++ b/jwst/clean_flicker_noise/clean_flicker_noise_step.py @@ -83,7 +83,7 @@ def process(self, input): (reference type FLAT) is required. For modes that do not provide FLAT files via CRDS, including all NIRSpec modes, a manually generated override flat is required to enable this option. - Use the `override_flat` parameter to provide alternate flat images + Use the `override_flat` parameter to provide an alternate flat image as needed. n_sigma : float, optional