Skip to content

Commit 44f240b

Browse files
authored
JP-3433: pixel_replace doc updates (#7990)
1 parent 7a6b72e commit 44f240b

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

CHANGES.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
1.12.3 (unreleased)
22
===================
33

4-
-
4+
documentation
5+
-------------
6+
7+
- Updated the ``calwebb_spec2`` pipeline docs to indicate that the ``pixel_replace`` step is
8+
applied to NIRSpec IFU data, and made minor wording updates to the ``pixel_replace`` step
9+
docs. [#7990]
10+
511

612
1.12.2 (2023-10-02)
713
===================
@@ -166,7 +172,7 @@ datamodels
166172
- updated ``stdatamodels`` pin to ``>=1.8.0`` [#7854]
167173

168174
documentation
169-
------------
175+
-------------
170176

171177
- Fixed a reference to the ``ramp_fitting` module in the user documentation. [#7898]
172178

docs/jwst/pipeline/calwebb_spec2.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ TSO exposures. The instrument mode abbreviations used in the table are as follow
7777
+----------------------------------------------------------+-----+-----+-----+-----+-----+-----+-----------------+------+--------+-----+
7878
| :ref:`residual_fringe <residual_fringe_step>` \ :sup:`2` | | | | | | |c| | | | | |
7979
+----------------------------------------------------------+-----+-----+-----+-----+-----+-----+-----------------+------+--------+-----+
80-
| :ref:`pixel_replace <pixel_replace_step>` \ :sup:`2` | |c| | |c| | | |c| | |c| | | | |c| | |c| | |
80+
| :ref:`pixel_replace <pixel_replace_step>` \ :sup:`2` | |c| | |c| | |c| | |c| | |c| | | | |c| | |c| | |
8181
+----------------------------------------------------------+-----+-----+-----+-----+-----+-----+-----------------+------+--------+-----+
8282
| :ref:`resample_spec <resample_step>` | |c| | |c| | | |c| | | | | | | |
8383
+----------------------------------------------------------+-----+-----+-----+-----+-----+-----+-----------------+------+--------+-----+
@@ -92,7 +92,8 @@ For NIRISS and NIRCam WFSS, as well as NIRCam TSO grism exposures, the order is
9292
flat_field, extract_2d, and srctype (no wavecorr).
9393
For all other modes the order is extract_2d, srctype, wavecorr, and flat_field.
9494

95-
:sup:`2`\ By default this step is skipped in the ``calwebb_spec2`` pipeline.
95+
:sup:`2`\ By default this step is skipped in the ``calwebb_spec2`` pipeline, but
96+
is enabled for some modes via overrides provided in parameter reference files.
9697

9798
:sup:`3`\ NIRISS SOSS can have multiple spectral orders contribute flux to one pixel; because
9899
photometric correction values depend on the spectral order assigned to a pixel, the order of

docs/jwst/pixel_replace/main.rst

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
89
If 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
1011
the extracted spectrum.
1112

1213
To 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

1721
Algorithms
1822
==========
@@ -22,11 +26,11 @@ Adjacent Profile Approximation
2226

2327
This 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
2630
which cross-dispersion vectors (column or row, depending on dispersion direction) contain
2731
at 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
3135
the 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.
3640
Minimum 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
4044
using the overlap between detector pixels and output cube voxels. The effects of NaN values are thus not
4145
as severe as for slit spectra, but can manifest as small dips in the extracted spectrum when a NaN value
4246
lands atop the peak of a spectral trace and cube building interpolates from lower-flux adjacent values.

0 commit comments

Comments
 (0)