-xg-gsp.fits:                              -tab dec'04,jun'06,jan'08

Binary FITS table column descriptions for *-xg-gsp.fits files:
(Total number of fields: 96.)

ggoid        : (2J)  : Global ID of spectral source

     Joining these two integers yields a 64 bit integer uniquely
     identifying this source including the tile number, band, product number,
     reduction try (path), etc.  The bits from most significant to least are:
     
         3 bits: vsn   : Version number (of the pipeline)
        16 bits: tile  : Tile or field or target number
         2 bits: type  : Observ. type (00=single,01=AIS(multi))
         2 bits: ow    : optics wheel(01=drct,10=grsm,11=opaq,00=undef)
         4 bits: prod  : product number(_visits,_best,etc.)
        12 bits: img   : visit/sub-visit number
                          {when type=01: 5 bit subvis + 7 bit visit}
         3 bits: try   : try number (processing number)
         2 bits: band  : Band (01=nuv,10=fuv,11=both,00=undefined)
        20 bits: xid   : Extraction ID
  
     The extraction ID is the same as the extraction ID in the -xd-mcat.fits
     file used for this spectral reduction.
  
ggoid_D      : (2J)  : Global ID of direct image source
     This is the GGOID for the corresponding source in the direct image
     catalog (the -xd-mcat.fits file).

band         : (1J)  : 1=nuv only, 2=fuv only, 3=both
     From the GGOID.

id           : (1J)  : Spectral source ID
     Extraction ID from the GGOID.

alpha_j2000  : (1D)  : Right Ascension J2000 (deg)
delta_j2000  : (1D)  : Declination J2000 (deg)
     Position from the direct image merged catalog file (-xd-mcat.fits).

nuv_nc       : (1J)  : number of columns in image strip (for NUV)
nuv_nr       : (1J)  : number of rows in image strip
     This defines the dimensions of spectral image strip (from 'pri' file)
     from which the spectrum is extracted.  The scale is 1 arcsecond
     per pixel.  These numbers are usually the same for all sources, but
     could vary for extended objects.

nuv_mag      : (1E)  : magnitude from direct source catalog
     NUV calibrated AB magnitude derived from a NUV source catalog magnitude.
     See 'mcat' file column descriptions for more details.

nuv_detx     : (1E)  : Detector X position of undeviated wavelength point
nuv_dety     : (1E)  : Detector Y position of undeviated wavelength point
     Estimate of NUV detector X and Y position of a given source at the 
     'zero' point of the dispersion.  This is approximately the position 
     where the object would appear in the absence of the grism.  Since the
     telescope is dithered and many eclipse observations are combined,
     this is only an estimate of the X position.  The units are in pixels
     (1.5 arcseconds per pixel) relative to the nominal field center.
    
nuv_Q        : (1E)  : Q value at undeviated wavelength point
     NUV Q value taken from the calibrated universal Qmap image file at
     the position given by 'nuv_detx' and 'nuv_dety'.

nuv_mid_detx : (1E)  : Detector X position of middle of primary order
nuv_mid_dety : (1E)  : Detector Y position of middle of primary order
     Estimate of NUV detector X and Y position of a given source at the 
     middle of the primary order (1st order for NUV).  This point is used 
     to find the grism flat field (wavelength dependent) correction factor.
     The middle of the NUV 1st order is defined as 185 arcseconds from
     the undeviated wavelength point (about 2386 Angstroms).

nuv_mid_Q    : (1E)  : Q value at middle of primary order
     NUV Q value taken from the calibrated universal Qmap image file at
     the position given by 'nuv_mid_detx' and 'nuv_mid_dety'.

nuv_mid_ra   : (1D)  : RA of middle of primary order
nuv_mid_dec  : (1D)  : Declination of middle of primary order
     The RA and DEC position on the sky where the middle of NUV 1st order 
     appears on the whole sky images (such as the -int.fits image).
     The undeviated wavelength point would appear at 'alpha_j2000'
     and 'delta_j2000' described above.


fuv_nc       : (1J)  : number of columns in image strip (for FUV)
fuv_nr       : (1J)  : number of rows in image strip
     See 'fuv_nc/nr' descriptions above.

fuv_mag      : (1E)  : magnitude from direct source catalog
     FUV calibrated AB magnitude derived from a FUV source catalog magnitude.
     See 'mcat' file column descriptions for more details.

fuv_detx;    : (1E)  : Detector X position of undeviated wavelength point
fuv_dety;    : (1E)  : Detector Y position of undeviated wavelength point
     See 'nuv_detx/y' descriptions above.

fuv_Q;       : (1E)  : Q value at undeviated wavelength point
     FUV Q value taken from the calibrated universal Qmap image file at
     the position given by 'fuv_detx' and 'fuv_dety'.

