@@ -4,15 +4,19 @@ Description
44:Classes: `jwst.pixel_replace.PixelReplaceStep `
55:Alias: pixel_replace
66
7- During spectral extraction, pixels flagged as bad are ignored in the summation process.
7+ During 1-D spectral extraction (:ref: `extract_1d <extract_1d_step >` step),
8+ pixels flagged as bad are ignored in the summation process.
89If a bad pixel is part of the point-spread function (PSF) at a given wavelength, the
9- absence of the signal in the flagged pixel will lead to a divot at that wavelength in
10+ absence of the signal in the flagged pixel will lead to a hollow space at that wavelength in
1011the extracted spectrum.
1112
1213To avoid this defect in the 1-D spectrum, this step estimates the flux values of pixels
13- flagged as ``DO_NOT_USE `` in 2-D extracted spectra, prior to rectification in the
14- ``resample_spec `` step. ``pixel_replace `` inserts these estimates into the data array,
15- unsets the ``DO_NOT_USE `` flag and sets the ``FLUX_ESTIMATED `` flag for each pixel affected.
14+ flagged as ``DO_NOT_USE `` in 2-D extracted spectra using interpolation methods,
15+ prior to rectification in the :ref: `resample_spec <resample_step >` step.
16+ ``pixel_replace `` inserts these estimates into the 2-D data array,
17+ unsets the ``DO_NOT_USE `` flag, and sets the ``FLUX_ESTIMATED `` flag for each affected pixel.
18+
19+ This step is provided as a cosmetic feature and, for that reason, should be used with caution.
1620
1721Algorithms
1822==========
@@ -22,11 +26,11 @@ Adjacent Profile Approximation
2226
2327This is the default (and most extensively tested) algorithm for most spectroscopic modes.
2428
25- First, the input 2-d spectral cutout is scanned across the dispersion axis to determine
29+ First, the input 2-D spectral cutout is scanned across the dispersion axis to determine
2630which cross-dispersion vectors (column or row, depending on dispersion direction) contain
2731at least one flagged pixel. Next, for each affected vector, a median normalized profile is created.
2832
29- First, the adjacent arrays (the number of which is set by the step argument
33+ The adjacent arrays (the number of which is set by the step argument
3034``n_adjacent_cols ``) are individually normalized. Next, each pixel in the profile is set to
3135the median of the normalized values. This results in a median of normalized values filling the vector.
3236
@@ -36,7 +40,7 @@ estimated from the scaled profile.
3640Minimum Gradient Estimator
3741--------------------------
3842
39- In the case of the MIRI MRS, NaN-valued pixels are partially compensated during the cube building process
43+ In the case of the MIRI MRS, NaN-valued pixels are partially compensated during the IFU cube building process
4044using the overlap between detector pixels and output cube voxels. The effects of NaN values are thus not
4145as severe as for slit spectra, but can manifest as small dips in the extracted spectrum when a NaN value
4246lands atop the peak of a spectral trace and cube building interpolates from lower-flux adjacent values.
0 commit comments