The algorithms for CALWEBB_IMAGE3, which is Stage 3 of the JWST calibration pipeline for imaging data, are described. These algorithms process the data from calibrated slope images to mosaics and source catalogs.
The CALWEBB_IMAGE3 module is Stage 3 of the JWST calibration pipeline for all imaging data. The inputs to this stage are the calibrated slope images (CALWEBB_IMAGE2 output) and the outputs are mosaics and source catalogs. The steps are listed in Figure 1 with the flow from the top to the bottom.
Unless otherwise stated, the algorithms described are the baseline version.
Steps for all data
Note that all steps in this module are common to both NIR and MIR data.
Refine relative WCS
See also: Tweakreg (more detailed software module documentation)
The relative WCS information between the different images is refined using the locations of common sources between images. The AstroDrizzle code is used for this step. The WCS information associated with each image is updated by this step.
Moving target WCS
See also: Moving Target WCS (more detailed software module documentation)
The step runs only for moving target data, where it takes the original WCS and modifies it such that the output frame of the final WCS is centered at the average location of the moving target.
Background matching ("Skymatch")
See also: Skymatch (more detailed software module documentation)
The background levels in images can vary as a function of time due to the thermal telescope emission, zodiacal emission, etc. This step corrects the overall background level of each image so that the overlapping regions of the images have the same background. The AstroDrizzle code is used for this step.
See also: Outlier Detection (more detailed software module documentation)
A 2nd pass at outlier detection is done using the overlapping regions observed in different exposures. The majority of the outliers will be due to cosmic rays undetected during the 1st pass at outlier detection done in CALWEBB_DETECTOR1. The AstroDrizzle code is used for this step. The presence of an outlier results in a pixel flag being set.
See also: Resampling (more detailed software module documentation)
The combination of multiple images into a mosaic is done using the AstroDrizzle code with the output pixel size set to the input pixel size. This is done for all the images taken in a specific band in an observation. Pixels flagged as "bad" (outliers, hot pixels, etc.) are not used in the creation of the mosaic.
Note that moving targets are supported and the mosaics are created in the moving target reference frame.
See also: Source Catalog (more detailed software module documentation)
Source catalogs are created using the Astropy Photutils package. The goal of this step is to produce a good quality catalog that can be used as a basic 1st-pass source list. This catalog is subsequently used for the reduction of NIRISS/NIRCam WFSS observations and to set up NIRSpec MSA observations.
Update exposure level products
The exposure level products are re-created at this stage to provide the highest quality products that include the results of the ensemble processing (updated WCS, matching backgrounds, a 2nd pass outlier detection). These products are for the archive and include the unrectified 2D images and rectified 2D images.