The calwebb_image3 module is stage 3 of the JWST Science 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.

On this page

Words in bold are GUI menus/
panels or data software packages; 
bold italics are buttons in GUI
tools or package parameters.

Unless otherwise stated, the algorithms described are the baseline version.  Note that all steps in this module are common to both NIR and MIR data.

A brief description of each of the steps within calwebb_image3 can be found below, along with links to further details (e.g., the relevant reference files) that can be found on the corresponding ReadTheDocs pages. Note, however, that the reference files themselves are all provided via CRDS. For instrument mode-specific notes on these pipeline steps see the corresponding known issues with JWST data articles.

Figure 1. calwebb_image3

Click on image for a larger view. 

Graphical representation of all the steps in the calwebb_image3 module.

Refine relative WCS

ReadTheDocs documentation: Tweakreg 
Package name: tweakreg

The pointing information provided by the spacecraft is imperfect, and can be in error by a small amount. If different guide stars were used, this error can differ between mosaic tiles leading to alignment errors in the final combined image mosaic. This step refines the WCS information of individual images using the locations of common sources between them.

Moving target WCS

ReadTheDocs documentation: Moving Target WCS
Package name:

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

ReadTheDocs documentation: Skymatch 
Package name: skymatch

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.

Outlier detection

ReadTheDocs documentation: Outlier Detection 
Package name:

While the majority of cosmic ray events will be flagged in calwebb_detector1 and rejected when building the uncalibrated slope image, some outliers nonethess make it through both the calwebb_detector1 and calwebb_image2 pipelines. This dedicated step therefore looks for any such outliers using overlapping sky regions between different exposures, resulting in a pixel data quality flag being set where such outliers are detected.

It should be noted that if a moving object is present in observations that are specified as a fixed target, this step can can erase the signal from such an object. (And vice versa, for observations that are specified as moving target, this step can erase the signal from fixed objects such as stars or galaxies which will trail across the detector during the integrations). This is discussed further in Moving Target Calibration and Processing.

Imaging combination

ReadTheDocs documentation: Resampling 
Package name:

The combination of multiple images into a mosaic is carried out by removing the distortion and combining the resampled images onto a grid where all the pixels have the same spatial scale, which is equal to the average input detector pixel scale by default. This is done for all the images obtained in a specific filter in an observation, grouped into an association file (ASN), which is required for this step. 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.

Source catalog

ReadTheDocs documentation: Source Catalog 
Package name:

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 step also produces the segmentation map for the identified sources. The 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 from calwebb_spec2 are recreated at this stage to provide the highest quality products that include the results of the ensemble processing (updated WCS, matching backgrounds, outlier detection). These products are for the Archive and include the unrectified 2-D images and rectified 2-D images.

Notable updates

Originally published