The computation of the extracted flux and corresponding identification and rejection of bad pixels is performed iteratively. The total flux at each wavelength is found by performing a weighted sum of all ``good'' (see next paragraph) pixels at the given wavelength according to:
where FN(i) is the net flux of the ith spatial pixel at this wavelength, and p(i) and are the corresponding profile and estimated noise values for that pixel. Similarly, the estimated error in the extracted flux is: which is hereafter referred to as the ``sigma'' spectrum. Because the sum of the profile values is involved in the calculation of the total flux, individual bad pixels can be excluded from the sum so that a reliable estimate of the total flux can be obtained based on only the remaining good pixels.At the outset of the extraction process, ``good'' pixels are those with flags greater than -256. Hence, pixels which have been assigned flags of -256 or more negative by the earlier processing stages are excluded from the extracted flux computation. However, pixels which were not flagged previously but which are found during the course of the extraction to have anomalously high FN values (hereafter referred to generically as SWET cosmic ray pixels) are also identified and excluded during calculation of extracted fluxes. This is accomplished by rejecting the most extreme outlying pixel at each wavelength sample if the value of that pixel is greater than a predetermined sigma level from the scaled profile at that wavelength. The threshold values for this rejection are 6, 5, and 4 for the LWP, LWR, and SWP cameras, respectively. The rejection thresholds for each camera were determined empirically so that most cosmic ray pixels are removed without removing good data points. When such a pixel is identified, it is assigned a flag value of -32 which is written back into the low-dispersion flag image (SF). Each time a new cosmic ray pixel is identified and excluded, an updated value for the total flux at that wavelength is computed. This process is repeated until no more pixels are rejected or until less than 30% of the flux in the profile at that wavelength sample remains.
The total numbers of pixels excluded as bad because they had already been assigned flags of -256 or more negative before the extraction procedure and those excluded as cosmic ray pixels by this routine are reported to the processing history log. In the event that either of these values exceeds 10% of the total number of pixels available to the extraction process, a warning message is issued in the processing history log.