Shower and Snowball Artifacts

Data artifacts known as snowballs (in the near-IR) and showers (in the mid-IR) are caused by large cosmic ray impacts that affect hundreds of pixels (M. Regan 2023). 

On this page

The vast majority of cosmic ray impacts directly affect only one or 2 pixels. However, snowballs and showers affecting hundreds of pixels are often seen in the data as well. In the near-IR detectors snowballs tend to be circular, while in the mid-IR detectors showers often have elongated and irregular shapes.

A very rough estimate of the rate is around one snowball every 20 s in each 2K × 2K near-infrared detector, with approximately a factor of 2 lower rate of occurrence for shower events in the mid-IR. This frequency is highly variable however, with some observations affected by large numbers of such artifacts and other observations nearly completely unaffected. While similar events were seen in the near-IR detectors on the ground, the typical frequency was an order of magnitude lower and the amount of charge deposited was also significantly smaller.

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

Both snowball and shower features are difficult to detect in the pipeline, as the deposited charge at large distances from the primary impact site can be small and released gradually over time rather than in a single event (in some cases even persisting through a detector reset between exposures). These features are most significant for deep observations, and can limit the ability of such observations to reach the detector noise floor.

Starting with jwst pipeline build 9.0 (Fall 2022) the jump step in the pipeline has been capable of detecting and flagging pixels affected by both showers and snowballs, and the algorithms for doing so have been continuously improved since.  As of build 10.2 (Spring 2024) snowballs in the near-IR detectors can be almost entirely removed, and the pipeline does so by default for NIRCam, NIRSpec, and some NIRISS observing modes.  Showers in the mid-IR can be improved (although not removed entirely), which is done automatically for some MIRI imaging modes.  Users can toggle this step for themselves in offline reprocessing using the find_showers (mid-IR) and expand_large_events (near-IR) parameters respectively (see the ReadTheDocs Jump Detection page.)


In the near-IR, snowball artifacts are produced by extremely energetic cosmic rays that saturate the detector and affect the slopes of neighboring pixels. Figure 1 shows a close-up of a slope image (generated in stage 1 detector processing) centered on the location of a very large snowball. This slope image is from a long NIRSpec dark exposure and is very sensitive to any perturbation in the calculated slope. Thus, this is a worst case example; images with significant background rates will see much smaller effects.

Figure 1. Cutout of a slope image centered on the location of a very large snowball

Residual effects of a snowball

Alternating light and dark regions are caused by various effects. See text below for details.
Since dark exposures accumulate counts in a highly linear fashion, they provide a sensitive probe of deviations caused by the event. Four regions can be identified. 

  • The central region inside the white circle indicates pixels that saturated when the particle hits the detector (allowing ramp fitting to fit only groups observed prior to the hit). 
  • The white ring of pixels just outside of the saturated pixels represents pixels that saw a discontinuity in the count rate when the event occurred but did not saturate. The discontinuity was flagged as a "jump" by the pipeline and was not included in the slope calculation. They show the excess slope due to charge spilling from the saturated region in subsequent groups of the integration.
  • The large darker region outside the white ring is caused by pixels that were flagged as a jump when the snowball occurred but then had below average count rates because photoelectrons were temporarily trapped by small defects in the detector pixels. 
  • Finally, the outer white halo represent pixels that saw an increase in the accumulated charge when the snowball event occurred but were uncorrected because the increase was below the pipeline's detection threshold.  

Although the halo regions are clearly indicated in dark exposures, they can sometimes be difficult to see in images with significant astrophysical or other backgrounds.

As indicated by Figure 2, the majority of snowballs are relatively small, affecting up to about 100 pixels. There is a long tail to the distribution though, with some snowballs impacting nearly a thousand or more pixels.

Figure 2. An initial look at snowballs sizes

Size Distribution of Snowballs in NIRCAM

This histogram provides a first look at the size distribution of typical snowball events from data obtained in-flight for the NIR detectors.
The algorithms to detect and remove these snowball artifacts from the data have improved throughout the mission. As illustrated in Figure 3, the typical science data products provided by build 10.0 of the jwst pipeline contained multiple artifacts as the algorithm was not robust enough to be turned on in default processing. Build 10.1 improved the ability of the algorithm to flag faint outer regions of snowballs substantially, although leaving persistence from the bright cores. Build 10.2 in turn addressed both these residual bright cores and multiple other small improvements, allowing for the step to be run by default on most NIR observing modes.

