| Understanding the image processing flags - Summary tableFor objects in the calibrated object lists (tsObj files and
the tables
with photometric data in the Catalog Archive Server database), the
photometric pipeline sets a number of flags that indicate the status
of each object, warn of possible problems with the image itself, and
warn of possible problems in the measurement of various quantities
associated with the object. They are briefly described here, with
links to a companion page with details
about the flags. For yet more details, refer to Robert Lupton's
flags document. Possible problems associated with individual pixels in the reduced
images ("corrected frames") are traced in the image masks.Objects in the catalog have two major sets of flags: 
  The status flags in the
      tsObjtable, with information needed to discount
      duplicate detections of the same object in the catalog.The object flags, with information
      about the success of measuring the object's location, flux, or
      morphology. The "status" of an objectThe catalogs contain multiple detections of objects from
overlapping CCD frames. For most applications, remove duplicate
detections of the same objects by considering only those which have
the "primary" flag set in the statusentry of the
tsObj file. A description of status is provided on the details page. The details of
determining primary status and of the remaining flags stored in
statusare found on the algorithms page describing the
resolution of overlaps (resolve). Object "flags"The photometric pipeline's flags describe how certain measurements
were performed for each object, and which measurements are considered
unreliable or have failed altogether. You must interpret the
flags correctly to obtain meaningful results.For each object, there are 59 flags stored as bit fields in two 32-bit
table columns in the tsObjfile, flags and
flags2. There are two sets of these flag variables for each
object:
  Here we describe which flags should be checked for which measurements,
including whether you need to look at the flag in each filter, or at
the objc_flag.flags and flags2 as arrays of five flags,
      one each for u, g, r, i, z.objc_flags and objc_flags2 are
      scalars. These are a
      combination of the per-filter flags appropriate for the whole
      object. RecommendationsClean sample of point sourcesIn a given band, first select objects with PRIMARYstatus and
apply the SDSS star-galaxy separation. Then, define the following
meta-flags:  DEBLEND_PROBLEMS = PEAKCENTER || NOTCHECKED || (DEBLEND_NOPEAK && psfErr>0.2)
 INTERP_PROBLEMS = PSF_FLUX_INTERP || BAD_COUNTS_ERROR ||
(INTERP_CENTER && CR)
Then include only objects that satisfy the following in the band in
question:  BINNED1 && !BRIGHT && !SATURATED && !EDGE && (!BLENDED || NODEBLEND) &&
 !NOPROFILE && !INTERP_PROBLEMS && !DEBLEND_PROBLEMS  If you are very picky, you probably will want not to include the
NODEBLENDobjects. Note that selectingPRIMARYobjects implies!BRIGHT && (!BLENDED ||
NODEBLEND || nchild == 0) These are used in the SDSS quasar target selection code which is
quite sensitive to outliers in the stellar locus.
If you want to select very rare outliers in color space, especially
single-band detections, add cuts to MAYBE_CRandMAYBE_EGHOSTto the above list. Clean sample of galaxiesAs for point sources, but don't cut on EDGE(large galaxies
often run into the edge). Also, you may not need to worry about theINTERPproblems.  TheBRIGHTEST_GALAXY_CHILDmay be
useful if you are looking at bright galaxies; it needs further
testing.  If you want to select (or reject against) moving objects
(asteroids), cut on the DEBLENDED_AS_MOVINGflag, and then cut
on the motion itself.  See the the
SDSS Moving Objects Catalog for more details.  An interesting
experiment is to remove the restriction on theDEBLENDED_AS_MOVINGflag to find objects with very small proper
motion (i.e., those beyond Saturn). Descriptions of all flagsFlags that affect the object's statusThese flags must be considered to reject duplicate catalog
entries of the same object. By using only objects with
PRIMARYstatus (see above), you automatically
account for the most common cases: those objects which areBRIGHT, or
which have been deblended (decomposed) into one or more child objects
which are listed individually. In the tables, Flag names link to detailed descriptions. The objc
column indicates that this flag will be set in objc_flags
or objc_flags2 if this flag is set in any of the
filters. "bit" is the number of the bit; to check whether bit
n in flags1 is set, compute flags1 & 2**nwhere&is the bitwiseANDoperator. 
  
    | Flag | 1/2 | bit | objc | Description |  
    | BINNED1 | 1 | 28 |  | detected at >=5 sigma in original imaging frame |  
    | BINNED2 | 1 | 29 |  | detected in 2x2 binned frame; often outskirts
	of bright galaxies, scattered light, low surface brightness galaxies |  
    | BINNED4 | 1 | 30 |  | detected in 4x4 binned frame; few are genuine astrophysical objects |  
    | DETECTED | 1 | 32 |  | BINNED1|BINNED2|BINNED4 |  
    | BRIGHT | 1 | 1 | X | duplicate detection of > 200 sigma objects, discard. |  
    | BLENDED | 1 | 3 | X | Object has more than one peak, there was an attempt to deblend
    it into several CHILDobjects. Discard unlessNODEBLENDis set. |  
    | NODEBLEND | 1 | 6 | X | Object is a blend, but was not deblended because it is: 
	  too close to an edge (EDGEalready set),too large	(TOO_LARGE), ora child overlaps an edge (EDGEwill be set). |  
    | CHILD | 1 | 4 | X | Object is part of a BLENDED"parent" object. May beBLENDEDitself. |   Flags that indicate problems with the raw dataThese flags are mainly informational and important only for some
