A Basic Description of the GLIMPSE Pipeline Photometric Steps (LevC) (B.L.Babler 08/17/2004) ------------------------------------------------------------------------ The GLIMPSE pipeline photometry process consists of 3 general steps; finding stars, photometering those found stars, and improving the photometry of stars which generally lie in complex background emission regions. The first step of finding sources uses a modified version of DAOPHOT's FIND routine. The routine was modified to incorporate a local background determination when searching for stars at an N-sigma level above background. DAOPHOT's original FIND routine determines a mean/median background from the entire image, with the extreme background variability which can occur on GLIMPSE frames a modification for local background determination was required. Initially sources are found at a 3-sigma detection limit for the local background. The second step is taking these found sources and photometering them with DAOPHOT's photometry routine called ALLSTAR. ALLSTAR does iterative PSF fitting and source removal from the input image. As sources are removed new background levels are calculated for sources that will be subsequently extracted. Sources with low signal/error (<2.0) are removed from the source list. Once the initial list of found sources are extracted a residual image is produced. This image is then resubmitted to the modified DAOPHOT FIND routine to find additional sources which may have been hidden in the wings of the brighter stars. Because the residual image will have an added degree of noise (due to the imperfect subtraction of stars) the sigma level of detection on the second pass for finding sources is raised to 5. Additional sources found in this second pass are added to the list of sources extracted in the first pass. This new list is then submitted for extraction by ALLSTAR. Experience has shown that this second pass of photometry will produce a list of sources which can be further improved by resubmitting it to ALLSTAR for a third time. Presumeably this is because ALLSTAR does iterative simultaneous fitting of multiple sources, sources are allowed to migrate in position to improve the overall fit of all the associated sources, sources which do not converge are thrown out. By resubmitting the list to ALLSTAR a third time often a few remaining poorly fit spurious sources are removed from the final source list. Because ALLSTAR is an iterative process, stars are PSF fitted and removed from the original image progressively making a residual image with fewer and fewer sources. Sources are allowed to migrate in position a small amount to optimize the PSF fit for the sources not yet extracted. This process can produce a source list which can have multiple sources within a very small radius of each other (a radius small enough that if ALLSTAR were processing just those close sources it would have merged them together into one source), because of this rare situation, the above source list is checked for sources that are less than 0.375*FWHM apart, those sources found are merged into one source. The final step in the photometry process is "tweaking". This step was found to be necessary due to the complex nature of the background emission seen in some GLIMPSE images. Again experience has shown that sources extracted by ALLSTAR in complex background regions are often over-subtracted due to the difficult process of properly determining the background for multiple associated sources in a variable background region. ALLSTAR was designed and works well in flat background regions. Our "tweaking" routine uses the residual image as a background image. First we median smooth the residual image (5 pixel box) and then subtract the smoothed image from the residual image itself, this produces a flattened residual image. Next we do aperture photometry on this flattened image. We use the ALLSTAR source list as our input list and we use a very small aperture (2 pixel radius) at the very core of each source. Because the image we are working with is flattened and is the residual image we can conclude that if the resultant aperture photometry at each source location is subtantially negative or positive then the source is respectively over or under subtracted from the original image. By comparing this aperture photometry to the original ALLSTAR photometry we can "trigger" a correction. For the OSV data, the the "triggering" ratio of aperture photometry to ALLSTAR photometry was set at an aggressive level of only 5%. This was probably due to the extremely high and variable background seen in much of the OSV region. For our first segment data for the survey, a less aggressive trigger value of 20% was used because most of the images are flatter with lower backgrounds. If the backgrounds are low and flat ALLSTAR should do a respectable job and "tweaking" should not be required. Understanding the conditions requiring a "tweaking" correction is still an on-going process. An additional positive outcome from this tweaking step is the identification of possible cosmic rays. Sources which appear to be excessively undersubtracted are characteristically CRs. This is because to fit a stellar PSF to a bright CR will result in a residual bright core with an oversubtracted wing region, the tweaking routine is designed to look for these and flag them as CRs. These "sources" are then removed from the source list, and ultimately it is hoped that these CRs can be masked out for our final mosaic images. This process will find some of our CRs but certainly not all of them. We now have our final source list, it has found and excluded some CRs and merged any sources within 0.375*FWHM of each other, it has tweaked sources determined to be over or under-subtracted from the original image, it has found sources both at a 3 sigma local background level and sources at a 5 sigma level that may have been hidden in the wings of the brighter stars. These sources are then removed from the original image to produce a final residual image. The photometry for each source will have an associated error which is a result of 4 components; photon-statistical error, psf-determination error, flat-fielding error and readout noise. The error is also adjusted to reflect the accuracy of the PSF fit determined from the associated chi value of the PSF fit.