Work / JWST pipeline

From raw detector reads to a calibrated JWST image

JWST's detectors record how charge builds up in every pixel. The calibration pipeline turns those raw ramps into images and spectra a scientist can trust. I worked with the official pipeline and the MIRAGE simulator, and this page follows the detector-level stage, where most of the instrument's quirks get cleaned up.

Research project at IIT Hyderabad, under the guidance of Prof. Mayukh Pahari.

Four stages

Goes in

The *_uncal.fits files: each pixel's ramp of non-destructive reads.

What happens

Detector effects are corrected one step at a time: data-quality flags, saturation, superbias, reference pixels, linearity and dark current, then jump detection and ramp fitting.

Comes out

A count-rate image in counts per second for each exposure, *_rate.fits. This is the stage my plots below come from.

Up the ramp

A detector never takes a single picture. It reads each pixel again and again while charge builds up, and the slope of that ramp is the count rate, the number the pipeline wants. A cosmic ray adds a sudden jump, and a straight line fitted through the jumped ramp gives the wrong rate. Stage 1 flags the jump and fits the pieces either side.

One pixel, 20 reads

simulated
    Simplified: Gaussian noise, one pixel, no saturation.

    Try raising the jump, then lowering it until the flag disappears. Small jumps hide in the noise and barely change the fit.

    What the steps do to real data

    To see the corrections at work, I ran exposures through Stage 1 and plotted the result before and after individual steps. These are from my own runs.

    Two line plots of detector counts against row pixel index. Before the superbias step the counts sit on a large offset with strong structure. After it the offset is gone and the spectral traces stand out from a flat baseline. The right plot shows the same with the median subtracted.
    Counts by row, before (blue) and after (orange) the superbias step. The right plot shows the same with the median subtracted.
    Two detector images, each 2048 by 256 pixels, showing two curved spectral traces. The upper panel is before the reference-pixel step and the lower panel is after it.
    The detector image before and after the reference-pixel step, which removes slow drifts in the detector bias.