Skip to content

Commit

Permalink
Merge branch 'master' into reference_uri_to_cache_path
Browse files Browse the repository at this point in the history
  • Loading branch information
hbushouse authored Jun 11, 2024
2 parents 69a70c4 + 3e5761a commit 4d19b45
Show file tree
Hide file tree
Showing 15 changed files with 550 additions and 398 deletions.
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ pixel_replace
- Moved pixel_replace in the calwebb_spec2 pipeline and added it to the calwebb_spec3
pipeline. In both pipelines it is now executed immediately before resample_spec/cube_build. [#8409]

- Added estimated errors and variances for replaced pixels, following the
interpolation scheme used for the data. [#8504]

ramp_fitting
------------

Expand Down Expand Up @@ -226,6 +229,8 @@ resample

- Change `fillval` parameter default from INDEF to NaN [#8488]

- Removed the use of the `drizpars` reference file [#8546]

resample_spec
-------------

Expand All @@ -237,6 +242,8 @@ resample_spec
when the slit was closely aligned with the RA direction
sky. [#8511]

- Removed the use of the `drizpars` reference file [#8546]

residual_fringe
---------------

Expand Down
5 changes: 3 additions & 2 deletions docs/jwst/pixel_replace/arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ The ``pixel_replace`` step has the following step-specific arguments:

``--algorithm`` (str, default='fit_profile')
This sets the method used to estimate flux values for bad pixels. The default 'fit_profile' uses a profile
fit to adjacent column values. The minimum gradient ('mingrad') method is also available for the MIRI MRS.
fit to adjacent column values. The minimum gradient ('mingrad') method, developed for MIRI MRS data, may
also be used for all instruments and modes.

``--n_adjacent_cols`` (int, default=3)
Number of adjacent columns (on either side of column containing a bad pixel) to use in
creation of the source profile, in cross-dispersion direction. The total number of
columns used in the profile will be twice this number; on array edges, the total number
of columns contributing to the source profile will be less than ``2 * n_adjacent_cols``.

Ignored when ``algorithm = 'mingrad'``.
2 changes: 2 additions & 0 deletions docs/jwst/pixel_replace/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ flagged as ``DO_NOT_USE`` in 2-D extracted spectra using interpolation methods,
prior to rectification in the :ref:`resample_spec <resample_step>` step.
``pixel_replace`` inserts these estimates into the 2-D data array,
unsets the ``DO_NOT_USE`` flag, and sets the ``FLUX_ESTIMATED`` flag for each affected pixel.
Error values and variance components for the replaced pixels are similarly updated with
estimated values, following the same interpolation method as is used for the data.

This step is provided as a cosmetic feature and, for that reason, should be used with caution.

Expand Down
2 changes: 1 addition & 1 deletion docs/jwst/pixel_replace/reference_files.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Reference File
==============

This step does not use any reference file.
This step does not use any reference files.
51 changes: 0 additions & 51 deletions docs/jwst/references_general/drizpars_reffile.inc

This file was deleted.

16 changes: 0 additions & 16 deletions docs/jwst/references_general/drizpars_selection.inc

This file was deleted.

4 changes: 0 additions & 4 deletions docs/jwst/references_general/references_general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ documentation on each reference file.
+-----------------------------------------------+--------------------------------------------------+
| :ref:`refpix <refpix_step>` | :ref:`REFPIX <refpix_reffile>` |
+-----------------------------------------------+--------------------------------------------------+
| :ref:`resample <resample_step>` | :ref:`DRIZPARS <drizpars_reffile>` |
+-----------------------------------------------+--------------------------------------------------+
| :ref:`reset <reset_step>` | :ref:`RESET <reset_reffile>` |
+-----------------------------------------------+--------------------------------------------------+
| :ref:`residual_fringe <residual_fringe_step>` | :ref:`FRINGEFREQ <fringefreq_reffile>` |
Expand Down Expand Up @@ -204,8 +202,6 @@ documentation on each reference file.
+--------------------------------------------------+-----------------------------------------------+
| :ref:`DISTORTION <distortion_reffile>` | :ref:`assign_wcs <assign_wcs_step>` |
+--------------------------------------------------+-----------------------------------------------+
| :ref:`DRIZPARS <drizpars_reffile>` | :ref:`resample <resample_step>` |
+--------------------------------------------------+-----------------------------------------------+
| :ref:`EMICORR <emicorr_reffile>` | :ref:`emicorr <emicorr_step>` |
+--------------------------------------------------+-----------------------------------------------+
| :ref:`EXTRACT1D <extract1d_reffile>` | :ref:`extract_1d <extract_1d_step>` |
Expand Down
8 changes: 3 additions & 5 deletions docs/jwst/resample/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ The ``resample`` step can take as input either:
#. a single 2D input image
#. an association table (in json format)

The defined parameters for the drizzle operation itself get
provided by the DRIZPARS reference file (from CRDS). The exact values
used depends on the number of input images being combined and the filter
being used. Other information may be added as selection criteria later,
but for now, only basic information is used.
The parameters for the drizzle operation are provided via ``resample``
step parameters, which can be overridden by a step parameter reference
file from CRDS.

The output product gets defined using the WCS information of all inputs,
even if it is just a single input image. The output WCS defines a
Expand Down
4 changes: 1 addition & 3 deletions docs/jwst/resample/reference_files.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Reference File
==============
The ``resample`` step uses the DRIZPARS reference file.

.. include:: ../references_general/drizpars_reffile.inc
The ``resample`` step does not use any reference files.
3 changes: 2 additions & 1 deletion jwst/pipeline/calwebb_spec3.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,11 @@ def process(self, input):
for cal_array in result:
cal_array.meta.asn.table_name = op.basename(input_models.asn_table_name)
result = self.outlier_detection(result)

# interpolate pixels that have a NaN value or are flagged
# as DO_NOT_USE or NON_SCIENCE.
print(result)
result = self.pixel_replace(result)

# Resample time. Dependent on whether the data is IFU or not.
resample_complete = None
if exptype in IFU_EXPTYPES:
Expand Down
Loading

0 comments on commit 4d19b45

Please sign in to comment.