The algorithms for CALWEBB_IMAGE2, which is Stage 2 of the JWST science calibration pipeline for imaging data, are described.  These algorithms process the data from uncalibrated slope images to calibrated slope images. 

On this page

The CALWEBB_IMAGE2 module is Stage 2 of the JWST science calibration pipeline for all imaging observations. The input to this stage is the uncalibrated slope images (CALWEBB_DETECTOR1 output) and the output is calibrated slope images. 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.


Graphical representation of all the steps in the CALWEBB_IMAGE2 module. Checkmarks indicate which steps are applicable to which modes, for NIR and MIR observations. Note that the output rectified 2D products are useful for the archive to enable inspection of the data, while the Stage 3 of the calibration pipeline (described later) also produces rectified 2D products, which are an improvement on those from Stage 2 since they can include outlier detection based on comparison with other exposures.

Steps for both NIR and MIR data

Note that all steps in this module are common to both NIR and MIR data (but not all steps are applicable to all observation modes).

WCS information

See also: Assign WCS (more detailed software module documentation)

The information to transfer the pixel coordinates to astronomical coordinates (e.g., RA and Dec) is added to the data with this step. The needed information is described in the standard World Coordinate System (WCS) format—basically standard FITS WCS keywords and a distortion model. The WCS information and distortion model are provided by instrument and detector specific calibration reference files. The image data itself is not modified by this step.

Background subtraction

See also: Background Image Subtraction (detailed software module documentation)

If an APT specified background target was observed, a combined background image constructed from all exposures of that target is subtracted from the science target exposure. The background observations can be specified by the user when the calibration pipeline is being manually rerun.

Flat field correction

See also: Flat field correction (more detailed software module documentation)

The flat field corrects for the pixel-to-pixel variations and large scale variations in the instrument+telescope responsivity. The flat field image is taken from instrument and detector specific calibration reference files.

Flux calibration

See also: Photometric Calibration (more detailed software module documentation)

The multiplicative conversion factor between counts/sec and MJy/sr is applied to the data and recorded in the file header. A second conversion factor between counts/sec and micro-Jy/sq arcsec is also recorded in the header, with both of these conversion factors being FITS keywords. The pixel area reference file is also attached to the data allowing conversion between surface brightness and flux density for each pixel. Details of the calculation of these calibration factors can be found at JWST Data Absolute Flux Calibration.

Rectified 2D product

See also: Resampling (more detailed software module documentation)

As a product for the archive, rectified 2D images are created using the AstroDrizzle algorithm and the attached WCS information. This rectified 2D product is not used in the calibration pipeline itself, it is useful for visual browsing of the data.

Latest updates

    Addressed v1.1 comments.

Originally published