Site Map

Recommendation on use photometric processing flags

A number of flags can be set during photometric processing. Here we briefly describe some basic recommendations for using them to achieve clean samples. For details on the meaning of these flags, please see the complete documentation:

For a quick way to select a clean sample of stars and galaxies (that is, however, probably not optimal for what you want to do), it is enough to check the "clean" flag and the calibration status in whatever bands are of interest to you. A SQL query in CAS that would do this would be as follows (obviously you would add to this query whatever other selection criteria you had):

  SELECT TOP 100 ra, dec FROM photoObj
  WHERE clean = 1 and (calibStatus_r & 1) != 0

Let us pick apart "clean" so that you can understand it better and optimize it for your purposes. Note that, for example, the target selection codes for SDSS Legacy, BOSS, or SEGUE did not always use all these checks, and sometimes checked other bits. There is no perfect set of checks for all purposes!

There is also a clean photometry tutorial that can guide you through the various ways to select clean photometry.

Removing duplicates

First, "clean" includes only objects which are "primary" in the survey (see the resolve documentation). One can apply this criterion using either:

  SELECT TOP 100 ra, dec FROM photoObj
  WHERE mode = 1


  SELECT TOP 100 ra, dec FROM photoObj
  WHERE (resolveStatus & 256) != 0

which are equivalent.

Removing objects with deblending problems

For both stars and galaxies, "clean" also checks that there are no r band deblending problems, in particular checking PEAKCENTER and NOTCHECKED. In addition, for low signal-to-noise objects DEBLEND_NOPEAK can also be a sign of trouble.

The equivalent SQL code is:

  (flags_r & 0x20) = 0 --/ not PEAKCENTER
  and (flags_r & 0x80000) = 0 --/ not NOTCHECKED
  and ((flags_r & 0x400000000000) = 0 or psfmagerr_r <= 0.2) --/ high S/N or not DEBLEND_NOPEAK

Removing objects with interpolation problems

For both stars and galaxies, "clean" checks that there are no substantial r band interpolation issues, checking PSF_FLUX_INTERP, BAD_COUNTS_ERROR and cases where INTERP_CENTER and CR are set.

The equivalent SQL code is:

  ((flags_r & 0x800000000000) = 0) --/ not PSF_FLUX_INTERP
  and ((flags_r & 0x10000000000) = 0) --/ not BAD_COUNTS_ERROR
  and ((flags_r & 0x100000000000) = 0 or (flags_r & 0x1000) = 0) --/ not both INTERP_CENTER and CR

Removing suspicious detections

For stars and galaxies (with type = 6 or 3), the "clean" flag checks that the object has pixels detected in the first pass (BINNED1), that it isn't saturated (SATURATED), and that it has a valid radial profile (NOPROFILE).

The equivalent SQL code is:

  ((flags_r & 0x10000000) != 0) --/ BINNED1
  and ((flags_r & 0x40000) = 0) --/ not SATURATED
  and ((flags_r & 0x80) = 0) --/ not NOPROFILE

Edge condition for stars

In addition, for stars alone (with type = 6), "clean" checks that the object isn't too close to the EDGE.

The equivalent SQL code is:

  ((flags_r & 0x4) = 0) and --/ not EDGE