A.1 Overview                                                                  
                                                                              
The driving philosophy behind the NEWSIPS Project is to provide a             
homogeneous data product within a completely automated processing             
environment. An algorithm to compute background fluxes in high dispersion,    
BCKGRD, was designed with this philosophy. Although this algorithm            
generally provides a good background flux estimate, the results are not       
always optimal for particular regions of some images. A customized            
interactive determination of the background fluxes based on individual        
image characteristics can produce a more accurate estimate of the             
background in certain cases when data pathologies are present.                
                                                                              
The determination of smoothed background fluxes follows the geometric         
resampling of pixels, so it is done with the high-dispersion resampled        
image (SI). A representative high-dispersion SI given in Figure A1 shows      
echelle orders running horizontally and the spatial (cross-dispersion)        
direction running vertically. We will refer hereafter to the image sectors    
at the top and bottom as the ``ends" of the image. The BCKGRD module          
produces smoothed background flux spectra which, together with the gross      
spectra, form the net spectra. The background model is created by computing   
continuous Chebyshev polynomial functions from pixels that sample valid       
background fluxes. For images with no continuum, the algorithm proceeds       
straightforwardly by sampling the neighboring interorder fluxes for each      
spectral order and fitting the result to a Chebyshev polynomial. The BCKGRD   
algorithm models the backgrounds of images having continuum flux in two       
one-dimensional passes, as described below.                                   
                                                                              
For continuum source images, the background determination algorithm begins    
by sampling fluxes along the spatial direction with an extraction slit 5      
pixels tall. We refer to these cuts as ``swaths" and the steps taken for      
this group of vertical swaths as ``Pass 1" operations. A total of 25          
parallel swaths (26 for SWP) are taken in the spatial direction, each         
located at a column position approximately 27 pixels larger than the          
preceding swath. Figure A1 shows the positions of these Pass 1 swaths as      
dotted vertical lines. The mean flux is computed along the extraction slit    
from pixels containing valid local background fluxes; pixels are given a      
weight of zero if they fall along the spectral orders or if they do not       
contain valid fluxes (i.e., they have negative nu flags). The result          
of this process is a background-flux array for each swath that is             
discontinuous in spatial pixel number and contains noise. The array is        
adjusted to account for interorder contamination using a Point Spread         
Function (PSF) modeling technique described in Section A.2.2. The adjusted    
array is fit to a trial Chebyshev function of degree 7. This fitting          
degree is decreased if ringing is detected in the initial solution. The       
resulting solution is a smoothed continuous fit to the raw background         
fluxes. Each of the Pass 1 swaths is fit to a Chebyshev polynomial array      
in the same fashion.                                                          
                                                                              
In the second pass (Pass 2) solutions from Pass 1 are used to form a second   
and final set of 7th degree Chebyshev functions which model the background    
fluxes at the positions of the echelle orders. This solution is determined    
by sampling the solutions from the first pass at the locations where they     
intersect the echelle-order locations. The echelle-order locations are        
represented as solid lines in Figure A1. The computation of a Chebyshev       
function from this sampling interpolates a continuous array of smoothed       
background fluxes at each wavelength along these orders. The solution is      
extrapolated beyond the target edges from the last calculated value.          
                                                                              
The final background solutions are represented in two forms. First, a         
background vector of 768 values is saved and written to the high-dispersion   
merged extracted FITS file as a separate record for each order. Second, the   
7 Chebyshev coefficients, together with a magnitude scale factor and          
starting and ending positions are written as FITS keywords. The ``gross"      
spectrum may be reconstructed simply by adding the background and the net     
flux solutions.                                                               
                                                                              
        Figure A1:   Layout of the background extraction swaths on a          
        sample SWP high-dispersion image. Lines running in vertical           
        (spatial) direction are the Pass 1 extractions. Raw fluxes are        
        sampled along these lines that are within the target ring and         
        outside or between the echelle orders. The reconstructed              
        background solutions created in Pass 2 are placed in the positions    
        of the echelle orders (horizontal lines).                             
                                                                              
                                                                              
A.2.1 Data Screening                                                          
                                                                              
Prior to the execution of the background determination algorithm, the         
fluxes and nu flags of each Pass 1 swath are evaluated to ensure that         
enough valid pixels exist in a swath to produce a reliable fit to the data.   
Any pixels containing flags with excessively negative ITF extrapolations or   
cosmic ray hits are added to a ``pixels-to-avoid'' working template for       
each Pass 1 swath. A few checks are then made to ensure that the              
background-determining algorithm will run properly. For example, if too few   
valid pixels can be found in a given Pass 1 swath to permit a reliable        
background extraction, the solution is set to a zero-flux array. If this is   
not repeated for the next swath, then the solution for the zeroed-out swath   
is reset to the mean of the two adjacent swaths.                              
                                                                              
                                                                              
A.2.2.1 Basic Flow                                                            
                                                                              
