psphotStack is the program used to perform object detection, classification, and photometry analysis for the stack images. Individual exposures are processed with the related program, psphot (see the draft psphot user's guide). The treatment of stacks is slightly different from the treatment of individual exposures in a few respects:

  • a set of skycell images is processed at once in psphotStack, nominally all five filters grizy.
  • both raw (unconvolved) and convolved stacks are loaded. the raw stack is used for detection, while the convolved stack is used for photometric and morphological analysis. update: as of r33964, we are using the 'raw' images for both detection and morphological analysis (but not radial apertures, discussed below).
  • objects detected in the input frames are joined across the multiple filters to define common objects. Any object for which a sources is NOT detected in any of the frames is used to define a source on those frames (MATCHED sources). PSF photometry is performed on the matched sources.
  • for each set of exposures, psphotStack generates a set of PSF-matched images, convolved to a common PSF
  • a set of radial apertures are used to measure photometry of all objects and (un-detected) matched sources. this is done for the original convolved stacks and the PSF-matched images with full-width half-max values specified by the psphot.config key PSPHOT.STACK.TARGET.PSF.FWHM (nominally 6.0 & 8.0 pixels).

For the radial apertures, the following annulii are used (defined by psphot.config keys @RADIAL.ANNULAR.BINS.LOWER and @RADIAL.ANNULAR.BINS.UPPER):

annulus inner (pix) outer (pix) inner (arcsec) outer (arcsecPSPS r#
0 0.00 0.96 0.00 0.24 1
1 0.96 2.72 0.24 0.68 2
2 2.72 4.16 0.68 1.04 3
3 4.16 7.04 1.04 1.76 4
4 7.04 12.00 1.76 3.00 5
5 12.00 18.56 3.00 4.64 6
6 18.56 29.76 4.64 7.44 7
7 29.76 45.68 7.44 11.42 8
8 45.68 72.80 11.42 18.20 9
9 72.80 112.80 18.20 28.20 10
10 112.80 176.88 28.20 44.22 N/A

These have been chosen to match the apertures defined by SDSS (see photo profile). For any given psphotStack analysis, the radial apertures actually used are written to the header of the corresponding XRAD extension (see keywords RMIN_NN and RMAX_NN).

NOTE: The psphotStack annulus numbers are zero-offset arrary indices. PSPS uses unity offset. The corresponding PSPS radial apertures are shown in the table above.

Note: psphotStack calculates the total flux within each circular aperture (not the annulus). The following values are saved in the smf/cmf file in the XRAD extension:

field contents
IPP_IDET unique (within this skycell) detection ID; matches the detection ID for the corresponding PSF entry in the PSF extension
X_APER center of the aperture in pixels (same as the centroid or the peak)
Y_APER center of the aperture in pixels (same as the centroid or the peak)
PSF_FWHM fwhm of the matched psf (in pixels) or NaN if NOT matched
APER_FLUX sum of counts within the aperture
APER_FLUX_ERR formal error on the flux (sqrt(sum(variance))
APER_FLUX_STDEV standard deviation of flux (in fact standard deviation of the per-pixel surface brightness)
APER_FILL fraction of the circular aperture filled with pixels (number of unmasked pixels / Area in pixels -- note this can be > 1 due to boundary differences)

The APER_* fields are written as FITS vectors with multiple elements per field corresponding to each of the radial apertures defined above.

If an object listed in the PSF table has radial aperture photometry measured, then that object will have multiple rows in the XRAD table, one for each of the PSF values: raw, matched version 1, matched version 2, etc.

the centroid is used if: * the object is saturate * the moments are defined and measured * the centroid does not deviate from the peak position by more than 1.5 pixels, unless saturated otherwise, the peak position is used.