fuv_mid_detx : (1E)  : Detector X position of middle of primary order
fuv_mid_dety : (1E)  : Detector Y position of middle of primary order
     Estimate of FUV detector X and Y position of a given source at the 
     middle of the primary order (2nd order for FUV).  This point is used 
     to find the grism flat field (wavelength dependent) correction factor.
     The middle of the FUV 2nd order is defined as 300 arcseconds from
     the undeviated wavelength point (about 1601 Angstroms).
    
fuv_mid_Q    : (1E)  : Q value at middle of primary order
     FUV Q value taken from the calibrated universal Qmap image file at
     the position given by 'fuv_detx' and 'fuv_dety'.

fuv_mid_ra   : (1D)  : RA of middle of primary order
fuv_mid_dec  : (1D)  : Declination of middle of primary order
     The RA and DEC position on the sky where the middle of FUV 2nd order 
     appears on the whole sky images (such as the -int.fits image).
     The undeviated wavelength point would appear at 'alpha_j2000'
     and 'delta_j2000' described above.

numpt        : (1J)  : Number of points in spectra
     The actual number of real data points in the spectral arrays
     obj,objerr,etc.  Note that this may be smaller than the number
     of allocated values.

objwidth     : (1E)  : 'arcsec  ' : Object extraction width (arcsec)
     The object extraction window width in arcseconds.  This is the
     region of the spatial profile centered on the expected center 
     of the source used to accumulate the flux at each point along
     the spectrum.  Note that this is the total size of extraction
     aperture (i.e a diameter, not a radius).  This number should be an 
     even integer to allow proper centering of source.

bckwidth     : (1E)  : Background extraction width (arcsec)
     This is the width in the spatial direction used for the background
     estimate.  The background excludes the object window and also
     regions immediately adjacent to the object (see objbcksep).
     If the scale is 1.0 arcsecond/pixel (default), then the total number
     of rows in the image strip is the background width plus one, since
     the background width is the distance between the center of the first
     pixel to the center of the last pixel.  The image strip has one
     additional row which is the spectral response deviations (currently
     not used).  So if bckwidth = 78, the number of rows is 80.  This 
     number should be an even integer to allow proper centering of source.

objbcksep    : (1E)  : Object-Background separation (arcsec)
     The separation between the object window and the background windows
     which bracket each side of the object window. 

bckcolrad    : (1J)  : Radius for averaging background columns (pix)
     Number of columns to average on either side of a given column
     to compute the background level at each point along the spectrum.
     A value of 0 means only use the column at each point to determine
     the background.  A value of 1 means include 1 column on either
     side of the primary column to compute the background at each
     spectrum point.

truthid      : (1J)  : Truth catalog ID (matched)
     Not used.

objtype      : (1J)  : Object Type(0=galaxy,1=star)
     A guess at the object type based on the direct image colors.

temperature  : (1E)  : Estimated effective temper.(K)
     From a blackbody fit to the spectrum.

redshift     : (1E)  : Estimated redshift
     Not used.

slope        : (1E)  : Estimated spectral slope
     A power-law fit to the spectrum, this is alpha in equation: 
     f_nu (proportional to) nu^alpha.  Or, in our case, photons per
     sec. per cm^2 per Ang. proportional to lambda^(-(1+alpha)).

qa           : (1E)  : Quality Analysis value
     Not currently used. 

flag         : (1J)  : Miscellaneous flag (not used)
     Not currently used. 

weight       : (2E)  : Average weight (each band)
     Average response in effective seconds for the unmasked pixels
     in the spectral image strip. (NUV is the first element.)
     This includes flat field response and neighbor masking.

background   : (2E)  : Average background (each band)
     Average background in photons per (effective) second per pixel
     for the unmasked pixels within the background limits.  The pixel
     size in the image strips is nominally 1 square arcsecond. 
     (NUV is the first element (value), FUV is the second value.)
     
median_s2n   : (2E)  : Median Signal/Noise (each band)
     Median S/N per spectral pixel (wavelength point) in the flux
     calibrated spectra.  Each spectral pixel is nominally 3.5
     Angstroms in size.  For NUV the range used for this computation
     is 1755 to 3000 Angstroms.  For FUV the range is 1300 to 1745 Angstroms.
     (NUV is the first element (value), FUV is the second value.)

centroid     : (2E)  : Relative position(spatial)(each)
     Centroid of the profile relative to the expected object position.
     The expected object position is the given by the number of rows
     in the image strip (-pri.fits or -prc.fits):
         (object center) = ((number of rows in image strip) - 2) / 2 .
     This assumes the center of a pixel in the first row is 0.0 .
     Note that the last row of an image strip is for the spectral 
     response variation (currently 1.0).  The centroid value is
     relative to the expected object center, so a perfectly aligned
     object would have a centroid value of 0.0.  
     (NUV is the first element (value), FUV is the second value.)
     