For continuum source images, a series of 25 or 26 nearly equally spaced       
extraction swaths (slit height of 5 pixels) are made in the spatial           
direction of the high-dispersion SI, with a starting position at small        
spatial pixel numbers (short wavelength end). The swath sample positions      
were carefully selected to avoid contamination from any possible              
low-dispersion (double) exposure. Except for the first and last few Pass 1    
swaths, which form short chords along the left and right edges of the         
camera image, each swath samples fluxes for nearly the entire range of        
sample positions; that is to say that they include pixels at the spatial      
ends of the camera which are not affected by contaminated                     
interorder-overlap flux. The ``interorder overlap" flux is described by a     
PSF model described below. The accumulated effects of overlapping PSFs        
increase as the orders become more closely spaced. The accumulation causes    
the interorder overlap to become increasingly severe until the camera         
sensitivity falls off at short wavelengths. It is this overlap which causes   
local background extractions in IUESIPS to be systematically high for         
short-wavelength orders and which necessitated a strategy for BCKGRD to       
sample background fluxes in distant uncontaminated regions as well as local   
contaminated ones.                                                            
                                                                              
The fluxes sampled from interorder pixels are modified if they are affected   
by contamination from neighboring orders. A model PSF provides an estimate    
of how much the fluxes should be offset before the Chebyshev fit is made      
(see ``PSF Modeling'' section below). The PSF model itself consists of two    
components, first, a monotonically decreasing function out to about four      
pixels and, second, a ``halation ramp" which extends from four to about       
seven pixels from the center of each order profile. Each of these             
components is responsible for order overlap in a particular range of          
echelle orders. We will refer to the image area where the monotonic portion   
dominates as the ``Interorder-Overlap Region" (IOR). The halation component   
is actually an extension of the IOR. However, BCKGRD treats it separately     
because, unlike the IOR, its characterization is independent of the order     
profiles.                                                                     
                                                                              
The IOR and halation-dominated portions of the Pass 1 swath are indicated     
in Figure A2. The initially sampled interorder fluxes in both the IOR and     
the halation regions are revised downward during the course of the            
calculations. The original and revised ``working" fluxes are shown in this    
plot as squares and small crosses, respectively, and the flux revision for    
one point is shown as a downward pointing arrow. Fluxes for pixels in the     
halation-ramp region are affected by interorder contamination just like the   
triangle-inscribed IOR region, but in these cases only from the flat PSFs     
of the two neighboring orders. Because this overlap is constant, the          
algorithm may estimate it for several orders along the swath and determine    
a robust correction for halation. Note that the overwhelming majority of      
orders are subject to overlap by either the monotonic (IOR) or ramp           
components of the PSF.                                                        
                                                                              
In broad strokes, an initial estimate of the overlap for a given order is     
performed by computing peaks of adjacent orders above the interorder flux     
minimum and using the PSF to compute the fractional order flux to be          
subtracted from the sampled interorder fluxes. Before discussing this         
procedure in detail, it is necessary first to describe in more detail the     
different domains of a Pass 1 swath where each of the PSF components          
dominates.                                                                    
                                                                              
                                                                              
A.2.2.2 Differentiation of Swath Regions                                      
                                                                              
The continuous undulating line in Figure A2 is the Chebyshev solution for     
an actual Pass 1 swath of an SWP image. The IOR area is denoted by a dashed   
triangle with vertices at spatial pixel numbers nc, nf, and nd. The normal    
execution of the background determination code requires that valid            
background pixels are sampled at these three points as well as the adjacent   
points nc-1, nf+1, and nd+1. In Figure A2 the rise from nd to nf is           
determined largely by the width of the PSF. This slope may vary because of    
circumstances for a particular exposure. For example, the slope of the        
{nf~nd} leg of the IOR triangle is different for trailed images than for      
point-source images. Because this slope is a property of the swath itself,    
BCKGRD can use it to refine the overlap as estimated from the model PSF.      
The overlap between nc and nf depends primarily on source energy              
distribution and not exposure parameters. The effect of overlap near pixel    
nc appears to decrease in the figure, but this is an artifact of the          
rapidly decreasing camera sensitivity at short wavelengths.                   
                                                                              
                                                                              
A.2.2.3 Swath-Dependent Data Files                                            
                                                                              
