Chapter 3 - Direct Imaging Pipeline
Overview Transformation and aspect correction Mapping Background map and source extraction
I. Overview
In order to prevent detector gain sag from bright sources, observations are made in a spiral dither pattern rather than at a constant pointing, so the sky image must be reconstructed. Data from GALEX observation consists primarily of a lsit of time-tagged photon detector events. A preliminary transformation from detector coordinates into sky coordinates is first done by using spacecraft attitude information as provided by the onboard attitude control system. Then source extraction is run on the resulting NUV data in one second time slices--longer in FUV when NUV is unavailable--and correlated to the ACT and USNOA star catalogs, further refining the pointing of the instrument boresite. The result is a list of time-tagged photon events with sky RA and DEC positions assigned to each, referred to as extended format data.
The extended format data is used to create a series of inertial maps (e.g. effective exposure to the observed areas of the sky, photon count rates as a function of sky postion). Because the electronics can only read out one photon event at a time, the number of photons incident on the detector will tend to be underestimated. Counting statistics from the four stims, which have known pulse rates, provide an estimate to the amount of exposure lost during readout, know as "dead time." An observation movie file, fixed on the sky and with 16 second fromes is created from which an attempt is also made to mask or flag common detector edge effects and time-variable anomalies (e.g. glare from nearby bright sources, lens flare from bright target sources) using both static geometric and pixel variation techniques. This information is then combined to create images of the sky as well as a map of the detector relative response.
An estimated background, which is typically non-Gaussian, is produced by binning over the image and clipping the histogram at a level equivalent to the probability for a Guassian at 3-sigma and dividing by a relative response map. This background map is used to compute a detection threshold, and then both are fed into the program SExtractor which performs source astrometry and photometry on the image data. The result is a catalog file of detected sources containing position and flux data.
II. Transformation and aspect correction
The spacecraft telemetry data is ingested and turned into housekeeping and photon files. The photon files are time-tagged lists of detector positions and pulse heights corresponding to unique photon events. The housekeeping files include relevant spacecraft and instrument data such as boresite pointing and roll angle data derived from the spacecraft gryoscopes with a time resolution of one second.
The photon positions are refined to more accurately reflect their locations in the focal plane. The three major sources of position error at this stage are wiggle, walk, and distortion. Wiggle and walk--described more extensively in Morrissey et al., 2007--result from errors in how the instrument electronics determine the position of an event on the detector. Distortion arises from the high voltages inside the instrument bending electrons from their optimal paths near the detector edges. All three are corrected with lookup tables. Additionally, a hotspot mask is applied, effectively removing about 1% of the detector area where anomalously high count rates have been observed in the past.
An initial transformation of the photon data from detector coordinates to sky coordinates is made by using the boresite motion as reported by the spacecraft [Figure 1] to map each photon to an RA and DEC on the sky. The NUV is then binned into a series of one second images (FUV is used with longer exposures if NUV is unavaible). A correction to the initial solution is made by doing positional matches to known guide stars in each image after roughly shifting the boresite. Then the open source program SExtractor is run on 100 second time slices, and the extracted sources are matched to the ACT and USNOA star catalogs, tracking the motion of the field of view on the sky over the course of the observation and generating a refined boresite motion [Figure 2] and roll.
Figure 1. This is a typical "raw" dither pattern as returned by the spacecraft ACS gyros for eclipse 23456. Note that it represents a continuous spiral pattern, about 1 arcsecond across, made over the course of the whole observation. The first telemetry postion is the endpoint right in the middle of the spiral. Units are in arcseconds and the time resolution is 1 second.
Figure 2. This is a typical aspect refined dither pattern for eclipse 23456, the same eclipse as in Figure 1. The refinement is done by tracking sources in the observations over time against the known locations of those same sources in catalogs. Carefule comparison of this figure with Figure 1 will reveal differences that would otherwise translate to position errors during final source extractions. Units are in arcseconds and the time resolution is 1 second.
The refined boresite motion and aspect information are finally used to accurately map photon events from detector coordinates to sky coordinates (J2000). The result is a list, referred to as extended format data, of time-tagged photons events each with an RA and DEC. In general extended data is not preserved after a pipeline run but regenerated as needed, and so it is not currently part of any standard data release.
III. Mapping
A series of inertial and non-inertial maps are generated for each observation. For example, an exposure map [Figure 3] is created which displays the effective exposure of the detector to various parts of the sky, binned to 6 arcsecond pixels, and integrated over the whole observation. A dose map [Figure 4] displays the number of photon events incident on various parts of the detector, binned to 6 arcsecond pixels, and integrated over the observation. Somewhat conversely, a count map [Figure 5] displays the photons, mapped to sky coordinates, binned to 1.5 arcseconds pixels, and integrated over the observation. See Chapter 4 for more information on imaging data products.
Figure 3. A typical exposure map (eclipse 23456). The intensity represents the length of time that the detector was exposed to a certain part of the sky. Note that the exposure is constant throughout the center of the map but fades near the edges due to the dither pattern.
Figure 4. A typical dose map (eclipse 23456). This map is in detector coordinates, so point sources appear as donuts owing to the dither pattern of the spacecraft during an observation. Note pinpricks of light near each of the four corners of the image; these are stims, which are used to estimate the amount of exposure time effectively lost during instrument readout.
Figure 5. A typical cnt image (eclipse 23456). This image has been fully map projected. The integrated images which are eventually used for source extraction are simply a count image such as this one divided by a relative response map.
Some static geometric techniques can be and are employed to mask certain detector artifacts, such as internal reflections and edge reflections to a certain extent, but because the spacecraft dithers over the course of an observation, light from bright sources near the edge of the field of view can appear to vary with time in the sky projected images. A movie file with frames corresponding to 16 seconds of observation on the sky and binned to 12 arcsecond pixels is employed to detect, flag and mask regions which are changing over time. This can occasionally result in the masking of non-artifacts, such as sources with rapidly varying magnitudes, man made satellites that pass through the field of view, or slight changes in the pixelization of the cores of bright stars.
The GALEX detectors can only read out a single photon event at a time, so if an event occurs during readout, it is not recorded. This period is called "dead time" and effectively reduces the overall exposure time of an observation. By monitoring the charge accumulation at the stims in the corners of the detectors, which have known pulse rates, it's possible to approximate the percentage of the total exposure that was dead and produce a corrected exposure time.
A relative response map is made by dithering and integrating the static detector flat image around with the detector on the sky and multiplying by the corrected exposure time. The relative response map is generated with 6 arcsecond pixels and then upsampled, using bilinear interpolation, to a high resolution relative response map with 1.5 arcsecond pixels. An intensity map is then created by dividing the count map by the high resolution relative response map.
IV. Background map and source extraction
Typical backgrounds in high Galactic latitude GALEX fields are very low such that the distribution of count rates in each image is typically quite non-Gaussian, even for relatively long exposures. In order to deal with these low backgrounds, we estimate background using a modified clipping algorithm which makes use of the full Poisson distribution.
Before beginning the calculation, any regions of the image where the relative response falls below a user-specified fraction of the maximum is masked out and not included in the subsequent computations. Then the mean value of the pixels in each background bin is calculated. The pipeline clips the values at a probability of 1.35 x 10-3, a value equivalent to the probability for a Gaussian at a level of 3-sigma. High pixels are iteratively clipped out until the mean value converges or the maximum number of iterations is reached. In tests on simulated data, the mean tended to converge within just a few iterations. Finally, the value of the background in each bin is divided by the average relative response at that location. The resulting background map is in units of counts/sec/pixel.
Even when iteratively clipping out high pixels, bright sources can still bias the mean. Therefore a 5x5 median filter is applied to the background grid points. For those background grid points falling outside the detector boundaries, the median is computed from those grid points within the 5x5 box which do fall on the detector. This has the effect of extending the background grid somewhat beyond the actual detector boundary. When the background grid is linearly interpolated to the full image resolution, this then insures that the background will not artificially drop off at the edge of the detector.
A detection threshold map is generated by finding the value at each grid point where the incomplete gamma function falls below the detection probability specified by the user in Gaussian equivalent sigma numbers. If the average count rate is above 50 counts in the integrated image, then the data is assumed to be sufficiently well approximated by a Gaussian, and the detection threshold is computed as the Gaussian sigma corresponding to the detection threshold multiplied by the square root of the mean background level. Both the background map and detection threshold map are upsampled to the full resolution of the data image using bilinear interpolation.
The background map, detection threshold map, and background-subtracted intensity map are fed into SExtractor, which detects and performs astrometry and photometry on sources in the integrated images. SExtractor is run twice. The results from the first run are used to generate a mask over the bright sources, which goes into creating improved background and detection threshold maps. Those new maps are then re-input into SExtractor. The result is a catalog file of fluxes and geometry for sources detected in the observation.