specfwhm     : (2E)  : Estimated spatial FWHM (each band)
     This is an approximate estimate of the FWHM (in arcseconds) of 
     the spatial profile.  Assuming a gaussian, it uses the formula:  
        FWHM = 0.93944 x (area of profile) / (peak pixel value)
     (NUV is the first element (value), FUV is the second value.)
     
effexp       : (2E)  : Effective exposure time in spectral image strip
     For each band (NUV and FUV, respectively), the effective exposure time 
     in seconds for the entire spectral image strip (object and background
     regions) for a given source.  This value takes into account the varying 
     response of the flat field and corrections for dead spots.  It does not 
     include masking of neighboring sources by spectral extraction programs.

effmsk       : (2E)  : Effective masking fraction in spectral image
     For each band, the effective masking fraction over the entire spectral
     image strip.  This includes masking of neighboring sources.  No masking
     would be 0., masking of 10% of the image strip would be 0.10.  Multiplying
     "effexp" and "1.0 - effmsk" gives you approximately the "weight" value.

nuv_numpro   : (1J)  : Number of points in NUV profile
     Number of points in the NUV profile array.  This is one less than the 
     number of rows in the spectral image strip, since the last row in
     the image strip is the spectral response variation.

fuv_numpro   : (1J)  : Number of points in FUV profile
     Number of points in the FUV profile array.

nuv_profile  : (198E) : NUV profile (spatial)
     NUV profile array. Values are in photons/second/pixel (a pixel is
     nominally 1 square arcsecond).  The column range used to compute the
     average profile is offsets +50 to +275 arcseconds for NUV (offset=0 is 
     the undeviated wavelength position on the image strip).  This is 
     roughly the NUV first order portion of the spectrum. Masked pixels
     are ignored.  See the description of the "centroid" column for the
     definition of the "object center row".

fuv_profile  : (198E) : FUV profile (spatial)
     FUV profile array. Values are in photons/second/pixel (a pixel is
     nominally 1 square arcsecond).  The column range used to compute the
     average profile is offsets +175 to +375 arcseconds for FUV.  This is 
     roughly the FUV second order portion of the spectrum. Masked pixels
     are ignored.

nuv          : (1E)  : Direct image flux rate (NUV)
     NUV flux in photons per (effective) second from direct image source 
     extraction.  This is the "nuv_flux" column in the bandmerged direct
     image source catalog (-xd-mcat.fits), but converted to photons per
     second rather than micro Janskys.

nuve         : (1E)  : Error in direct image flux rate
     One sigma error in "nuv" column value.

fuv          : (1E)  : Direct image flux rate (FUV)
     FUV flux in photons per (effective) second from direct image source 
     extraction. 

fuve         : (1E)  : Error in direct image flux rate
     One sigma error in "fuv" column value.

E_bv         : (1E)  : E(B-V) Galactic Reddening.
     Copied from direct image catalog (see 'mcat' file description).

nuv_dfwhm    : (1E)  : NUV FWHM from direct image in arcseconds.
fuv_dfwhm    : (1E)  : FUV FWHM from direct image in arcseconds.
     These are the direct catalog 'SExtractor' values of 'FWHM_IMAGE'
     converted to arcseconds (see 'mcat' file description).
 
nuv_artifact : (1J)  : NUV Artifact flag from direct image.
fuv_artifact : (1J)  : FUV Artifact flag from direct image.
     Copied from direct image catalog (see 'mcat' file description).

nuv_nc_r2    : (1I)  : NUV neighbor count from direct image within radius R2.
fuv_nc_r2    : (1I)  : FUV neighbor count from direct image within radius R2.
     Copied from direct image catalog (see 'mcat' file description).

nuv_nf_r2    : (1E)  : NUV neighbor flux from direct image within radius R2.
fuv_nf_r2    : (1E)  : FUV neighbor flux from direct image within radius R2.
     Copied from direct image catalog (see 'mcat' file description).

cn_radius    : (1E)  : Closest neighbor radius from direct image (arcsec).
     Copied from direct image catalog (see 'mcat' file description).

nuvs         : (1E)  : Spectral flux scaled to direct
     NUV flux derived from the extracted spectrum.  This is computed by 
     summing the products of the flux in each pixel of the flux calibrated 
     spectrum by the direct image effective area and the dispersion.  The 
     wavelength range used in the NUV is 1800 to 2800 Angstroms.  Since this
     does not include the edges of the bandpass, a correction factor (guess) of
     1.0254 is applied to the sum.  Some discrepancy will remain between the 
     direct and grism results, but this value is useful for quality analysis.  

nuvse        : (1E)  : Error in nuvs
     One sigma error in "nuvs" column value.
 