Default template files have been created that specify the spatial pixel       
numbers to be avoided in the Pass 1 background extraction for each camera     
and for all source types (point, extended, and noncontinuum) sources. The     
file also includes values for nc, nf, and nd of the IOR. Initially, the       
list of spatial positions to be avoided includes only the starting and        
ending values and the echelle order positions, but this is modified for a     
particular image in the initial Data Screening step (Section A.2.1) from      
the nu flags determined in the raw image screening (RAW_SCREEN) step.         
                                                                              
        Figure A2:   Crosscut of background fluxes from a central             
        ``Pass 1" swath through an SWP image. Stellar fluxes are off-scale    
        in this diagram. The triangular area describes the local raw          
        background fluxes in the Interorder-Overlap Region where order        
        crowding is severe; the halation region is shown to the right.        
        Small crosses denote the raw fluxes corrected for overlap by the      
        PSF model. The solid line is the Pass 1 solution, a Chebyshev,        
        degree-7 polynomial.                                                  
                                                                              
                                                                              
A.2.2.4 On-the-Fly Pathology Screening                                        
                                                                              
The fluxes on and off the echelle orders are used in Pass 1 to determine      
representative order heights and to estimate a PSF scaling factor unique to   
every swath of the image processed. Checks are made at this point to clip     
aberrant background flux values not flagged by RAW_SCREEN (e.g., from         
negative flux extrapolations or undetected cosmic rays). Anomalous            
interorder flux values in such cases are replaced with local means. The       
same procedure is repeated if necessary to substitute highly anomalous        
interorder fluxes with the means of the four neighboring interorder fluxes.   
This procedure was adopted to cope with small pixel clusters in the           
long-wavelength cameras that are prone to excessive negative                  
extrapolations.                                                               
                                                                              
                                                                              
A.2.2.5 PSF Modeling                                                          
                                                                              
The estimate of the contamination of IOR and halation-ramp region fluxes by   
illumination from the spectral orders proceeds in two steps. Information      
from the PSF model and from the echelle order fluxes is not used in the       
first step, nor is a halation overlap region defined. The solution in this    
``Step 1" of Pass 1 is determined entirely from a Chebyshev interpolation     
from points in the end (non-IOR) regions of the swath. In the presence of     
certain image pathologies (Section A.2.4), as well as the first and last      
few Pass 1 swaths, this Step 1 is the only step; it becomes the final         
solution for the Pass 1 phase.                                                
                                                                              
        Figure A3:   A depiction of the influence of interorder overlap       
        in progressively raising the intensity of (unit height) orders        
        towards shorter wavelengths (left). The dashed lines represent        
        intensities the orders would have if there were no overlap.           
                                                                              
For the great majority of Pass 1 swaths, i.e. those passing through the       
middle of the camera image and not encountering poor statistical solutions,   
BCKGRD continues with a Step 2. This step uses the solution from Step 1 as    
a starting point to compute a PSF-compensated solution in which we attempt    
to subtract from the measured interorder fluxes the contamination from        
adjacent orders. As can be inferred from Figure A3, the correction for        
this overlap can be determined by the simple relation:                        
                                                                              
Flux_corr = OrderHeight * 2*PSF_1/[1 - 2(PSF_1 - PSF_2)]                      
                                                                              
where Flux_corr and Order Height are given in FN flux units per pixel         
and PSF1 and PSF2 are given as a fraction of the true local order height.     
Step 2 concludes by subtracting Fluxcorr from the local measured              
background at each interorder location and refitting a new Chebyshev          
solution through the adjusted Pass 1 swath values. Note particularly that     
in NEWSIPS an explicit effort is made to compensate for the contamination     
of the it interorder fluxes (i.e., the background fluxes) in the manner       
described above, there is no adjustment made to correct the on-order          
fluxes (gross fluxes) for the effects of overlapping orders.                  
                                                                              
BCKGRD uses the same trial spatial PSF model for all types of continuum       
source types in a given camera. The algorithm also assumes that the PSF is    
global over the image. The model was determined by replicating the            
accumulation of flux overlap toward short wavelength orders from a large      
number of actual images.                                                      
                                                                              
