ResampleData

class jwst.resample.resample.ResampleData(input_models, output=None, **pars)[source]

Bases: object

This is the controlling routine for the resampling process. It loads and sets the various input data and parameters needed by the drizzle function and then calls the C-based cdriz.tdriz function to do the actual resampling.

Notes

This routine performs the following operations:

1. Extracts parameter settings from input model, such as pixfrac,
   weight type, exposure time (if relevant), and kernel, and merges
   them with any user-provided values.
2. Creates output WCS based on input images and define mapping function
   between all input arrays and the output array.
3. Initializes all output arrays, including WHT and CTX arrays.
4. Passes all information for each input chip to drizzle function.
5. Updates output data model with output arrays from drizzle, including
   (eventually) a record of metadata from all input models.
Parameters:
  • input_models (list of objects) – list of data models, one for each input image
  • output (str) – filename for output

Methods Summary

blend_output_metadata(output_model) Create new output metadata based on blending all input metadata.
do_drizzle() Perform drizzling operation on input images’s to create a new output
update_driz_outputs() Define output arrays for use with drizzle operations.
update_fits_wcs(model) Update FITS WCS keywords of the resampled image.

Methods Documentation

blend_output_metadata(output_model)[source]

Create new output metadata based on blending all input metadata.

do_drizzle()[source]

Perform drizzling operation on input images’s to create a new output

update_driz_outputs()[source]

Define output arrays for use with drizzle operations.

update_fits_wcs(model)[source]

Update FITS WCS keywords of the resampled image.