This algorithm initially was developed to flag off-order (i.e., background) pixels that are potentially affected by a cosmic ray event. The cosmic ray flagging procedure was conceived for application by the high-dispersion background determination (BCKGRD) module.
The flagging by the COSMIC_RAY module is done by dividing the non-illuminated regions of the target into 57 × 57-pixel boxes and computing local means and rms statistics for each box (see Fahey, Bogert, and Smith 1994). A flagging-threshold was determined empirically as a function of a normalized rms parameter (rms/mean) for each camera. The choice of this criterion was driven by a trade-off between requirements of detecting the ``coma'' of cosmic rays and not triggering on high points in the background regions when the rms is large.
The sensitivity of the BCKGRD solutions to cosmic rays actually is caused by the surrounding low-level coma regions of these central ``hit'' areas. This can cause ringing over a larger spatial scale across the image. In practice it was difficult to discriminate against the background-flux granularity without sacrificing the COSMIC_RAY module's ability to detect coma regions. An optimization of the trade-off between detecting low-level coma and not flagging isolated high pixels was such that the flagging still occurred frequently enough that instabilities, resulting from pixel-undersampling, occurred in many background extractions for all three cameras. As a result, the cosmic ray image extension to the high-dispersion SI (CRHI) is not used by BCKGRD but is retained as an output product for informational purposes only. The contents of the CRHI are encoded as follows. Pixels which are masked out by the COSMIC_RAY module (e.g., on-order pixels and regions outside the target area) are denoted in the CRHI with a value of +64. Non-condition pixels (i.e., those that are not flagged as cosmic rays) are signified in the CRHI by a value of +32. Pixels that are determined to be affected by cosmic rays are indicated with a value of +160.