Optical Spectra Target Flags

Every SDSS spectrum was taken for a reason. The process of planning which objects will be spectroscopically observed is called targeting. An object may have been targeted for spectroscopy for any one of many different purposes, or for several different reasons at once. It is important to keep track of all the reasons why a particular object was targeted for spectroscopy.

To keep track of why each object was targeted for spectroscopy, SDSS uses target flags. Target flags can be used in catalog queries to select only objects that were (or were not) targeted within any targeting program. The descriptions below and their links explain what the various types of programname values mean.

If you are not familiar with what a bitmask is, please see our bitmask primer. In addition, we’ll discuss below the differences between various SDSS-III surveys and programs; please see the basics of SDSS spectroscopy for an outline of what those mean.

Quick Start

Essentially, the target flags can be used to select out objects that were targeted for some particular reason. A very common example is to select objects which were Main Sample galaxy targets. These had one of the LEGACY_TARGET1 bits “GALAXY”, “GALAXY_BIG” and “GALAXY_BRIGHT_CORE” set (bits 6, 7, and 8). This corresponds to the requirement:

 (legacy_target1 & (64 | 128 | 256)) > 0

Or perhaps you are Jim Annis, and you want to find the objects you targeted in your low-redshift galaxy special program. Doing so requires checking SPECIAL_TARGET1 for the “LOWZ_ANNIS” bit (bit 1):

 (special_target1 & 2) > 0

We cannot list all of the possibilities here: which set of flags you want to check depends on your particular requirements. The documentation below explains what each of the available target flags means.

SDSS-III target bitmasks in DR9

TODO: UPDATE THIS ENTIRE SECTION TO REFER TO DR12 INSTEAD OF DR9

The target bitmasks in use are:

LEGACY_TARGET1:
primary target bits for Legacy science targets
LEGACY_TARGET2:
secondary target bits for Legacy targets
SEGUE1_TARGET1:
primary target bits for SEGUE-1 science targets
SEGUE1_TARGET2:
secondary target bits for SEGUE-1 targets
SEGUE2_TARGET1:
primary target bits for SEGUE-2 science targets
SEGUE2_TARGET2:
secondary target bits for SEGUE-2 targets
SPECIAL_TARGET1:
primary target bits for special program science targets
SPECIAL_TARGET2:
secondary target bits for special program targets
BOSS_TARGET1:
BOSS primary survey targets
ANCILLARY_TARGET1:
BOSS ancillary programs 1
ANCILLARY_TARGET2:
BOSS ancillary programs 2

In general, the “primary” target bits denote science targets, and the “secondary” target bits denote spectrophotometic standards, sky targets and other technical targets.

In addition, in some rare cases, one needs to check two extra flags, PRIMTARGET and SECTARGET. Doing so is only necessary if one is digging into the details of some particular special programs. (Of course, they can be used just as they were in DR8 and previous, for backwards compatibility).

Legacy targets

The Legacy targets are those taken as part of the SDSS Legacy survey, which is the wide-field survey of galaxies brighter than r=17.77 (Main Sample), Luminous Red Galaxies, and QSOs. In addition there are a number of other categories. In DR9, only spectra on plates that were part of the Legacy program actually have the LEGACY_TARGET1 or LEGACY_TARGET2 bits set (i.e. those with survey set to “sdss” and programName set to “legacy”).

The target selection algorithms documentation describes the meaning of the bits of these flags.

SEGUE-1 targets

The SEGUE-1 targets are those taken as part of the SEGUE-1 survey of Galactic stars. In DR9, only spectra on plates that were part of a SEGUE-1 program actually have the SEGUE1_TARGET1 or SEGUE1_TARGET2 bits set (i.e. those with survey set to “segue1”).

The SEGUE target selection algorithms documentation describes the meaning of the bits of these flags.

SEGUE-2 targets

The SEGUE-2 targets are those taken as part of the SEGUE-2 survey of Galactic stars. In DR9, only spectra on plates that were part of a SEGUE-2 program actually have the SEGUE2_TARGET1 or SEGUE2_TARGET2 bits set (i.e. those with survey set to “segue2”).

The SEGUE target selection algorithms documentation describes the meaning of the bits of these flags.

SEGUE Cluster Plate targets

The targets on SEGUE “cluster” plates (either SEGUE-1 or SEGUE-2) are designated in the SEGUE-1 and SEGUE-2 target flags as described in the SEGUE cluster plates target selection documentation.

Special program targets

The special programs targets are those taken as part of one of the several special programs that were executed with the SDSS spectrograph over the years. These programs are on plates with survey set to “sdss” but programName not set to “legacy”.

The special programs target selection algorithms documentation describes the meaning of the bits of these flags.

BOSS survey targets

The targets on BOSS plates are primarily Luminous Red Galaxies (LRGs) and quasars, with a number of ancillary targets as well. The BOSS targets are indicated with BOSS_TARGET1 and BOSS_TARGET2, whereas the ancillary targets are indicated with ANCILLARY_TARGET1 and ANCILLARY_TARGET2. These values are set for plates with survey set to “boss” and programName set to “boss”.

Please see our overview of the BOSS target selection. The individual target selection algorithms for BOSS are described in the BOSS LRG target selection, BOSS quasar target selection and BOSS ancillary target selection documentation pages.

What happened to "primtarget"?

Old SDSS hands will recall “primtarget” and “sectarget” as the target flags that were previously used. Indeed, our data tables include those values for backwards compatibility (mostly! see next paragraph). However, we felt that because the bits in those flags had been used for multiple purposes over the years, that it would be prudent to create some more flags to contain the information and make querying the data easier.

One exception is that (as noted in the targeting tables) there are occasionally cases like “SPECIAL_FILLER”, “SOUTHERN_COMPLETE”, “SOUTHERN_EXTENDED”, and “FAINT_QSO” where there is a special target that was selected because it passed the regular Legacy target selection or a slight modification thereof. In those relatively rare cases, one does need to consult PRIMTARGET to determine the actual reason for targeting.