objects and science applications.
  
    | Flag | 1/2 | bit | objc | Description |  
    | SATURATED | 1 | 18 | X | contains saturated pixels; affects star-galaxy separation |  
    | SATURATED_CENTER | 2 | 11 |  | as SATURATED, affected pixels close to the center |  
    | EDGE | 1 | 2 |  | object was too close to edge of frame to be measured; should not affect
    point sources |  
    | LOCAL_EDGE | 2 | 7 |  | like EDGE, but for rare cases when one-half of aCCDfailed |  
    | DEBLENDED_AT_EDGE | 2 | 13 |  | object is near EDGE, but so large that it was deblended
	anyway. Otherwise, it might have been missed. |  
    | INTERP | 1 | 17 |  | object contains interpolated-over pixels (bad columns, cosmic
	rays, bleed trails); should not affect photometry for
	single bad column or cosmic ray |  
    | INTERP_CENTER | 2 | 12 |  | interpolated pixel(s) within 3 pix of the center. Photometry
	may be affected. |  
    | PSF_FLUX_INTERP | 2 | 15 |  | more than 20% of PSF flux is interpolated over. May cause
	outliers in color-color plots, e.g. |  
    | BAD_COUNTS_ERROR | 2 | 8 |  | interpolation affected many pixels; PSF flux error is
	inaccurate and likely underestimated. |  
    | COSMIC_RAY(CR) | 1 | 12 |  | object contains cosmic rays which have been interpolated over;
    should not affect photometry |  
    | MAYBE_CR | 2 | 24 |  | object may be a cosmic ray; not interpolated
	over. Useful in searches for single-filter detections. |  
    | MAYBE_EGHOST | 2 | 25 |  | object may be an electronics ghost of a bright star. Be
	suspicious about faint single-filter detections. |  Flags that indicate problems with the imageThese flags may be hints that an object may not be real or that a
measurement on the object failed.
  
    | Flag | 1/2 | bit | objc | Description |  
    | CANONICAL_CENTER | 1 | 0 |  | could not determine a centroid in this band; used centroid in CANONICAL_BANDinstead |  
    | PEAKCENTER | 1 | 5 |  | used brightest pixel as centroid; hint that an object may not
	be real |  
    | DEBLEND_NOPEAK | 2 | 14 |  | object is a CHILDof aDEBLENDbut has no peak; hint that an
	object may not be real |  
    | NOPROFILE | 1 | 7 |  | only 0 or 1 entries for the radial flux profile; photometric
	quantities derived from profile are suspect |  
    | NOTCHECKED | 1 | 19 |  | object contains pixels which were not checked for peaks by
	deblender; deblending may be unreliable |  
    | NOTCHECKED_CENTER | 2 | 26 |  | as NOTCHECKED, but affected pixels are near object's center |  
    | TOO_LARGE | 1 | 24 |  | object is larger than outermost radiale profile bin (r
	> 4arcmin), or a CHILDin a deblend is > 1/2
	frame. Very large object, poorly determined sky, or bad
	deblend. Photometry questionable. |  
    | BADSKY | 1 | 22 |  | local sky measurement failed, object photometry is meaningless |  Problems associated with specific quantitiesSome simply say that the quantity in question could not be