Because the PSF may actually change from image to image, the algorithm        
attempts to accommodate such changes by using on-the-fly order information    
to refine the PSF model - specifically the slope of the {nf~nd} leg of the    
IOR triangle. This is accomplished by comparing the fractional flux           
overlap with the model result for a reference order within the IOR, that      
is by comparing the increase in overlap for this order to the overlap         
found at the start of the IOR (pixel nd). If the measured and model slopes    
agree within a tolerance factor (1.5 x), the program adopts the measured      
slope and scales the model PSF accordingly. Otherwise, the model PSF is       
used. Tests show that various Pass 1 swaths for a given image can either      
pass or fail this tolerance test independently.                               
                                                                              
                                                                              
A.2.2.6 Post-Solution Pathology Tests                                         
                                                                              
After a continuous Chebyshev solution is computed for a particular Pass 1     
swath, a series of data pathology checks are performed on the solution (see   
Section A.2.5). These tests are performed only on images of point and         
extended sources containing continuum flux. If the solution fails any of      
the pathology checks, an appropriate condition is relaxed (e.g. the PSF is    
not used to calculate the true interorder background, or the degree of the    
Chebyshev fit is decreased by one). The solution is then recalculated         
iteratively. Since even adjacent Pass 1 swaths sometimes can pass different   
pathology tests, their solutions can occasionally be different. This is a     
subtle but often important source of error in the final background            
solution. The results of these differing solutions are manifested as          
``spike structure" in Figure A4, as described below.                          
                                                                              
        Figure A4:   Final background solution for SWP20931, order 95         
        (smooth solid line). The comb structure connected to the solution     
        reflects the solutions for the various Pass 1 swaths sampled at       
        the line position of this order.                                      
                                                                              
                                                                              
A.2.3 Pass 2: Dispersion Direction Swaths                                     
                                                                              
In the second operation, Pass 2, inferred background fluxes at the order      
positions are sampled and assembled as arrays in the spectral direction.      
The fluxes from the Pass 1 solutions are used to compute a continuous         
Chebyshev solution for the background at each echelle order position. The     
generation of a fit along the positions of the echelle orders proceeds with   
the computation of a 7th-degree Chebyshev function interpolated for all       
sample (wavelength) positions. In this step it is not necessary to screen     
or exclude pixels or to test for data pathologies - only a single iteration   
is required. The Pass 2 operation tends to dilute the effects of poor         
solutions from a single Pass 1 swath. However, it also introduces a second    
smoothing into the final background surface.                                  
                                                                              
Figure A4 shows a final solution obtained for Order 95 of image SWP20931      
on the B0 star HD93222. This order contains a strong Lyman-alpha              
feature. The spike pattern indicates samplings from the 26 swaths in          
Pass 1. A comparison of the residuals (comb pattern in the figure) shows      
that the solution for the Lyman-alpha order is less certain than those        
for long-wavelength orders where uncontaminated background pixels are         
common.                                                                       
                                                                              
                                                                              
A.2.4 Non-continuum images                                                    
                                                                              
The existence or absence of continuum flux in an IUE echellogram is           
determined by the order registration module. Because interorder-overlap       
flux can affect background determinations only for continuum images, in the   
noncontinuum case BCKGRD does not go through a Pass 1 step. The background    
estimates for these images are determined by sampling the interorder          
background on the long-wavelength side (spatial) of a given order with a      
one-pixel slit. A 7th degree Chebyshev solution is then computed for this     
nearly continuous array of interorder pixels. Note that tests show that       
some minor contamination from strongly saturated emission lines has been      
detected in neighboring orders.                                               
                                                                              
                                                                              
A.2.5 Data Pathology Assessments                                              
                                                                              
Occasionally circumstances in the interorder fluxes lead to solutions that    
are slightly unstable, producing wiggles in an interpolated region that go    
beyond the flux range of sampled pixels at the two spatial ends of the        
camera. Such occurrences may be caused by abnormal conditions affecting the   
image (e.g. target-ring glow, cosmic ray hits, LWR flare, flux down-turns     
at camera edge). A series of eight ``pathology tests" has been added to       
BCKGRD to protect against blind solutions at the end of Pass 1 that do not    
agree with simple and often correct interpolations. These checks generally    
rely on a comparison of fluxes at two or more pixels along the swath or on    
a ratio of smoothed flux ranges. The rms statistic computed from local raw    
background fluxes is a convenient unit of measure for flux ranges because     
it does not rely upon source brightness, exposure time, or an arbitrary       
flux level. In most cases a failure of a solution in a pathology test         
causes either the PSF information not to be used in Pass 1, the degree of     
the polynomial fit to the interorder data to be reduced, or both. Lowering    
the fitting degree has the effect of removing extra wiggles in the            
solution; however, the degree of the Chebyshev fit is never reduced below     
3. In those cases where superfluous wiggles in the IOR region persist         
stubbornly after a few trials, a simple linear interpolation is adopted       
between ``good'' regions. This may occur for spatial positions toward the     
short wavelength (spatial) end of the IOR for certain swaths having           
reliable background samplings at the target edge. These tests are used only   
for continuum source images in Pass 1. Therefore, the final output            
background vectors from Pass 2 are still guaranteed to be pure continuous     
Chebyshev functions.                                                          
                                                                              
