2.2 WFC3 File Structure

All WFC3 science data products are two-dimensional images that are stored in Multi-Extension FITS files. All images taken during an exposure are bundled in a single FITS file, with each image stored in a separate FITS image extension (see Section 2.2 of the Introduction to the HST Data Handbooks). The WFC3 file structure differs for UVIS and IR data, as explained in the following sections.

2.2.1 UVIS Channel File Structure

The WFC3 UVIS detector is similar in structure to the ACS WFC detector, with two chips butted together to form a complete detector array. As shown in Figure 2.1, each chip has 4096 × 2051 imaging pixels, with 19 rows and 30 columns of virtual overscan at the long and short inside edges respectively, and 25 columns of physical overscan on each side. As a result, full-frame raw images have a total of 4206 × 4140 pixels, and after overscan subtraction in the calibration process, calibrated images have a total of 4096 × 4102 pixels.

Figure 2.1:Schematic of a raw, full-frame WFC3 UVIS image.

The UVIS detector operates only in ACCUM mode to produce time-integrated images. The data read from the two chips are stored in separate image sets, or "imsets" (see Section 2.2 of the Introduction to the HST Data Handbooks) within a single FITS file. Each imset contains three data arrays that are stored in three separate images extensions:

  • the science image (SCI)
  • the error array (ERR)
  • the data quality array (DQ)

When the user retrieves their data from the archive, the system delivers calibrated data which are processed by both CALWFC3 and AstroDrizzle. The AstroDrizzle step updates the header astrometric information, and adds 9 additional extensions to the final _flt or _flc files. In addition, with the release in Dec 2019 of improved astrometric corrections for WFC3, additional "headerlet" extensions, which encapsulate WCS information, will be appended to the _flt or _flc files. Thus, the FITS file corresponding to a single full-frame calibrated UVIS exposure has a minimum of 16 extensions and potentially more depending on the available astrometric solutions (as summarized in Table 2.5.)

The zeroth extension is the global or primary header unit. As seen in Figure 2.1 CHIP1 (UVIS1) is above CHIP2 (UVIS2) in y-pixel coordinates, but it is stored in imset 2 in the FITS file, shown graphically in Figure 2.2. Thus, the chip-extension notation is counter-intuitive. To display the science image for UVIS1, the user must specify the second science extension "file.fits[sci,2]". Similarly, the data quality and error arrays for UVIS1 are specified as "[dq,2]" and "[err,2]", respectively.

The extensions from 7 to 10 are tabular data stored as imsets [D2IMARR] with one extension per each CCD chip’s access. These imsets are filter-independent corrections for the CCD pixel-grid irregularities, an artifact of the manufacturing process imprinted on the detector itself. The lithographic-mask pattern correction is bi-linearly interpolated and used for pixel-by-pixel correction prior to correction for geometric distortion via the IDCTAB.

The extensions from 11 to 14 contain tabular data stored as imsets [WCSDVARR] with one extension per each CCD chip axis. These tabular data, which describe the fine-scale filter-dependent non-polynomial distortion corrections, are bi-linearly interpolated and used for pixel-by-pixel correction after correction for geometric distortion via the IDCTAB.

The 15th FITS extension, called [WCSCORR], contains a history of WCS changes, if the data were reprocessed with a new distortion correction reference file.

The 16th (and beyond) FITS extension, called [HDRLET], contains astrometric alignment information, one solution per headerlet.

Figure 2.2: Format for the first 7 extensions of UVIS FITS files. These extensions are present in both uncalibrated and calibrated products. The final calibrated _flc or _flt files, that the user can retrieve from the archive, also have an additional 9 extensions with the astrometric information populated by AstroDrizzle.

2.2.2 IR Channel File Structure

The WFC3 IR channel uses a 1024 × 1024 pixel detector. Reference (bias) pixels occupy the 5 rows and columns on each side of the detector, thus yielding bias-trimmed images with dimensions of 1014 × 1014 pixels, as shown in Figure 2.3.

Like NICMOS, the IR channel operates only in MULTIACCUM mode, which starts an exposure by resetting all the detector pixels to their bias levels and recording those levels in an initial "zeroth" readout. This is then followed by n non-destructive readouts (n can be up to 15 and is set by the observer as parameter NSAMP in the Phase II proposal); the data associated with each readout are stored in a separate imset in the FITS file. The final FITS file will have n+1 imsets (one for each n plus one for the zeroth read).

Figure 2.3: Format of a raw full WFC3 IR image.

For IR data, each imset consists of five data arrays:

  • the science image (SCI),
  • the error array (ERR),
  • the data quality array (DQ),
  • the number of samples array (SAMP), and

  • the integration time array (TIME).