measured. Others indicate more subtle aspects of the measurements,
particular of Petrosian
quantities.
  
    | Flag | 1/2 | bit | objc | Description |  
    | NOSTOKES | 1 | 21 |  | Stokes Q and U (isophotal shape parameters) undetermined |  
    | ELLIPFAINT | 1 | 27 |  | no isophotal fits performed |  
    | PETROFAINT | 1 | 23 |  | Petrosian radius measured at very low surface
	brightness. Petrosian magnitude still usable. |  
    | NOPETRO | 1 | 8 |  | no Petrosian radius could be determined. Petrosian magnitude
	still usable. |  
    | NOPETRO_BIG | 1 | 10 |  | Petrosian radius larger than extracted radial profile. Happens
    for noisy sky or low S/N objects. |  
    | MANYPETRO | 1 | 9 |  | more than 1 value was found for the Petrosian radius. |  
    | MANY_R50/MANY_R90 | 1 | 13/14 |  | object's radial profile dips below 0 and more than one radius
	was found enclosing 50%/90% of the light. Rare. |  
    | INCOMPLETE_PROFILE | 1 | 16 |  | Petrosian radius hits edge of frame. Petrosian quantities
	should still be reasonable. |  
    | DEBLENDED_AS_MOVING | 2 | 0 |  | object recognised to be moving between different
	filters. For most purposes, consider only this flag to
    find moving objects. |  
    | MOVED | 1 | 31 |  | candidate for moving object. Does not mean it did move
    - consider DEBLENDED_AS_MOVINGinstead! Not useful. |  
    | NODEBLEND_MOVING | 2 | 1 | X | candidate moving object ( MOVED) but was not deblended as moving |  
    | TOO_FEW_DETECTIONS | 2 | 2 |  | object detected in too few bands for motion determination |  
    | TOO_FEW_GOOD_DETECTIONS | 2 | 16 |  | even though detected, no good centroid found in enough bands
	for motion determination |  
    | STATIONARY | 2 | 4 |  | A "moving" object's velocity is consistent with zero. |  BAD_MOVING_FIT | 2 | 3 |  | motion inconsistent with straight line, not deblended as moving | 
    | BAD_MOVING_FIT_CHILD | 2 | 9 |  | in a complicated blend, child's motion was inconsistent with
	straight line and parent was not deblended as moving |  
    | CENTER_OFF_AIMAGE | 2 | 17 |  | nominal motion moves object off atlas image in this band |  
    | AMOMENT_UNWEIGHTED | 2 | 21 |  | 'adaptive' moment are actually unweighted for this object. NB:
    to find out if a moment measurement failed entirely, check the
	error field. |  
    | AMOMENT_SHIFT | 2 | 22 |  | centroid shifted too far during calculation of moments,
	moment calculation failed and M_e1,M_e2give the value
    of the shift |  
    | AMOMENT_MAXITER | 2 | 23 |  | moment calculation did not converge |  
    | AMOMENT_UNWEIGHTED_PSF | 2 | 27 |  | PSF moments are unweighted. |  All flags so far indicate some problem or failure of a
measurement. The following flags provide information about the
processing, but do not indicate a severe problem or failure. Informational flags related to deblending
  
    | Flag | 1/2 | bit | objc | Description |  
    | DEBLEND_TOO_MANY_PEAKS | 1 | 11 |  | object has more than 25 peaks; only first 25 were deblended
	and contain all of the parent's flux |  
    | DEBLEND_UNASSIGNED_FLUX | 2 | 10 | X | more than 5% of the parent's Petrosian flux was initially not assigned to
	children; all this flux has been redistributed among children |  
    | DEBLEND_PRUNED | 1 | 26 |  | parent containing peaks which were not deblended |  
    | PEAKS_TOO_CLOSE | 2 | 5 |  | some peaks were too close to be deblended |  
    | DEBLEND_DEGENERATE | 2 | 18 |  | some peaks had degenerate templates |  
    | BRIGHTEST_GALAXY_CHILD | 2 | 19 |  | brightest child among one parent's children |  
    | DEBLENDED_AS_PSF | 1 | 25 |  | child is unresolved |  
    | HAS_SATUR_DN | 2 | 27 |  | object is saturated, but attempted to add counts from bleed
	trail back in |  
    | DEBLEND_PEEPHOLE | 2 | 28 |  | object was found in a second deblender pass attempting to
	catch special cases |  Further informational flags
  
    | Flag | 1/2 | bit | objc | Description |  
    | BAD_RADIAL | 1 | 15 |  | last bin in radial profile < 0; usually can be ignored |  
    | CANONICAL_BAND | 2 | 20 |  | object is undetected in r-band; this band was used
	to determine Petrosian and Model radii |  
    | SUBTRACTED | 1 | 20 |  | object is part of extended wing of a bright star |  
    | BINNED_CENTER | 2 | 6 |  | object was extended and centroid was determined on 2x2 binned
	frame. Avoid for astrometric work, e.g. |  Last modified: Mon Aug 22 15:35:48 CDT 2005
 |