Skip to content

Commit

Permalink
JP-2682: Discontinue use of drizpars reference file (#8546)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbushouse authored Jun 11, 2024
1 parent cdadd8d commit 3e5761a
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 264 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,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 @@ -240,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
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.
29 changes: 3 additions & 26 deletions jwst/resample/resample_spec_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,35 +62,12 @@ def process(self, input):
output = input_new.meta.filename
self.blendheaders = False

# Get the drizpars reference file
for reftype in self.reference_file_types:
ref_filename = self.get_reference_file(input_models[0], reftype)

if ref_filename != 'N/A':
self.log.info('Drizpars reference file: {}'.format(ref_filename))
kwargs = self.get_drizpars(ref_filename, input_models)
else:
# Deal with NIRSpec, which currently has no default drizpars reffile
self.log.info("No DRIZPARS reffile")
kwargs = self._set_spec_defaults()
kwargs['blendheaders'] = self.blendheaders

kwargs['output_shape'] = self._check_list_pars(
self.output_shape,
'output_shape',
min_vals=[1, 1]
)
kwargs['output_wcs'] = self._load_custom_wcs(
self.output_wcs,
kwargs['output_shape']
)

kwargs['allowed_memory'] = self.allowed_memory
# Setup drizzle-related parameters
kwargs = self.get_drizpars()
kwargs['output'] = output

# Call resampling
self.drizpars = kwargs

# Call resampling
if isinstance(input_models[0], MultiSlitModel):
result = self._process_multislit(input_models)

Expand Down
Loading

0 comments on commit 3e5761a

Please sign in to comment.