The data pathology tests keep track of the number of iterations through the   
swath-fitting routines, as well as a history of previous failure modes.       
Certain pathologies have been found to oscillate sometimes between two        
types of failures. If such patterns are detected, a fall-back exit option     
is adopted. Table A.1 summarizes the pathology checks and the strategies      
for circumventing them in subsequent iterations of the swath-fitting          
routine.                                                                      
                                                                              
BCKGRD establishes a hierarchy of severity for the various pathologies it     
identifies. Tests 1-4 and 8 are the most critical, and the responses to       
failure of them are therefore more severe. Each test looks for a different    
and well known pathology. For example, Test 4 and Test 6 search for subtly    
different degrees of a similar pathology, so their response strategies are    
different. Test 2 searches for a solution minimum within the IOR (exceeding   
a tolerance) compared over the rest of the swath whereas Test 8 searches      
for a flux minimum in the solution anywhere within the swath. Test 2          
permits a milder fix while Test 8 looks for a more severe IOR minimum. If     
Test 8 detects this condition, a linear interpolation between nc and 50       
pixels beyond nd is used, with points in the halation ramp taken from the     
measured interorder flux values, without consideration of the PSF. If         
Test 2 repeatedly fails, the IOR-minimum pathology is guaranteed to be        
addressed by linear interpolation in Test 8.                                  
                                                                              
Experience has shown that Test 7 is one of the most commonly occurring        
rejections of an initial solution. This test rejects having a local maximum   
at the high-sample number end of a swath. These rejections are often caused   
by an abnormal global shift of the spectral image format combined with        
target ring glow, but they can result also from any systematic rise in flux   
toward the short wavelength (spatial) end of the camera as well. If the       
pathology cannot be circumvented by decreasing the degree of the Chebyshev    
fit or by resorting to ignoring the PSF information in the swath-fitting      
routine, the solution is admitted. Test 7 is similar to Test 3 but checks     
for two maxima in the the middle of the short-wavelength (spatial) end of     
the image. In Test 3 one of the maxima searched for must be within the IOR,   
but this is not necessarily true for Test 7. Test 3 also checks for flare     
discharges which can occur in the long-wavelength corner of LWR images and    
computes two possible solutions: the first is a pure Chebyshev solution       
with the flare points deweighted and the second is a quadratic                
extrapolation of the solution without the flared region included. The         
solution with lower fluxes in the upturned flare region is then adopted, as   
this solution causes ringing less frequently.                                 
                                                                              
A rejection by Test 5a, which searches for a maximum in the IOR, causes the   
degree of the fit to be decreased on the first iteration and halves the       
trial PSF slope factor. It interpolates linearly over this region if          
additional iterations are necessary. Test 5b searches for an excessive        
minimum for spatial positions at the short wavelength (spatial) end of the    
image and the beginning of the IOR. A minimum in the IOR is usually caused    
either by a bright target ring at the beginning of the swath, or an           
overestimate of the PSF. Such conditions cause a false overcorrection for     
background contamination within the IOR and hence a background solution       
which is too low. Both tests are addressed by decreasing the Chebyshev        
degree.                                                                       
                                                                              
                                                                              
         Table A.1:  Recourses to Various Pathological Trial Solutions        
                                                                              
                                                                              
                                                                              
        TEST NUMBER                     CONDITION/RECOURSES                   
                                                                              
                                                                              
                                                                              
              1                         Solution monotonic between nd & nf:   
                                                                              
        Short Swaths                    If poly. degree > 3, decrease degree; 
                                                                              
                                        otherwise linearly interpolate.       
                                                                              
                                                                              
                                                                              
              2                         Min. in IOR between nc & nd;          
                                                                              
          IOR Min.                      decrease degree,                      
                                                                              
                                        on third attempt, give up.            
                                                                              
                                                                              
                                                                              
              3                         Max. at high sample no.:              
                                                                              
     Max. near swath end                decrease degree.                      
                                                                              
         [LWR Flare]                    [Lower weights for points in flare]   
                                                                              
                                                                              
                                                                              
              4                         Max. in IOR is max. for swath:        
                                                                              
          IOR Max.                      decrease degree                       
                                                                              
                                                                              
                                                                              
             5a                         Max. at low sample no.:               
                                                                              
 Max. at or near swath start            decrease degree & reduce              
                                                                              
                                        slope of PSF model                    
                                                                              
                                                                              
                                                                              
             5b                         Min. at low sample no.:               
                                                                              
 Min. at or near swath start            1st time: go to Test 6;               
                                                                              
                                        thereafter: decrease degree or        
                                                                              
                                        interpolate linear solution           
                                                                              
                                                                              
                                                                              
              6                         Max. within IOR:                      
                                                                              
          IOR max.                      decrease degree or                    
                                                                              
                                        interpolate linearly across IOR       
                                                                              
                                                                              
                                                                              
              7                         Max. at high sample no.:              
                                                                              
         Max. at end                    decrease degree                       
                                                                              
                                                                              
                                                                              
              8                         Absolute min. is in IOR:              
                                                                              
          IOR min.                      interpolate linearly in IOR           
                                                                              
          Absolute!                                                           
                                                                              
                                                                              
