Removed the SavGol 1/f correction code from the pipeline and packaged it all into a jwst Step class and placed in the fnoise_clean.py file. Now this works similarly to other steps within jwst pipelines. Similarly created and added a kTC subtraction Step class kTCSubtractStep. Overall, the PR shouldn't change anything to the outputs or results, but simply cleans up the pipeline code and allows reuse of the 1/f correction for other pipelines.
Vertical striping correction is now applied in the CleanSubarry class and can be turned off and on in the OneOverfStep class via the vertical_corr parameter. (e.g., pipeline.subtract_1overf.vertical_corr). This has been turned on by default.
Full frame subarrays are now cleaned more intelligently via the implementation of the CleanFullFrame class. This first determines common-mode 1/f noise between the four channels, subtract that from each channel (accounting for channel flips along the x-axis), then models the residuals to determine channel-dependent 1/f noise. These are then all combined to create a full frame
Added logic to better handle cases where only a single integration is present. In that case, we are unable to work on residuals, so we simply apply an outlier mask to exclude pixels with high flux. The fitting routine then dynamically adapts the mask based on noise-subtracted residuals.
Removed the SavGol 1/f correction code from the pipeline and packaged it all into a jwst
Step
class and placed in thefnoise_clean.py
file. Now this works similarly to other steps within jwst pipelines. Similarly created and added a kTC subtraction Step classkTCSubtractStep
. Overall, the PR shouldn't change anything to the outputs or results, but simply cleans up the pipeline code and allows reuse of the 1/f correction for other pipelines.Vertical striping correction is now applied in the
CleanSubarry
class and can be turned off and on in theOneOverfStep
class via thevertical_corr
parameter. (e.g.,pipeline.subtract_1overf.vertical_corr
). This has been turned on by default.Full frame subarrays are now cleaned more intelligently via the implementation of the
CleanFullFrame
class. This first determines common-mode 1/f noise between the four channels, subtract that from each channel (accounting for channel flips along the x-axis), then models the residuals to determine channel-dependent 1/f noise. These are then all combined to create a full frameAdded logic to better handle cases where only a single integration is present. In that case, we are unable to work on residuals, so we simply apply an outlier mask to exclude pixels with high flux. The fitting routine then dynamically adapts the mask based on noise-subtracted residuals.