How JWST Compresses Images for Earth Transmission

The James Webb Space Telescope (JWST) captures massive, high-fidelity deep-field and calibration observations that must be efficiently stored and transmitted across deep space within tight bandwidth constraints. To maintain scientific integrity while managing onboard storage limits, JWST relies on an onboard compression architecture centered on lossless data compression algorithms standardized by the Consultative Committee for Space Data Systems (CCSDS). By applying entropy-coding techniques directly to the detector readouts prior to packaging for downlink, the observatory preserves absolute radiometric precision without exhausting its telemetry margins.

Onboard Readout and Sampling

Before any compression occurs, JWST’s primary science instruments—such as NIRCam, NIRSpec, and MIRI—read their detectors using a technique known as "up-the-ramp" sampling (MULTIACCUM mode). Instead of taking a single exposure, the detectors non-destructively read pixel charge levels at regular intervals as photons accumulate.

This process generates large data arrays per exposure, capturing every subtle change along with cosmic ray strikes and detector artifacts. For deep-field calibration images, keeping these individual readouts intact is essential for establishing baseline noise levels, evaluating dark current, and performing flat-field corrections.

The CCSDS Lossless Compression Algorithm

Once the detector frames are gathered by an instrument’s Focal Plane Electronics (FPE), the raw integers pass to the Integrated Science Instrument Module (ISIM) Command and Data Handling (IC&DH) system. JWST utilizes hardware-accelerated lossless compression adhering to the CCSDS 121.0 standard, which relies heavily on Rice coding.

Rice compression is an adaptive, entropy-based algorithm optimized for spatial data with smoothly varying values:

  1. Prediction and Differencing: The algorithm calculates the difference between adjacent pixel values. Because astronomical calibration fields and background sky generally exhibit high spatial correlation, these differences (residuals) cluster tightly around zero.
  2. Adaptive Block Coding: The residual stream is split into small blocks of pixels (typically 16 pixels per block). The encoder evaluates the entropy of each block and selects the optimal Rice code parameter to represent the residuals using the fewest possible bits.
  3. Variable-Length Bitstream: Residuals close to zero are assigned very short bit sequences, while rarer, large-deviation values receive longer codes.

Because calibration images require exact flux measurements down to single-electron levels, lossy compression (such as JPEG-based transforms) is not utilized for science or calibration frames. Lossless Rice compression yields compression ratios typically ranging between 1.5:1 and 2.5:1, depending on the noise profile and star density of the field.

After compression, the telemetry packets are written to the spacecraft's Solid-State Recorder (SSR), which has an active capacity of approximately 68 gigabytes. The compressed files remain buffered in the SSR until JWST points its high-gain Ka-band antenna toward NASA’s Deep Space Network (DSN) during daily ground station passes.

Using the Ka-band transmitter, the spacecraft delivers the compressed data stream at rates up to 28 megabits per second. Ground systems at the Space Telescope Science Institute (STScI) then reverse the Rice decoding pipeline, reconstructing the raw pixel arrays bit-for-bit to begin the calibration and reduction pipeline.