A.3 Failure Modes                                                             
                                                                              
The background swath fitting process is considered to fail a particular       
Pass 1 swath if any of the following conditions apply.                        
                                                                              
   * Fewer than 20 valid background pixels exist in the swath.                
   * The first two valid background pixels in the swath are not continuous.   
   * There are no data gaps in the swath (continuum image only).              
   * The starting pixel for the IOR is less than spatial pixel number 3 in    
     the swath (continuum sources only).                                      
   * The first and last pixel with usable background fluxes are on the same   
     side of the IOR (continuum sources only).                                
                                                                              
When a solution for a Pass 1 swath fails any of these tests, the background   
solution is set to zero for the entire swath. If this occurs for an           
isolated swath, an interpolated solution based on the two neighboring         
Pass 1 swaths is substituted for the original solution. If two consecutive    
Pass 1 swaths, or a total of five, have null values based on these            
conditions, the background arrays for the entire image are set to zero, and   
BCKGRD has ``given up" on the image. This occurs for an exceedingly small     
number of images (e.g., about 13 out of 12,898 images in the GSFC             
high-dispersion archives), usually as a consequence of a major portion of     
the image being missing. This condition is documented in the processing       
history log.                                                                  
                                                                              
                                                                              
A.4 Problem Areas                                                             
                                                                              
Tests have shown that high-dispersion spectra from each of the three IUE      
cameras have characteristics that impose unique challenges for automated      
background extraction algorithms. The great diversity of image types in the   
archives prohibits implementing any strategy that makes assumptions about     
the behavior of source spectra in order to fix background problems,           
particularly in an automated processing environment.                          
                                                                              
The SWP camera has a unique confluence of conditions, a circular target       
ring and a blaze function shifted towards short wavelengths along the         
echelle-dispersion direction, which together make it impossible to sample     
local background at the short wavelength corner of the image. For spectra     
of early-type objects, these conditions almost guarantee that for the         
shortest-wavelength swaths in Pass 1 no pixels will be found at the short     
end (spatial) of the swath to use for interpolation in the IOR. In these      
cases the solutions will turn upwards in this region. This problem is         
addressed at the end of the first pass of BCKGRD by grafting a solution       
from a neighboring swath in place of the turned-up solution. Experience       
shows that this strategy is sometimes only partially successful for SWP       
images. As a result the final background solution in the short-wavelength     
corner is sometimes too high. This behavior can influence the background      
solutions for the blue wing of Lyman alpha and lines of neighboring           
echelle orders that fall in the same blaze region to be as much as a few      
percent too high relative to the local continuum. This is probably the most   
significant systematic error produced by BCKGRD. However, we emphasize that   
this problem is inherent in the placement of these spectral features close    
to the target ring. Therefore, even customized extractions will not be able   
to model an accurate local background solution in this region.                
                                                                              