fuvs         : (1E)  : Spectral flux scaled to direct
     FUV flux derived from the extracted spectrum.  This is computed by 
     summing the products of the flux in each pixel of the flux calibrated 
     spectrum by the direct image effective area and the dispersion.  The 
     wavelength range used in the FUV is 1350 to 1700 Angstroms.  Since this
     does not include the edges of the bandpass, a correction factor (guess) of
     1.1071 is applied to the sum.  Some discrepancy will remain between the 
     direct and grism results, but this value is useful for quality analysis.  

fuvse        : (1E)  : Error in fuvs
     One sigma error in "fuvs" column value.

nuv0s        : (1E)  : NUV Zeroth order flux rate
     NUV flux derived from only the 0th order spectrum.  The wavelength range
     is 2000 to 2300 Angstroms and no correction is applied.  Although smaller
     than the value "nuvs", each of the values of nuv0s,nuv1s,nuv2s should be 
     the same and can be used for quality analysis.

nuv0se       : (1E)  : Error in NUV Zeroth order flux rate
     One sigma error in "nuv0s" column value.

nuv1s        : (1E)  : NUV First order flux rate
     NUV flux derived from only the 1st order spectrum.  The wavelength range
     is 2000 to 2300 Angstroms and no correction is applied.

nuv1se       : (1E)  : Error in NUV First order flux rate
     One sigma error in "nuv1s" column value.

nuv2s        : (1E)  : NUV Second order flux rate
     NUV flux derived from only the 2nd order spectrum.  The wavelength range
     is 2000 to 2300 Angstroms and no correction is applied.

nuv2se       : (1E)  : Error in NUV Second order flux rate
     One sigma error in "nuv2s" column value.

fuv1s        : (1E)  : FUV First order flux rate
     FUV flux derived from only the 1st order spectrum.  The wavelength range
     is 1350 to 1600 Angstroms and no correction is applied.  Although smaller
     than the value "fuvs", each of the values of fuv1s,fuv2s,fuv3s should be 
     the same and can be used for quality analysis.

fuv1se       : (1E)  : Error in FUV First order flux rate
     One sigma error in "fuv1s" column value.

fuv2s        : (1E)  : FUV Second order flux rate
     FUV flux derived from only the 2nd order spectrum.  The wavelength range
     is 1350 to 1600 Angstroms and no correction is applied.

fuv2se       : (1E)  : Error in FUV Second order flux rate
     One sigma error in "fuv2s" column value.

fuv3s        : (1E)  : FUV Third order flux rate
     FUV flux derived from only the 3rd order spectrum.  The wavelength range
     is 1350 to 1600 Angstroms and no correction is applied.

fuv3se       : (1E)  : Error in FUV Third order flux rate
     One sigma error in "fuv3s" column value.

zero         : (1E)  : Wavelength of first pixel (Ang.)
     Zero point for the wavelength scale in Angstroms.  The true wavelength is 
     given by: wavelength = zero + ((pixel#) * disp), where the first pixel is 
     pixel# 0.

disp         : (1E)  : Angstroms per pixel
     Dispersion for the wavelength scale in Angstroms per pixel.  The true 
     wavelength is given by: wavelength = zero + ((pixel#) * disp), where the 
     first pixel is pixel# 0.

obj          : (552E): Flux (pho/sec/cm^2/Ang) (standard)
     Spectrum array in photons per second per cm^2 per Angstrom.  This is the
     standard reduction which means a simple sum of the pixels in the object
     region (given by "objwidth", see -gsax.fits file) after dividing by the
     response image and subtracting an average background level at each 
     wavelength point (or column).  Only NUV 1st order and FUV 2nd order are
     used to compute this spectrum.

objerr       : (552E): Error on obj
     One sigma error for obj[] array.

opx          : (552E): Flux (pho/sec/cm^2/Ang) (optimal)
     Optimally-weighted extracted spectrum using a profile model.  The
     profile model is the same for the entire field, so this computation
     is best for unresolved sources.

opxerr       : (552E): Error on opx
     One sigma error in optimal extraction spectrum.

objs         : (552E): Flux (pho/sec/cm^2/Ang) (FUV 3rd + NUV 2nd)
     Secondary spectrum-- this is similar to "obj" but only the NUV 2nd order 
     and FUV 3rd order are used to extract the spectrum (instead of only
     NUV 1st and FUV 2nd).  This is expected to have a much lower S/N but 
     will have a higher spectral resolution than "obj".

objserr      : (552E): Error on objs
     One sigma error for objs[] array.

objmdn       : (552E): Flux spectrum using median image strip.
     Spectrum extracted from the median image strip files (-prm.fits).
     Only used for co-added or visit-combined data.  This array is not
     used for individual visits.