Ongoing work will address further remaining issues, including the relatively uncommon case of non-circular snowballs likely arising from cosmic rays with more elongated paths through the detector.

Figure 3. Snowball correction in the JWST pipeline

This figure illustrates the typical snowball correction in the default JWST science calibration pipeline. In build 10.0 (left panels) no correction was made automatically, and data products thus showed significant snowball artifacts. Improvements to the algorithm in build 10.1 allowed removal of most of the outer halos of snowballs (middle panels), while further improvements to the detection and masking algorithms allowed build 10.2 to almost entirely remove snowball artifacts from the data (right panels). The data shown are deep NIRSpec MSA observations from PID 2123, focusing on a zoomed-in view of a large snowball (top panels) and a wider view of multiple snowball artifacts (bottom panels). Green pixels represent bad pixels flagged by the pipeline for which no data is available.


In the mid-IR, shower artifacts are thought to result from large clusters of energetic particles produced by cosmic rays. Unlike traditional cosmic rays, which affect a small number of pixels and produce a nearly delta function jump in the ramp for a given pixel, these cosmic ray showers can affect hundred of pixels (see Figure 1), release charge slowly over a period of many seconds, and can produce latents visible in the next integration (and in some cases are produced by initial events that occurred while the detector was in idle mode before a given exposure began).  These showers are found in both the SHORT and LONG detectors of the MRS, and can sometimes limit the depth of long observations.  Unlike snowballs in the near-IR, shower artifacts typically have irregular, extended shapes and are significantly more challenging to detect and flag in the jwst pipeline.

As illustrated by Figures 4 and 5, showers can be strongly time variable and (likely) dependent on the solar weather, with some deep exposures nearly completely free of shower artifacts and others severely affected.

Figure 4. Mid-IR shower artifacts as seen in the MIRI MRS

Click on the figure for a larger view.

Shower events can be strongly time variable; left and right panels show "rate" files (measured in DN/s) for extremely deep SLOWR1 observations with the MRS SHORT detector. While the data on the left is nearly unaffected by showers, the data on the right is dominated by multiple strong shower artifacts.

Figure 5. Mid-IR showers in the MIRI Imager

Click on the figure for a larger view

Images of a calibration star from commissioning activity PID 1023 - Observations 13 (left) and 14 (right), part of a dithered sequence. The right image shows the appearance of cosmic shower artifacts in the detector image—an elongated structure in the center right of the image as well as several more spherical “showers" that are not part of the sky image towards the upper left and lower right of the image. The high power cosmic ray also pulls up the value of the entire row in which it hit the detector. Images are taken at 5.6 μm and processed through calwebb_detector1  with flux units of DN/s. © Dicken et al. 2024.

The jwst calibration pipeline is able to detect and correct for many shower artifacts in the data by flagging the affected groups in the ramp (Figure 6) using the find_showers parameter in the jump step.  However, as of build 10.2 this correction is nonetheless unable to find and remove all such artifacts (particularly those resulting from events that occurred prior to the start of an exposure).  Likewise, for the MIRI MRS the correction can sometimes erroneously flag sections of bright sources as showers, prohibiting the pipeline from applying it automatically to all observations. Users should therefore determine for themselves whether their science is sufficiently impacted by showers (typically deep observations of faint targets) to benefit from applying the corrections. Such corrections generally perform better for data that is dithered and consists of at least 3 integrations, while 5 or more will provide the best results. However, this may not be practical in general for deep observations since (for pixels not affected by showers) significantly better SNR is achieved using a small number of relatively long ramps rather than multiple short ramp exposures.

Figure 6. MRS showers before and after pipeline correction

Click on the figure for a larger view

The pipeline find_showers option allows additional flagging and removal of showers artifacts. Left and right panels show an example "rate" file (measured in DN/s) for the MRS SHORT detector before and after shower correction; this correction removes smaller shower artifacts effectively and can minimize larger artifacts (although cannot always remove them entirely).


Regan, M. 2023, JWST-STScI-008545
Detection and Flagging of Showers and Snowballs in JWST

Dicken, D. et al. 2024, in prep

Notable updates
    Article rewritten for build 10.2, reorganized and added figure about typical snowball corrections.

    Added an example of cosmic ray shower for the MIRI imager.

    Reformatted page to include additional information.

  • Updated with MIRI showers figure and pipeline information
Originally published