Both long-wavelength cameras have the problem of a number of specific         
pixels being habitually converted from low DNs to highly negative FNs. In     
general, this is not a problem because BCKGRD clips highly aberrant fluxes    
before its Chebyshev fitting. However, the problem of clipping only           
aberrant fluxes is complicated for the LWP camera because of the turndown     
of the local background at the long-wavelength (spatial) end of the target.   
This complexity has been treated by disallowing clipping of anomalous         
fluxes in this region of the LWP image. Another complication is that          
although a 7th degree is usually sufficient to fit the flux turndown near     
the target ring, the solution may not adequately follow the turndown if the   
background fluxes are noisy or have caused the Chebyshev degree to be         
reduced to less than 6. Generally, there are no ``notable" spectral lines     
in these orders, but a customized extraction can take care of this problem    
should the need arise.                                                        
                                                                              
An additional characteristic of the LWP camera fluxes is the abrupt           
increase in noise in the short (spatial) end of the image. It is not clear    
that this causes systematic background deviations, but it may cause a         
degraded accuracy in the background result.                                   
                                                                              
The LWR camera exhibits a few patches of enhanced sensitivity that are not    
completely calibrated out in the photometric correction step. The most        
dramatic of these is the ``flare" at the long spatial and short-wavelength    
(dispersion) corner of late-epoch images. Inspection of many images shows     
an upturn in the local background in this area even during the IUE            
Commissioning Period. Therefore, background fluxes extracted in this area     
either by NEWSIPS or by customized extractions should be used with caution.   
                                                                              
                                                                              
                          NEWSIPS Manual Addendum                             
                                                                              
II. Revised LWR Ripple Correction                                             
                                                                              
The LWR ripple correction described in section 11.2.1 of the NEWSIPS image    
processing manual was modified shortly after the Goddard images had been      
processed. The new correction derived by Cassatella [1] slightly improves     
the ripple correction shortward of 2200 Angstroms. The new correction was     
implemented at Vilspa and, in November, 1997, all the Goddard LWR images      
were reprocessed with the new correction. As a result, all archived LWR high  
dispersion NEWSIPS data requested after November 14th, 1997 use the ripple    
correction described below.                                                   
                                                                              
The new LWR ripple correction uses the same expression for the alpha          
parameter as defined in Section 11.2.1 of the NEWSIPS manual. The blaze       
wavelength for order m however is now defined as:                             
                                                                              
lambda_cm = (K / m) + Deltalambda(m,T)                                        
                                                                              
where                                                                         
                                                                              
                        K = A + Bm + Cm2 + Dm3 + Em4                          
                                                                              
and                                                                           
                                                                              
                           A =   0.281749635D+06                              
                            B = -0.223565585D+04                              
                           C =   0.365319482D+02                              
                            D = -0.262477775D+00                              
                           E =   0.701464055D-03                              
                                                                              
The Deltalambda term is a time-dependent correction to the blaze              
wavelength defined by the equation                                            
                                                                              
Deltalambda(m,T) = a(m) + b(m)date + c(m)date^2                               
                                                                              
where date is the observation date as a fractional year (e.g., 1987.1), and   
the coefficients are defined at the reference orders shown below.             
                                                                              
             Order       a             b               c                      
                                                                              
             115    35736.699D0   -35.970790D0  0.0090515542D0                
                                                                              
             111    62433.199D0   -62.859885D0  0.0158223297D0                
                                                                              
             107    53287.133D0   -53.638642D0  0.0134980459D0                
                                                                              
             103    42742.7090    -43.014583D0  0.0108219635D0                
                                                                              
             99     28040.843D0   -28.206111D0  0.0070930274D0                
                                                                              
             95     10463.439D0   -10.501169D0  0.0026347077D0                
                                                                              
             91     6223.1919D0   -6.2320255D0  0.0015601476D0                
                                                                              
             87     4478.2512D0   -4.4662128D0  0.0011134034D0                
                                                                              
             83     112.32014D0   -0.0566704D0  0.0D0                         
                                                                              
             79     156.16074D0   -0.787367D0   0.0D0                         
                                                                              
In practice, the Delta-lambda term is calculated at the reference             
orders for a given observation date and then linearly interpolated to the     
desired order. Orders longward of order 115 use the correction for order      
115, and similarly orders shortward of order 79 use the correction for        
order 79.                                                                     
                                                                              
The study by Cassatella [1] determined that the changes to the LWR ripple     
correction did not affect any other calibrations (e.g., the absolute          
calibration). Therefore, no other calibrations were modified.                 
                                                                              
To verify images have been processed using the correct ripple correction, a   
line was added to the HISTORY portion of the primary FITS header. Images      
processed with the original ripple correction will contain the comment: "LWR  
RIPPLE CORRECTION VERSION 1.0 APPLIED". Reprocessed images will have the      
comment: "LWR RIPPLE CORRECTION VERSION 2.0 APPLIED".                         
                                                                              