An IR FITS file will therefore contain: the primary header unit and N imsets, which all together form a single IR exposure. The primary header keyword NSAMP records the total number of readouts worth of data contained in the file. Note that the value of NSAMP keyword is increased by 1 relative to proposal parameter NSAMP, because the keyword counts the zeroth read.

Also note that the order of the IR imsets in the FITS file is in reverse time order. The first imset in the file contains the result of the longest integration time (the last readout of the MULTIACCUM series). This is followed by the next-to-last readout and so on. The imset for the zeroth readout is stored last in the FITS file. This file organization has the advantage of placing the final readout first in the file, where it is easiest to access. This organization is shown graphically in Figure 2.4

Figure 2.4: Format for WFC3 IR data. Note that for IR data, readouts are stored in reverse chronological order.

2.2.3 Contents of Individual Arrays

The following sections explain the contents and origin of each of the individual arrays for WFC3 data products.

Science Image (SCI)

This image contains the data from the focal plane array (FPA) detectors. In raw data files, the science array is an integer (16-bit) image in units of data numbers, or DN. In calibrated data files, it is a floating-point value image in physical units of electrons (UVIS) or electrons per second (IR).

Error Array (ERR)

This is a floating-point image that contains an estimate of the statistical uncertainty associated with each corresponding science image pixel. It is expressed as a real number of signal units or signal rates (as appropriate for the units of the science image). The values for this array are calculated during calibration with the calwf3 task, combining detector read noise, Poisson noise in the detected signal, and uncertainties from applied calibration reference data.

Data Quality Array (DQ)

This array contains 16 independent flags indicating various status and problem conditions associated with each corresponding pixel in the science image. Each flag has a true (set) or false (unset) state and is encoded as a bit in a 16-bit integer word. Users are advised that this word should not be interpreted as a simple integer, but must be converted to base-2 and each bit interpreted as a flag. Table 2.6 lists the WFC3 data quality flags.

Warning. In raw data files, the ERR and DQ arrays will usually have the value of zero for all pixels, unless, for the DQ array, errors are detected in the down linked data. In order to reduce data volume, and, if no errors exist, both ERR and DQ extensions will contain null data arrays with PIXVALUE equal to zero.

Table 2.6: WFC3 Data Quality flags.  

FLAG ValueBit SettingData Quality Condition






0000 0000 0000 0000




0000 0000 0000 0001

Reed Solomon decoding error

Reed Solomon decoding error


0000 0000 0000 0010

Data replaced by fill value

Data missing and replaced by fill value


0000 0000 0000 0100

Bad detector pixel

Bad detector pixel


0000 0000 0000 1000


Deviant zero read (bias) value


0000 0000 0001 0000

Hot pixel

Hot pixel


0000 0000 0010 0000

CTE tail

Unstable response


0000 0000 0100 0000

Warm pixel

Warm pixel


0000 0000 1000 0000

Bad pixel in bias

Bad reference pixel


0000 0001 0000 0000

Full well saturation

Full well saturation


0000 0010 0000 0000

Bad or uncertain flat value

Bad or uncertain flat value, including "blobs"


0000 0100 0000 0000

Charge trap and sink pixels



0000 1000 0000 0000

A to D saturation

Signal in zero read


0001 0000 0000 0000

Cosmic ray detected by AstroDrizzle

Cosmic ray detected by AstroDrizzle


0010 0000 0000 0000

Cosmic ray detected during CR SPLIT or RPT OBS combination

Cosmic ray detected during calwf3 up the ramp fitting


0100 0000 0000 0000

Pixel affected by ghost/crosstalk

Pixel affected by ghost/crosstalk

Note: The CTE tail and ghost/crosstalk flags are currently not used

Number of Samples Array (SAMP)

This array is present only for IR data. It is a 16-bit integer array and contains the number of samples used to derive the corresponding pixel values in the science image. For raw and intermediate data files, the sample values are set to the number of readouts that contributed to the science image. For calibrated files, the SAMP array contains the total number of valid samples used to compute the final science image pixel value, obtained by combining the data from all the readouts and rejecting cosmic ray hits and saturated pixels. Similarly, when multiple exposures (i.e., REPEAT-OBS) are combined to produce a single image, the SAMP array contains the total number of samples retained at each pixel for all the exposures.

Integration Time Array (TIME)

This array is present only for IR data. This is a floating-point array that contains the effective integration time associated with each corresponding science image pixel value. For raw and intermediate data files, the time value is the total integration time of data that contributed to the science image. For calibrated datasets, the TIME array contains the combined exposure time of the valid readouts or exposures that were used to compute the final science image pixel value, after rejection of cosmic rays and saturated pixels from the intermediate data.

In raw and intermediate data files, the SAMP and TIME arrays will each have the same value for all pixels. In order to reduce data volume, these image extensions contain null arrays, and the value of the number of samples and integration time is stored in the header keyword PIXVALUE in the SAMP and TIME extensions, respectively.