Note that because the LWR images had already been processed, the LWR ripple   
correction was applied (at Goddard) using an IDL routine called MXCOR2. The   
program basically read the net flux vector from the archived MXHI files,      
re-applied the ripple and absolute flux calibrations, wrote the new           
ripple-corrected and absolutely-calibrated net flux vectors back into the     
MXHI file, and updated the comment in the HISTORY portion of the FITS         
header. At Vilspa, the new correction was implemented in the NEWSIPS          
processing software. Tests showed the two methods produced identical          
results.                                                                      
                                                                              
References                                                                    
                                                                              
1    Cassatella, A. 'Ripple Correction and Absolute Calibration for LWR High  
     Resolution Spectra Processed with NEWSIPS', September 1997, internal     
     report.                                                                  
                                                                              
                                                                              
III. High Dispersion Heliocentric Velocity Correction                         
                                                                              
Wavelengths for all high dispersion images except nulls and onboard           
calibration lamp exposures (i.e., object classes 98 and 99) are routinely     
reduced to a heliocentric frame of reference. The algorithm used in NEWSIPS   
is basically the same as that used in IUESIPS and is based on programs        
originally written by Howard Cohen and Arthur Young from Indiana University   
and described by Harvel(1980) [1]. Some minor differences however do exist.   
                                                                              
The velocity components of the earth and IUE in a righthanded rectangular     
equatorial coordinate system (+x is toward the vernal equinox, +z is toward   
the north celestial pole) are computed using the routines described in        
Harvel (1980). The computed net radial velocity of the IUE spacecraft         
toward the object is given by the expression:                                 
                                                                              
V = V_xCos(alpha)Cos(delta) + V_ySin(alpha)Cos(delta) +  V_zSin(delta)        
                                                                              
where                                                                         
                                                                              
                         V_x = V_x(Earth) + V_x(IUE)                          
                                                                              
                         V_y = V_y(Earth) + V_y(IUE)                          
                                                                              
                         V_z = V_z(Earth) + V_z(IUE)                          
                                                                              
and                                                                           
                  alpha = right ascension of object,                          
                    delta = declination of object.                            
                                                                              
The corrected wavelengths are then defined as:                                
                                                                              
lambda_corrected = (1 + V/c)*lambda_uncorrected                               
                                                                              
where c is the speed of light.                                                
                                                                              
The calculation is such that a net approach of the IUE spacecraft toward      
the target requires a positive net radial velocity correction to the          
heliocentric reference frame, following the standard convention. The          
individual IUE and earth velocity components and the net radial velocity      
correction used are documented in the image processing history portion of     
the primary FITS header. Note that typically the correction for the earths    
motion is roughly 30 km/sec while the correction for the spacecraft motion    
is between plus or minus 3.1 km/sec.                                          
                                                                              
One difference between the IUESIPS and NEWSIPS velocity corrections is in     
the calculated observation times. The IUESIPS correction was based on an      
estimate of the midpoint of observation which was calculated by subtracting   
half of the estimated exposure time from the observation end time. This       
estimate was known to introduce some errors though because the exposure       
times stored in the IUESIPS label were occasionally incorrect. The NEWSIPS    
velocity correction however is based on the observation start time! (This     
may have been an inadvertent error since NEWSIPS also calculates the time     
of the observation midpoint.) This can lead to a less accurate velocity       
correction depending on the orientation of the spacecraft orbit with          
respect to the direction of the target and the length of the exposure.        
Presumably the error would be small, amounting to a NEWSIPS error of less     
than 1-2 km/sec.                                                              
                                                                              
A second difference is that IUESIPS used a single set of spacecraft orbital   
elements (obtained on November 22, 1979), while NEWSIPS uses the latest set   
of orbital elements available before the observation was made. Because the    
spacecraft's orbit gradually changed with time, updated orbital elements      
were calculated every few weeks. This difference could cause an IUESIPS       
error of up to 3 km/sec depending on the orientation of the satellite with    
respect to the target and the observation date Taylor(1993) [2].              
                                                                              
                                                                              
References                                                                    
                                                                              
1    Harvel, C.A.,'IUE Data Reduction XVI. Orbital Velocity Corrections',     
     June, 1980, NASA IUE Newsletter, No. 10, pp. 32-36                       
                                                                              
2    Taylor, L.L.,'A Brief Discourse Concerning Velocity Corrections for      
     IUE Data', March, 1993, NASA IUE Newsletter, No. 50, pp.2-8