SDSS Bitmasks

SDSS makes heavy use of the concept of a bitmask in spectroscopic target flags and other contexts. For the actual bit values for all SDSS flags, see the lists below.

The first section of this page is a primer for those who have never used bitmasks before. Further sections of the page explain how to use bitmasks in CAS and in IDL. The spectroscopic documentation also contains documentation on how to use bitmasks in the SEGUE survey.

Introduction to Bitmasks

A bitmask uses the bits in the binary representation of an integer as “toggles” to indicate whether certain conditions are met. For a more general introduction to this concept, consult Wikipedia or other online resources on the subject.

Converting between hex, binary, and decimal values
Hex Binary Decimal
0x1 1 1
0x2 10 2
0x4 100 4
0x8 1000 8
0x10 10000 16
0x20 100000 32
0x40 1000000 64
0x80 10000000 128
... ... ...
0x80000000 1000000....0 2147483648

Within the SDSS, the most common use of a bitmask is to indicate the status of an object (or spectrum, or target, or whatever) with respect to some set of conditions. For example, a given photometric object might be saturated, and be deblended, and have some interpolated pixels. All of these conditions are tracked as “bits” in a bitmask-encoded value called “flags”. For instance, if bit 18 is set, it indicates there is a saturated pixel in the object; if bit 18 is not set, there is no saturated pixel in the object. This sort of bitmask is useful when there are many possible Boolean (true/false) conditions to track, since it doesn't require an individual variable for each one.

In more detail, when we refer above to “bit 18,” we are referring to the eighteenth bit, counting right to left with the least significant digit indexed as digit number zero. Thus, if only bit 18 is set, the integer is equal to 218 = 262144. Of course, in general, many bits can be set, so the value of the variable is not necessarily a power of two. If the integer is signed, note that bit 31 indicates the sign of the integer, so the integer value of a bitmask might be interpreted by the computer as negative.

Note also that many people express bitmasks in hexadecimal instead of decimal. You can tell when people are doing this because they will start with “0x” as in “0x00000100” instead of “8”. The choice to write the numbers in hexadecimal is just a convention; the values in the files and in CAS are regular (decimal) integers. However, this choice does often make it easier to figure out which bit is being referred to. For example, it is easy to figure out that “0x00040000” is bit 18 than to figure out that 262144 is bit 18. The table above shows examples of converting among hex, binary and decimal numbers. Be aware that many programming languages provide tools for translating between binary, hex, and decimal (commands for IDL are given in the IDL section below).

Examples of using bitmasks

To get a sense of this behavior, consider some one-byte unsigned integers, and what their bits are:

bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 integer value
0 1 0 0 1 0 1 1 = 75
1 0 0 0 0 0 1 0 = 130
0 0 0 0 0 1 1 1 = 7

To check the value of one or more bits, one needs to execute a “bitwise and” on the bitmask. The simplest case is checking the value of a single bit. In C, for example, the bitwise and operator is “&”, so you can write an if statement like:

 if((myflag & 4) != 0) {printf("Bit 2 is set\n"); } else {printf("Bit 2 is not set\n"); }

which will output whether or not bit 2 is set.

What is the code doing here? It is asking, for each bit, “is this bit set in both myflag and in 4?” If so, the result (an integer) will have that bit set. We can look, for example, at what this operation would look like if myflag were equal to 13:

bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
myflag = 0 0 0 0 1 1 0 1
4 = 0 0 0 0 0 1 0 0
myflag & 4 = 0 0 0 0 0 1 0 0

Clearly the result equals “4”, so the condition is satisfied: bit 2 is set! You can easily generalize these sort of operations to bitwise “or” or “exclusive or”, or “and not”. Consult a good computer science reference for those details.

For SDSS, the important thing to know is what each bit means for each type of bitmask. If you expand this page's Table of Contents, within-page links there will lead to tables for each bitmask-encoded variable, telling you what it means when each bit it set.

SDSS Bitmasks in CAS

The query tools of the SDSS CAS allow you to check values of a bitmask variable; see the tables below for detailed information on the meanings of all bitmask values. Checking bitmasks can be included in the where clause of an SQL query, using a form such as:

(flagname & value) != 0

where & is a bitwise AND operator.

Similarly, | is a bitwise OR operator. A simple example is as follows:

SELECT plate, mjd, fiberid FROM specObjAll WHERE (zWarning & 128) != 0

The bitmask value can also be specified in hex, preceded by "0x". Important: even though bitmask bits take the values {0, 1}, take care to always compare bit values using the := inequality operator, rather than the greater than operator. Because computers can sometimes interpret bitmask values as signed integers, a greater than check may fail, while an inequality check will always return correct results.

More usage of bitmasks in CAS is documented in a set of examples on the SkyServer website. Some values of each bitmask variable are also enumerated there as part of the Data Constants documentation in the schema browser. As a final note, you will see in some of the documentation that there are some functions that return the values associated with each bitmask (e.g. fPhotoFlags). Those lookup functions are useful for readability; however, note that they come with a performance cost, and that using the bitmask value explicitly will result in faster queries.

SDSS Bitmasks in CAS

The query tools of the SDSS CAS allow you to check values of a bitmask variable; see the tables below for detailed information on the meanings of all bitmask values. Checking bitmasks can be included in the where clause of an SQL query, using a form such as:

(flagname & value) != 0

where & is a bitwise AND operator.

Similarly, | is a bitwise OR operator. A simple example is as follows:

SELECT plate, mjd, fiberid FROM specObjAll WHERE (zWarning & 128) != 0

The bitmask value can also be specified in hex, preceded by "0x". Important: even though bitmask bits take the values {0, 1}, take care to always compare bit values using the := inequality operator, rather than the greater than operator. Because computers can sometimes interpret bitmask values as signed integers, a greater than check may fail, while an inequality check will always return correct results.

More usage of bitmasks in CAS is documented in a set of examples on the SkyServer website. Some values of each bitmask variable are also enumerated there as part of the Data Constants documentation in the schema browser. As a final note, you will see in some of the documentation that there are some functions that return the values associated with each bitmask (e.g. fPhotoFlags). Those lookup functions are useful for readability; however, note that they come with a performance cost, and that using the bitmask value explicitly will result in faster queries.

SDSS Bitmasks in IDL

SDSS flat files contain all of the bitmasks. Using them is particularly convenient for IDL users who use the idlutils product.

Inside of idlutils, there is a file, $IDLUTILS_DIR/data/sdss/sdssMaskbits.par, which contains a listing of all mask bits defined for SDSS.

To access these from within IDL, one uses either sdss_flagval() or sdss_flagname(). The first tells you the integer value corresponding to each bit mask name. The second returns the names of the bits set, given an integer.

For example, you can ask what the integer corresponding to NEGATIVE_EMISSION is as follows:

IDL> PRINT, sdss_flagval('ZWARNING', 'NEGATIVE_EMISSION')
64

Or, if ZWARNING for a spectrum is set to “246”, then you can check what that means as follows:

IDL> PRINT, sdss_flagname('ZWARNING', 246)
LITTLE_COVERAGE SMALL_DELTA_CHI2 MANY_OUTLIERS Z_FITLIMIT NEGATIVE_EMISSION UNPLUGGED

Uh oh! That spectrum must be Very Bad!

The most common usage is within a program. For example, let's say you want to find all spectrum for which MANY_OUTLIERS is set. In IDL you can do this as follows (assuming that “spobj” is a structure which has “zwarning” as a tag):

imany= WHERE((spobj.zwarning AND sdss_flagval('ZWARNING', 'MANY_OUTLIERS')) NE 0, nmany)

which returns “imany” as an array of those elements with ZWARNING set. You should be careful in calls such as those above to always ask for the AND to return a non-zero output (do not check for LT 0, which can get you in trouble if zwarning happens to be cast as a signed integer).

A useful tool in IDL is the ability to write out an integer in hex format. For example, the command below outputs “80000000”:

IDL> PRINT, STRING(2L^31, FORMAT='(Z)')
80000000

List of Bitmasks

In the flat-files, the photo flags are split into two 32-bit variables (objc_flags1 and objc_flags2). In the CAS, these are combined into a single variable flags. The flags listed here are associated with objc_flags1, and the first 32-bits of flags. Note there are also flags on a per-band basis. The names of these flags in the CAS are appended with the band, e.g. flags_r. In the flat files an array of length 5 is used flags[5] ordered u,g,r,i,z.

Bit name Binary digit Description
CANONICAL_CENTER 0 The quantities (psf counts, model fits and likelihoods) that are usually determined at an object's center as determined band-by-band were in fact determined at the canonical center (suitably transformed). This is due to the object being to close to the edge to extract a profile at the local center, and OBJECT1_EDGE is also set.
BRIGHT 1 Indicates that the object was detected as a bright object. Since these are typically remeasured as faint objects, most users can ignore BRIGHT objects.
EDGE 2 Object is too close to edge of frame in this band.
BLENDED 3 Object was determined to be a blend. The flag is set if: more than one peak is detected within an object in a single band together; distinct peaks are found when merging different colors of one object together; or distinct peaks result when merging different objects together.
CHILD 4 Object is a child, created by the deblender.
PEAKCENTER 5 Given center is position of peak pixel, as attempts to determine a better centroid failed.
NODEBLEND 6 Although this object was marked as a blend, no deblending was attempted.
NOPROFILE 7 Frames couldn't extract a radial profile.
NOPETRO 8 No Petrosian radius or other Petrosian quantities could be measured.
MANYPETRO 9 Object has more than one possible Petrosian radius.
NOPETRO_BIG 10 The Petrosian ratio has not fallen to the value at which the Petrosian radius is defined at the outermost point of the extracted radial profile. NOPETRO is set, and the Petrosian radius is set to the outermost point in the profile.
DEBLEND_TOO_MANY_PEAKS 11 The object had the OBJECT1_DEBLEND flag set, but it contained too many candidate children to be fully deblended. This flag is only set in the parent, i.e. the object with too many peaks.
CR 12 Object contains at least one pixel which was contaminated by a cosmic ray. The OBJECT1_INTERP flag is also set. This flag does not mean that this object is a cosmic ray; rather it means that a cosmic ray has been removed.
MANYR50 13 More than one radius was found to contain 50% of the Petrosian flux. (For this to happen part of the radial profile must be negative).
MANYR90 14 More than one radius was found to contain 90% of the Petrosian flux. (For this to happen part of the radial profile must be negative).
BAD_RADIAL 15 Measured profile includes points with a S/N <= 0. In practice this flag is essentially meaningless.
INCOMPLETE_PROFILE 16 A circle, centered on the object, of radius the canonical Petrosian radius extends beyond the edge of the frame. The radial profile is still measured from those parts of the object that do lie on the frame.
INTERP 17 The object contains interpolated pixels (e.g. cosmic rays or bad columns).
SATUR 18 The object contains saturated pixels; INTERP is also set.
NOTCHECKED 19 Object includes pixels that were not checked for peaks, for example the unsmoothed edges of frames, and the cores of subtracted or saturated stars.
SUBTRACTED 20 Object (presumably a star) had wings subtracted.
NOSTOKES 21 Object has no measured Stokes parameters.
BADSKY 22 The estimated sky level is so bad that the central value of the radial profile is crazily negative; this is usually the result of the subtraction of the wings of bright stars failing.
PETROFAINT 23 At least one candidate Petrosian radius occurred at an unacceptably low surface brightness.
TOO_LARGE 24 The object is (as it says) too large. Either the object is still detectable at the outermost point of the extracted radial profile (a radius of approximately 260 arcsec), or when attempting to deblend an object, at least one child is larger than half a frame (in either row or column).
DEBLENDED_AS_PSF 25 When deblending an object, in this band this child was treated as a PSF.
DEBLEND_PRUNED 26 When solving for the weights to be assigned to each child the deblender encountered a nearly singular matrix, and therefore deleted at least one of them.
ELLIPFAINT 27 No isophotal fits were performed.
BINNED1 28 The object was detected in an unbinned image.
BINNED2 29 The object was detected in a 2x2 binned image after all unbinned detections have been replaced by the background level.
BINNED4 30 The object was detected in a 4x4 binned image. The objects detected in the 2x2 binned image are not removed before doing this.
MOVED 31 The object appears to have moved during the exposure. Such objects are candidates to be deblended as moving objects.
In the flat-files, the photo flags are split into two 32-bit variables (objc_flags1 and objc_flags2). In the CAS, these are combined into a single variable flags. The flags listed here are associated with objc_flags2, and the second 32-bits of flags. Note there are also flags on a per-band basis. The names of these flags in the CAS are appended with the band, e.g., flags_r. In the flat files an array of length 5 is used flags2[5] ordered u,g,r,i,z.

Bit name Binary digit Description
DEBLENDED_AS_MOVING 0 The object has the MOVED flag set, and was deblended on the assumption that it was moving.
NODEBLEND_MOVING 1 The object has the MOVED flag set, but was not deblended as a moving object.
TOO_FEW_DETECTIONS 2 The object has the MOVED flag set, but has too few detection to be deblended as moving.
BAD_MOVING_FIT 3 The fit to the object as a moving object is too bad to be believed.
STATIONARY 4 A moving objects velocity is consistent with zero
PEAKS_TOO_CLOSE 5 Peaks in object were too close (set only in parent objects).
BINNED_CENTER 6 When centroiding the object the object's size is larger than the (PSF) filter used to smooth the image.
LOCAL_EDGE 7 The object's center in some band was too close to the edge of the frame to extract a profile.
BAD_COUNTS_ERROR 8 An object containing interpolated pixels had too few good pixels to form a reliable estimate of its error
BAD_MOVING_FIT_CHILD 9 A putative moving child's velocity fit was too poor, so it was discarded, and the parent was not deblended as moving
DEBLEND_UNASSIGNED_FLUX 10 After deblending, the fraction of flux assigned to none of the children was too large (this flux is then shared out as described elsewhere).
SATUR_CENTER 11 An object's center is very close to at least one saturated pixel; the object may well be causing the saturation.
INTERP_CENTER 12 An object's center is very close to at least one interpolated pixel.
DEBLENDED_AT_EDGE 13 An object so close to the edge of the frame that it would not ordinarily be deblended has been deblended anyway. Only set for objects large enough to be EDGE in all fields/strips.
DEBLEND_NOPEAK 14 A child had no detected peak in a given band, but we centroided it anyway and set the BINNED1
PSF_FLUX_INTERP 15 The fraction of light actually detected (as opposed to guessed at by the interpolator) was less than some number (currently 80%) of the total.
TOO_FEW_GOOD_DETECTIONS 16 A child of this object had too few good detections to be deblended as moving.
CENTER_OFF_AIMAGE 17 At least one peak's center lay off the atlas image in some band. This can happen when the object's being deblended as moving, or if the astrometry is badly confused.
DEBLEND_DEGENERATE 18 At least one potential child has been pruned because its template was too similar to some other child's template.
BRIGHTEST_GALAXY_CHILD 19 This is the brightest child galaxy in a blend.
CANONICAL_BAND 20 This band was the canonical band. This is the band used to measure the Petrosian radius used to calculate the Petrosian counts in each band, and to define the model used to calculate model colors; it has no effect upon the coordinate system used for the OBJC center.
AMOMENT_UNWEIGHTED 21 'Adaptive' moments are actually unweighted.
AMOMENT_SHIFT 22 Object's center moved too far while determining adaptive moments. In this case, the M_e1 and M_e2 give the (row, column) shift, not the object's shape.
AMOMENT_MAXITER 23 Too many iterations while determining adaptive moments.
MAYBE_CR 24 This object may be a cosmic ray. This bit can get set in the cores of bright stars, and is quite likely to be set for the cores of saturated stars.
MAYBE_EGHOST 25 Object appears in the right place to be an electronics ghost.
NOTCHECKED_CENTER 26 Center of object lies in a NOTCHECKED region. The object is almost certainly bogus.
HAS_SATUR_DN 27 This object is saturated in this band and the bleed trail doesn't touch the edge of the frame, we we've made an attempt to add up all the flux in the bleed trails, and to include it in the object's photometry.
DEBLEND_PEEPHOLE 28 The deblend was modified by the optimizer
SPARE3 29
SPARE2 30
SPARE1 31
In the flat-files, the photo flags are split into two 32-bit variables (objc_flags1 and objc_flags2). In the CAS, these are combined into a single variable flags. The flags listed here are associated with objc_flags2, and the second 32-bits of flags. Note there are also flags on a per-band basis. The names of these flags in the CAS are appended with the band, e.g., flags_r. In the flat files an array of length 5 is used flags2[5] ordered u,g,r,i,z.

Bit name Binary digit Description
DEBLENDED_AS_MOVING 0 The object has the MOVED flag set, and was deblended on the assumption that it was moving.
NODEBLEND_MOVING 1 The object has the MOVED flag set, but was not deblended as a moving object.
TOO_FEW_DETECTIONS 2 The object has the MOVED flag set, but has too few detection to be deblended as moving.
BAD_MOVING_FIT 3 The fit to the object as a moving object is too bad to be believed.
STATIONARY 4 A moving objects velocity is consistent with zero
PEAKS_TOO_CLOSE 5 Peaks in object were too close (set only in parent objects).
BINNED_CENTER 6 When centroiding the object the object's size is larger than the (PSF) filter used to smooth the image.
LOCAL_EDGE 7 The object's center in some band was too close to the edge of the frame to extract a profile.
BAD_COUNTS_ERROR 8 An object containing interpolated pixels had too few good pixels to form a reliable estimate of its error
BAD_MOVING_FIT_CHILD 9 A putative moving child's velocity fit was too poor, so it was discarded, and the parent was not deblended as moving
DEBLEND_UNASSIGNED_FLUX 10 After deblending, the fraction of flux assigned to none of the children was too large (this flux is then shared out as described elsewhere).
SATUR_CENTER 11 An object's center is very close to at least one saturated pixel; the object may well be causing the saturation.
INTERP_CENTER 12 An object's center is very close to at least one interpolated pixel.
DEBLENDED_AT_EDGE 13 An object so close to the edge of the frame that it would not ordinarily be deblended has been deblended anyway. Only set for objects large enough to be EDGE in all fields/strips.
DEBLEND_NOPEAK 14 A child had no detected peak in a given band, but we centroided it anyway and set the BINNED1
PSF_FLUX_INTERP 15 The fraction of light actually detected (as opposed to guessed at by the interpolator) was less than some number (currently 80%) of the total.
TOO_FEW_GOOD_DETECTIONS 16 A child of this object had too few good detections to be deblended as moving.
CENTER_OFF_AIMAGE 17 At least one peak's center lay off the atlas image in some band. This can happen when the object's being deblended as moving, or if the astrometry is badly confused.
DEBLEND_DEGENERATE 18 At least one potential child has been pruned because its template was too similar to some other child's template.
BRIGHTEST_GALAXY_CHILD 19 This is the brightest child galaxy in a blend.
CANONICAL_BAND 20 This band was the canonical band. This is the band used to measure the Petrosian radius used to calculate the Petrosian counts in each band, and to define the model used to calculate model colors; it has no effect upon the coordinate system used for the OBJC center.
AMOMENT_UNWEIGHTED 21 'Adaptive' moments are actually unweighted.
AMOMENT_SHIFT 22 Object's center moved too far while determining adaptive moments. In this case, the M_e1 and M_e2 give the (row, column) shift, not the object's shape.
AMOMENT_MAXITER 23 Too many iterations while determining adaptive moments.
MAYBE_CR 24 This object may be a cosmic ray. This bit can get set in the cores of bright stars, and is quite likely to be set for the cores of saturated stars.
MAYBE_EGHOST 25 Object appears in the right place to be an electronics ghost.
NOTCHECKED_CENTER 26 Center of object lies in a NOTCHECKED region. The object is almost certainly bogus.
HAS_SATUR_DN 27 This object is saturated in this band and the bleed trail doesn't touch the edge of the frame, we we've made an attempt to add up all the flux in the bleed trails, and to include it in the object's photometry.
DEBLEND_PEEPHOLE 28 The deblend was modified by the optimizer
SPARE3 29
SPARE2 30
SPARE1 31
Resolve status for an SDSS catalog entry. Only one of bits RUN_PRIMARY, RUN_RAMP, RUN_OVERLAPONLY, RUN_IGNORE, and RUN_DUPLICATE can be set. RUN_EDGE can be set for any object. To get a unique set of objects across the whole survey, search for objects with SURVEY_PRIMARY set. To get a unique set of objects within a run, search for objects with RUN_PRIMARY set.

Bit Name Binary Digit Description
RUN_PRIMARY 0 primary within the objects own run (but not necessarily for the survey as a whole)
RUN_RAMP 1 in what would be the overlap area of a field, but with no neighboring field
RUN_OVERLAPONLY 2 only appears in the overlap between two fields
RUN_IGNORE 3 bright or parent object that should be ignored
RUN_EDGE 4 near lowest or highest column
RUN_DUPLICATE 5 duplicate measurement of same pixels in two different fields
SURVEY_PRIMARY 8 Primary observation within the full survey, where it appears in the primary observation of this part of the sky
SURVEY_BEST 9 Best observation within the full survey, but it does not appear in the primary observation of this part of the sky
SURVEY_SECONDARY 10 Repeat (independent) observation of an object that has a different primary or best observation
SURVEY_BADFIELD 11 In field with score=0
SURVEY_EDGE 12 Not kept as secondary because it is RUN_RAMP or RUN_EDGE object
In the flat files there are arrays of length five for each band calib_status[5] ordered u,g,r,i,z. In the CAS these are named by band pass calibstatus_{band}.

Bit Name Binary Digit Description
PHOTOMETRIC 0 Photometric observations
UNPHOT_OVERLAP 1 Unphotometric observations, calibrated based on overlaps with clear, ubercalibrated data; done on a field-by-field basis. Use with caution.
UNPHOT_EXTRAP_CLEAR 2 Extrapolate the solution from the clear part of a night (that was ubercalibrated) to the cloudy part. Not recommended for use.
UNPHOT_EXTRAP_CLOUDY 3 Extrapolate the solution from a cloudy part of the night (where there is overlap) to a region of no overlap. Not recommended for use.
UNPHOT_DISJOINT 4 Data is disjoint from the rest of the survey (even though conditions may be photometric), the calibration is suspect. Not recommended for use.
INCREMENT_CALIB 5 Incrementally calibrated by considering overlaps with ubercalibrated data
PS1_UNPHOT 6 PS1 comparison reveals unphotometric conditions
PS1_CONTRAIL 7 PS1 comparison shows slightly unphotometric conditions
PT_CLEAR 8 (INTERNAL USE ONLY in DR8 and later) PT calibration for clear data
PT_CLOUDY 9 (INTERNAL USE ONLY in DR8 and later) PT calibration for cloudy data
DEFAULT 10 (INTERNAL USE ONLY in DR8 and later) a default calibration used
NO_UBERCAL 11 (INTERNAL USE ONLY in DR8 and later) not uber-calibrated
PS1_PCOMP_MODEL 13 PS1 Used PCA model for flats
PS1_LOW_RMS 14 PS1 comparison to SDSS has low noise
Bit Name Binary Digit Description
CLEAR 0 Clear skies
CLOUDY 1 Cloudy skies (unphotometric)
UNKNOWN 2 Sky conditions unknown (unphotometric)
BAD_ROTATOR 3 Rotator problems (set score=0)
BAD_ASTROM 4 Astrometry problems (set score=0)
BAD_FOCUS 5 Focus bad (set score=0)
SHUTTERS 6 Shutter out of place (set score=0)
FF_PETALS 7 Flat-field petals out of place (unphotometric)
DEAD_CCD 8 CCD bad (unphotometric)
NOISY_CCD 9 CCD noisy (unphotometric)
Bit Name Binary Digit Description
QSO_HIZ 0 High-redshift (griz) QSO target
QSO_CAP 1 ugri-selected quasar at high Galactic latitude
QSO_SKIRT 2 ugri-selected quasar at low Galactic latitude
QSO_FIRST_CAP 3 FIRST source with stellar colors at high Galactic latitude
QSO_FIRST_SKIRT 4 FIRST source with stellar colors at low Galactic latitude
GALAXY_RED 5 Luminous Red Galaxy target (any criteria)
GALAXY 6 Main sample galaxy
GALAXY_BIG 7 Low-surface brightness main sample galaxy (mu50 > 23 in r-band)
GALAXY_BRIGHT_CORE 8 Galaxy targets who fail all the surface brightness selection limits but have r-band fiber magnitudes brighter than 19
ROSAT_A 9 ROSAT All-Sky Survey match, also a radio source
ROSAT_B 10 ROSAT All-Sky Survey match, have SDSS colors of AGNs or quasars
ROSAT_C 11 ROSAT All-Sky Survey match, fall in a broad intermediate category that includes stars that are bright, moderately blue, or both
ROSAT_D 12 ROSAT All-Sky Survey match, are otherwise bright enough for SDSS spectroscopy
STAR_BHB 13 blue horizontal-branch stars
STAR_CARBON 14 dwarf and giant carbon stars
STAR_BROWN_DWARF 15 brown dwarfs (note this sample is tiled)
STAR_SUB_DWARF 16 low-luminosity subdwarfs
STAR_CATY_VAR 17 cataclysmic variables
STAR_RED_DWARF 18 red dwarfs
STAR_WHITE_DWARF 19 hot white dwarfs
SERENDIP_BLUE 20 lying outside the stellar locus in color space
SERENDIP_FIRST 21 coincident with FIRST sources but fainter than the equivalent in quasar target selection (also includes non-PSF sources)
SERENDIP_RED 22 lying outside the stellar locus in color space
SERENDIP_DISTANT 23 lying outside the stellar locus in color space
SERENDIP_MANUAL 24 manual serendipity flag
QSO_MAG_OUTLIER 25 Stellar outlier; too faint or too bright to be targeted
GALAXY_RED_II 26 Luminous Red Galaxy target (Cut II criteria)
ROSAT_E 27 ROSAT All-Sky Survey match, but too faint or too bright for SDSS spectroscopy
STAR_PN 28 central stars of planetary nebulae
QSO_REJECT 29 Object in explicitly excluded region of color space, therefore not targeted at QSO
SOUTHERN_SURVEY 31 Set in primtarget if this is a special program target
These bitmask values are appropriate for the following bitmasks used for SDSS-I and -II: LEGACY_TARGET2, SPECIAL_TARGET2 or SECTARGET.

Bit Name Binary Digit Description
LIGHT_TRAP 0 hole drilled for bright star, to avoid scattered light
REDDEN_STD 1 reddening standard star
TEST_TARGET 2 a test target
QA 3 quality assurance target
SKY 4 sky target
SPECTROPHOTO_STD 5 spectrophotometry standard (typically an F-star)
GUIDE_STAR 6 guide star hole
BUNDLE_HOLE 7 fiber bundle hole
QUALITY_HOLE 8 hole drilled for plate shop quality measurements
HOT_STD 9 hot standard star
SOUTHERN_SURVEY 31 a segue or southern survey target
Bit Name Binary Digit Description
SEGUE1_FG 9 F and G stars, based on g-r color (0.2 < g-r < 0.48 and 14 < g < 20.2)
SEG1LOW_KG 10 low latitude selection of K-giant stars
SEG1LOW_TO 11 low latitude selection of bluetip stars
SEGUE1_MSWD 12 main-sequence, white dwarf pair
SEGUE1_BHB 13 blue horizontal branch star
SEGUE1_KG 14 K-giants (l and red)
SEGUE1_KD 15 K-dwarfs
SEGUE1_LM 16 low metallicity star
SEGUE1_CWD 17 cool white dwarf
SEGUE1_GD 18 G-dwarf
SEGUE1_WD 19 white dwarf
SEGUE1_MPMSTO 20 metal-poor main sequence turn-off
SEGUE1_BD 21 brown dwarfs
SEGUE1_SDM 22 M sub-dwarfs
SEGUE1_AGB 23 asymptotic giant branch stars
SEGUE1_MAN 24 manual selection
SEG1LOW_AGB 27 low latitude selection of AGB stars
SEGUE1_CHECKED 31 was a checked object

More detailed information about the selection criteria for SEGUE-1 is available on the SEGUE Target Selection page.

Bit Name Binary Digit Description
Notes

  1. QA duplicate observations are not currently marked in SEGUE1_TARGET2 bitmasks. These are only marked in sourcetype in SpecObjAll.
  2. These objects are specific science targets, but since reddening and spectrophotometric targets were also used for SEGUE science, it is not quite as useful as it might appear. Use with caution!
  3. These objects have programname 'segtest', but not all 'segtest' plates have this bit set. Use with caution!
REDDEN_STD 1 reddening standard star
SEGUE1_QA 1 3 QA Duplicate Observations (unused)
SKY 4 sky target
SPECTROPHOTO_STD 5 spectrophotometry standard (typically an F-star)
SEGUE1_SCIENCE 2 30 SEGUE-1 science target
SEGUE1_TEST 3 31 SEGUE-1 test target
Bit Name Binary Digit Description
SEGUE2_MSTO 0 Main-sequence turnoff
SEGUE2_REDKG 1 Red K-giant stars
SEGUE2_LKG 2 K-giant star identified by l-color
SEGUE2_PMKG 3 K-giant star identified by proper motions
SEGUE2_LM 4 Low metallicity
SEGUE2_HVS 5 hyper velocity candidate
SEGUE2_XDM 6 extreme sdM star
SEGUE2_MII 7 M giant
SEGUE2_HHV 8 High-velocity halo star candidate
SEGUE2_BHB 13 Blue horizontal branch star
SEGUE2_CWD 17 Cool white dwarf
SEGUE2_CHECKED 31 was a checked object

More detailed information about the selection criteria for SEGUE-2 is available on the SEGUE Target Selection page.

Bit Name Binary Digit Description
LIGHT_TRAP 0 light trap hole
SEGUE2_REDDENING 1 reddening standard
SEGUE2_TEST 2 test target
SEGUE2_QA* 3 repeat target across plates
SKY 4 empty area for sky-subtraction
SEGUE2_SPECPHOTO 5 spectrophotometric star
GUIDE_STAR 6 guide star
BUNDLE_HOLE 7 bundle hole
QUALITY_HOLE 8 quality hole
HOT_STD 9 hot standard
SEGUE2_CLUSTER 10 SEGUE-2 stellar cluster target
SEGUE2_STETSON 11 Stetson standard target
SEGUE2_CHECKED 31 was a checked object

*QA duplicate observations are not currently marked in SEGUE2_TARGET2 bitmasks. These are only marked in sourcetype in SpecObjAll.

Bit Name Binary Digit Description
APBIAS 0 aperture bias target
LOWZ_ANNIS 1 low-redshift cluster galaxy
QSO_M31 2 QSO in M31
COMMISSIONING_STAR 3 star in commissioning
DISKSTAR 4 thin/thick disk star
FSTAR 5 F-stars
HYADES_MSTAR 6 M-star in Hyades
LOWZ_GALAXY 7 low-redshift galaxy
DEEP_GALAXY_RED 8 deep LRG
DEEP_GALAXY_RED_II 9 deep LRG
BCG 10 brightest cluster galaxy
MSTURNOFF 11 main sequence turnoff
ORION_BD 12 Brown dwarf in Orion
ORION_MSTAR_EARLY 13 Early-type M-star (M0-3) in Orion
ORION_MSTAR_LATE 14 Late-type M-star (M4-) in Orion
SPECIAL_FILLER 15 filler from completeTile, check primtarget for details
PHOTOZ_GALAXY 16 test galaxy for photometric redshifts
PREBOSS_QSO 17 QSO for pre-BOSS observations
PREBOSS_LRG 18 QSO for pre-BOSS observations
PREMARVELS 19 pre-MARVELS stellar target
SOUTHERN_EXTENDED 20 simple extension of southern targets
SOUTHERN_COMPLETE 21 completion in south of main targets
U_PRIORITY 22 priority u-band target
U_EXTRA 23 extra u-band target
U_EXTRA2 24 extra u-band target
FAINT_LRG 25 faint LRG in south
FAINT_QSO 26 faint QSO in south
BENT_RADIO 27 bent double-lobed radio source
STRAIGHT_RADIO 28 straight double-lobed radio source
VARIABLE_HIPRI 29 high priority variable
VARIABLE_LOPRI 30 low priority variable
ALLPSF 31 i < 19.1 point sources
ALLPSF_NONSTELLAR 32 i < 19.1 point sources off stellar locus
ALLPSF_STELLAR 33 i < 19.1 point sources on stellar locus
HIPM 34 high proper motion
TAURUS_STAR 35 star on Taurus or reddening plate
TAURUS_GALAXY 36 galaxy on Taurus or reddening plate
PERSEUS 37 galaxy in Perseus-Pisces
LOWZ_LOVEDAY 38 low redshift galaxy selected by Loveday
These bitmask values are appropriate for the following bitmasks used for SDSS-I and -II: LEGACY_TARGET2, SPECIAL_TARGET2 or SECTARGET.

Bit Name Binary Digit Description
LIGHT_TRAP 0 hole drilled for bright star, to avoid scattered light
REDDEN_STD 1 reddening standard star
TEST_TARGET 2 a test target
QA 3 quality assurance target
SKY 4 sky target
SPECTROPHOTO_STD 5 spectrophotometry standard (typically an F-star)
GUIDE_STAR 6 guide star hole
BUNDLE_HOLE 7 fiber bundle hole
QUALITY_HOLE 8 hole drilled for plate shop quality measurements
HOT_STD 9 hot standard star
SOUTHERN_SURVEY 31 a segue or southern survey target
Bit Name Binary Digit Description
GAL_LOZ 0 low-z lrgs
GAL_CMASS 1 dperp > 0.55, color-mag cut
GAL_CMASS_COMM 2 dperp > 0.55, commissioning color-mag cut
GAL_CMASS_SPARSE 3 GAL_CMASS_COMM & (!GAL_CMASS) & (i < 19.9) sparsely sampled
GAL_LODPERP_DEPRECATED 5 (DEPRECATED) Same as hiz but between dperp00 and dperp0
SDSS_KNOWN 6 Matches a known SDSS spectra
GAL_CMASS_ALL 7 GAL_CMASS and the entire sparsely sampled region
GAL_IFIBER2_FAINT 8 ifiber2 > 21.5, extinction corrected. Used after Nov 2010
QSO_CORE 10 restrictive qso selection: commissioning only
QSO_BONUS 11 permissive qso selection: commissioning only
QSO_KNOWN_MIDZ 12 known qso between [2.2,9.99]
QSO_KNOWN_LOHIZ 13 known qso outside of miz range. never target
QSO_NN 14 Neural Net that match to sweeps/pass cuts
QSO_UKIDSS 15 UKIDSS stars that match sweeps/pass flag cuts
QSO_KDE_COADD 16 kde targets from the stripe82 coadd
QSO_LIKE 17 likelihood method
QSO_FIRST_BOSS 18 FIRST radio match
QSO_KDE 19 selected by kde+chi2
STD_FSTAR 20 standard f-stars
STD_WD 21 white dwarfs
STD_QSO 22 qso
TEMPLATE_GAL_PHOTO 32 galaxy templates
TEMPLATE_QSO_SDSS1 33 QSO templates
TEMPLATE_STAR_PHOTO 34 stellar templates
TEMPLATE_STAR_SPECTRO 35 stellar templates (spectroscopically known)
QSO_CORE_MAIN 40 Main survey core sample
QSO_BONUS_MAIN 41 Main survey bonus sample
QSO_CORE_ED 42 Extreme Deconvolution in Core
QSO_CORE_LIKE 43 Likelihood that make it into core
QSO_KNOWN_SUPPZ 44 known qso between [1.8,2.15]
Bit Name Binary Digit Description
DO_NOT_OBSERVE 0 Don't put a fiber on this object
LRG_IZW 1 LRG selection in i/z/W plane
LRG_RIW 2 LRG selection in r/i/W plan with (i-z) cut
QSO_EBOSS_CORE 10 QSOs in XDQSOz+WISE selection for clustering
QSO_PTF 11 QSOs with variability in PTF imaging
QSO_REOBS 12 QSOs from BOSS to be reobserved
QSO_EBOSS_KDE 13 KDE-selected QSOs (sequels only)
QSO_EBOSS_FIRST 14 Objects with FIRST radio matches
QSO_BAD_BOSS 15 QSOs from BOSS with bad spectra
QSO_BOSS_TARGET 16 Known TARGETS from BOSS with spectra
QSO_SDSS_TARGET 17 Known TARGETS from SDSS with spectra
QSO_KNOWN 18 Known QSOs from previous surveys
DR9_CALIB_TARGET 19 Target found in DR9-calibrated imaging
SPIDERS_RASS_AGN 20 RASS AGN sources
SPIDERS_RASS_CLUS 21 RASS Cluster sources
SPIDERS_ERASS_AGN 22 ERASS AGN sources
SPIDERS_ERASS_CLUS 23 ERASS Cluster sources
TDSS_A 30 Main PanSTARRS selection for TDSS
TDSS_FES_DE 31 TDSS Few epoch spectroscopy
TDSS_FES_DWARFC 32 TDSS Few epoch spectroscopy
TDSS_FES_NQHISN 33 TDSS Few epoch spectroscopy
TDSS_FES_MGII 34 TDSS Few epoch spectroscopy
TDSS_FES_VARBAL 35 TDSS Few epoch spectroscopy
SEQUELS_PTF_VARIABLE 40 Variability objects from PTF
SEQUELS_COLLIDED 41 Collided galaxies from BOSS
Bit Name Binary Digit Description
DO_NOT_OBSERVE 0 Don't put a fiber on this object
LRG1_WISE 1 LRG selection in i/z/W plane
LRG1_IDROP 2 LRG selection in r/i/W plan with (i-z) cut
LRG_KNOWN 3 LRG selection in r/i/W plan with (i-z) cut
QSO1_VAR_S82 9 Variability-selected QSOs in the repeated Stripe 82 imaging
QSO1_EBOSS_CORE 10 QSOs in XDQSOz+WISE selection for clustering
QSO1_PTF 11 QSOs with variability in PTF imaging
QSO1_REOBS 12 QSOs from BOSS to be reobserved
QSO1_EBOSS_KDE 13 KDE-selected QSOs (sequels only)
QSO1_EBOSS_FIRST 14 Ojbects with FIRST radio matches
QSO1_BAD_BOSS 15 QSOs from BOSS with bad spectra
QSO_BOSS_TARGET 16 Known TARGETS from BOSS with spectra
QSO_SDSS_TARGET 17 Known TARGETS from SDSS with spectra
QSO_KNOWN 18 Known QSOs from previous surveys
TDSS_TARGET 30 Target for TDSS (subclass found in eboss_target2)
SPIDERS_TARGET 31 Target for SPIDERS (subclass found in eboss_target2)
S82X_TILE1 32
S82X_TILE2 33
S82X_TILE3 34
ELG_TEST1 40 Test targets for ELG selection
ELG1_EBOSS 41 Standard DECALS ELG target selection
ELG1_EXTENDED 42 Extended DECALS ELG target selection
ELG1_SGC 43 Final ELG selection, SGC data
ELG1_NGC 44 Final ELG selection, NGC data
STD_FSTAR 50 standard f-stars
STD_WD 51 white dwarfs
STD_QSO 52 qso
Bit Name Binary Digit Description
SPIDERS_RASS_AGN 0 RASS AGN sources
SPIDERS_RASS_CLUS 1 RASS Cluster sources
SPIDERS_ERASS_AGN 2 ERASS AGN sources
SPIDERS_ERASS_CLUS 3 ERASS Cluster sources
SPIDERS_XMMSL_AGN 4 XMM Slew survey
SPIDERS_XCLASS_CLUS 5 XMM serendipitous clusters
TDSS_A 20 Main PanSTARRS selection for TDSS
TDSS_FES_DE 21 QSOs with disk emitter broad line profiles
TDSS_FES_DWARFC 22 dwarf carbon stars
TDSS_FES_NQHISN 23 QSOs with previous spectra of S/N>25
TDSS_FES_MGII 24 binary AGN candidate
TDSS_FES_VARBAL 25 broad absorption line QSOs
TDSS_B 26 Main TDSS SES version B
TDSS_FES_HYPQSO 27 strongly variable QSOs
TDSS_FES_HYPSTAR 28 strongly variable star
TDSS_FES_WDDM 29 white dwarf/M dwarf pairs with Halpha emission
TDSS_FES_ACTSTAR 30 late-M and L stars with Halpha emission
TDSS_CP 31 TDSS in common with CORE/PTF
TDSS_S82X_FES_HYPQSO 32
TDSS_S82X_SESQSO 33
TDSS_RQS1 34 quasars targeted at high priority
TDSS_RQS2 35 quasars targeted at medium priority
TDSS_RQS3 36 quasars targeted at lower priority
TDSS_RQS2v 37 variability selected quasars targeted at medium priority
TDSS_RQS3v 38 variability selected quasars targeted at lower priority
ELG_SCUSS_TEST1 40 SCUSS selection for test1 ELG plates
ELG_DES_TEST1 41 DES selection for test1 ELG plates
ELG_DESI_TEST1 42 DESI selection for test1 ELG plates
ELG_SDSS_TEST1 43 SDSS-only selection for test1 ELG plates
ELG_UGRIZW_TEST1 44 WISE selection for test1 ELG plates
ELG_UGRIZWbright_TEST1 45 WISE selection for test1 ELG plates
ELG_GRIW_TEST1 46 WISE selection for test1 ELG plates
ELG_DECALS_TEST1 47 DECALS ELG selection, added sept 2015
ELG1_SGC 48 repeated bit from eboss_target1 for tiling purposes
ELG1_NGC 49 repeated bit from eboss_target1 for tiling purposes
S82X_BRIGHT_TARGET 50
S82X_XMM_TARGET 51
S82X_WISE_TARGET 52
S82X_SACLAY_VAR_TARGET 53
S82X_SACLAY_BDT_TARGET 54
S82X_SACLAY_HIZ_TARGET 55
S82X_RICHARDS15_PHOTOQSO_TARGET 56
S82X_PETERS15_COLORVAR_TARGET 57
S82X_LSSTZ4_TARGET 58
S82X_UNWISE_TARGET 59
S82X_GTRADMZ4_TARGET 60
S82X_CLAGN1_TARGET 61
S82X_CLAGN2_TARGET 62
The presence of a nonzero value for this target flag indicates that the object was selected through one or more of the BOSS ancillary target selection programs.
If you don't see the ancillary target bit you're looking for here, try the other ancillary target flag parameter, ANCILLARY_TARGET2.

Bit Name Binary Digit Description
AMC 0 Candidate Am CVn variables in Stripe 82
FLARE1 1 Flaring M stars in Stripe 82 (year 1 targets)
FLARE2 2 Flaring M stars in Stripe 82 (year 2 targets)
HPM 3 High Proper Motion stars in Stripe 82
LOW_MET 4 Low-metallicity M dwarfs in Stripe 82
VARS 5 Unusual variable objects (colors outside the stellar and quasar loci) in Stripe 82
BLAZGVAR 6 A flag used in a pilot version of the ancillary targeting program High-Energy Blazars and Optical Counterparts to Gamma-Ray Sources; no longer used
BLAZR 7 A flag used in a pilot version of the ancillary targeting program High-Energy Blazars and Optical Counterparts to Gamma-Ray Sources; no longer used
BLAZXR 8 A target that might have a match with a Fermi source, but which is now below the detection limits of the early Fermi source catalogs
BLAZXRSAM 9 A flag used in a pilot version of the ancillary targeting program High-Energy Blazars and Optical Counterparts to Gamma-Ray Sources; no longer used
BLAZXRVAR 10 A flag used in a pilot version of the ancillary targeting program High-Energy Blazars and Optical Counterparts to Gamma-Ray Sources; no longer used
XMMBRIGHT 11 An object that matches a serendipitous x-ray source from the Second XMM-Newton Serendipitous Source Catalog (2XMMi), with bright i magnitudes (i < 20.5) and bright 2-12 keV fluxes (f2-12 keV > 5 × 10-14 erg*cm-2*s-1)
XMMGRIZ 12 An object that matches a serendipitous x-ray source from the Second XMM-Newton Serendipitous Source Catalog (2XMMi), with outlier SDSS colors (g - r > 1.2 or r - i > 1.0 or i - z > 1.4)
XMMHR 13 An object that matches a serendipitous x-ray source from the Second XMM-Newton Serendipitous Source Catalog (2XMMi), with unusual hardness ratios in the HR2-HR3 plane
XMMRED 14 An object that matches a serendipitous x-ray source from the Second XMM-Newton
Serendipitous Source Catalog (2XMMi)
with highly red SDSS colors (g - i > 1.0)
FBQSBAL 15 Broad absorption line (BAL) quasar with spectrum from the FIRST Bright Quasar Survey
LBQSBAL 16 Broad absorption line (BAL) quasar with spectrum from the Large Bright Quasar Survey
ODDBAL 17 Broad absorption line (BAL) quasar with various unusual properties (selected by hand)
OTBAL 18 Photometrically-selected overlapping-trough (OT) broad absorption line (BAL) quasar
PREVBAL 19 Broad absorption line (BAL) quasar with prior spectrum from SDSS-I/-II
VARBAL 20 Photometrically-selected candidate broad absorption line (BAL) quasar
BRIGHTGAL 21 Bright (r < 16) galaxies whose spectra were missed by the original SDSS spectroscopic survey
QSO_AAL 22 Radio-quiet variable quasar candidates with one absorption system associated with the quasar (v ≤ 5000 km/s in the quasar rest frame)
QSO_AALS 23 Radio-quiet variable quasar candidates with multiple absorption systems (associated and/or intervening)
QSO_IAL 24 Radio-quiet variable quasar candidates with one absorption system in the intervening space along our line-of-sight (v > 5000 km/s in the quasar rest frame)
QSO_RADIO 25 Radio-loud variable quasar candidates with multiple absorption systems (associated and/or intervening)
QSO_RADIO_AAL 26 Radio-loud variable quasar candidates with one absorption system associated with the quasar (v ≤ 5000 km/s in the quasar rest frame)
QSO_RADIO_IAL 27 Radio-loud variable quasar candidates with one absorption system in the intervening space along our line-of-sight (v > 5000 km/s in the quasar rest frame)
QSO_NOAALS 28 Radio-quiet variable quasar candidates with no associated absorption systems and multiple intervening absorption systems
QSO_GRI 29 Candidate high-redshift quasar (z > 3.6), selected in gri color space
QSO_HIZ 30 Candidate high-redshift quasar (z > 5.6), detected only in SDSS i and z filters.
QSO_RIZ 31 Candidate high-redshift quasar (z > 4.5), selected in riz color space
RQSS_SF 32 Candidate reddened quasar ( E(B-V)) > 0.5 ), selected from an SDSS primary catalog object matched with FIRST catalog data
RQSS_SFC 33 Candidate reddened quasar ( E(B-V)) > 0.5 ), selected from an SDSS child catalog object matched with FIRST catalog data
RQSS_STM 34 Candidate reddened quasar ( E(B-V)) > 0.5 ), selected from an SDSS primary catalog object matched with 2MASS catalog data
RQSS_STMC 35 Candidate reddened quasar ( E(B-V)) > 0.5 ), selected from an SDSS child catalog object matched with 2MASS catalog data
SN_GAL1 36 Likely host galaxy for an SDSS-II supernova, with the BOSS fiber assigned to the galaxy closest to the supernova's position
SN_GAL2 37 Likely host galaxy for an SDSS-II supernova, with the
BOSS fiber assigned to the second-closest galaxy
SN_GAL3 38 Likely host galaxy for an SDSS-II supernova, with the BOSS fiber assigned to the third-closest galaxy
SN_LOC 39 Likely host galaxy for an SDSS-II supernova, with the BOSS fiber assigned to the position of the original supernova
SPEC_SN 40 Likely host galaxy for an SDSS-II supernova, where the original supernova was identified from SDSS spectroscopic data
SPOKE 41 Widely-separated binary systems in which both stars are low-mass (spectral class M)
WHITEDWARF_NEW 42 White dwarf candidate whose spectrum had not been observed previously by the SDSS
WHITEDWARF_SDSS 43 White dwarf candidate with a pre-existing SDSS spectrum
BRIGHTERL 44 Bright L dwarf candidate (iPSF < 19.5, iPSF - zPSF) > 1.14)
BRIGHTERM 45 Bright M dwarf candidate (iPSF < 19.5, iPSF - zPSF) < 1.14)
FAINTERL 46 Faint L dwarf candidate (iPSF > 19.5, iPSF - zPSF) > 1.14)
FAINTERM 47 Faint M dwarf candidate (iPSF > 19.5, iPSF - zPSF) < 1.14)
RED_KG 48 Giant star in the Milky Way outer halo
RVTEST 49 Known giant star selected as a test of radial velocity measurement techniques
BLAZGRFLAT 50 Candidate optical counterpart to a Fermi gamma-ray source, within 2" of a CRATES radio
source and within a Fermi error ellipse
BLAZGRQSO 51 Candidate optical counterpart to a Fermi gamma-ray source, within 2" of a FIRST radio source and within a Fermi error ellipse
BLAZGX 52 Candidate optical counterpart to a Fermi gamma-ray source, within 1' of a ROSAT All-Sky Survey x-ray source and within a Fermi error ellipse, and without typical signs of blazar activity
BLAZGXQSO 53 Candidate optical counterpart to a Fermi gamma-ray source, within 1' of a ROSAT All-Sky Survey x-ray source and within a Fermi error ellipse
BLAZGXR 54 Candidate optical counterpart to a Fermi gamma-ray source, with
matches in both radio and x-ray wavelengths: within 1' of a ROSAT All-Sky
Survey
x-ray source, within 2" of a FIRST radio source, and within a Fermi error ellipse
BLUE_RADIO 56 Likely star-forming AGN: blue galaxies that match with FIRST radio sources
CHANDRAV1 57 An object with a Chandra match that is likely to be a star-forming galaxy with black hole accretion
CXOBRIGHT 58 An object that matches a serendipitous x-ray source from the Chandra Source Catalog, with bright i magnitudes (i < 20.0) and bright 2-8 keV fluxes (f2-8 keV > 5 x 10-14 erg*cm-2*s-1)
CXOGRIZ 59 An object that matches a serendipitous x-ray source from the Chandra Source Catalog, with outlier SDSS colors (g - r > 1.2 or r - i > 1.0 or i - z > 1.4)
CXORED 60 An object that matches a serendipitous x-ray source from the Chandra Source Catalog, with highly red SDSS colors (g - i > 1.0)
ELG 61 Luminous blue galaxy with gPSF < 22.5
GAL_NEAR_QSO 62 A galaxy that lies between 0.006' and 1' of the line-of-sight for a spectroscopically-confirmed quasar
MTEMP 63 Template M-stars observed as a comparison sample in Stripe 82
The presence of a nonzero value for this target flag indicates that the object was selected through one or more of the BOSS ancillary target selection programs.
If you don't see the ancillary target bit you're looking for here, try the other ancillary target flag parameter, ANCILLARY_TARGET1.

Bit Name Binary Digit Description
HIZQSO82 0 Quasar candidate in SDSS stripe 82 selected with UKIDSS YJHK photometry using a more relaxed color cut
HIZQSOIR 1 Quasar candidate selected with UKIDSS YJHK photometry
KQSO_BOSS 2 Quasar candidate selected with UKIDSS YJHK photometry
QSO_VAR 3 Candidate quasar in Stripe 82 survey area, selected from variability alone
QSO_VAR_FPG 4 Candidate quasar in Stripe 82 survey area, selected from variability alone
RADIO_2LOBE_QSO 5 Object near the midpoint of a double-lobed object identified in FIRST Catalogs
STRIPE82BCG 6 The brightest cluster member of a galaxy cluster or group identified in the Stripe 82 survey area
QSO_SUPPZ 7 A subset of SDSS-I/-II quasars with 1.8 < z < 2.15 that were reobserved with the BOSS spectrograph to measure metal absorption free of any effects from the Lyman-α forest (no longer used in DR12)
QSO_VAR_SDSS 8 Quasars selected by photometric variability in the overlap regions between stripes of SDSS-I/-II imaging, accounting for roughly 30% of the total BOSS footprint (no longer used in DR12)
QSO_WISE_SUPP 9 Quasar targets selected on their mid-infrared colors from the WISE satellite, thought to be z>2.2 quasars, as a supplement to the primary BOSS quasar sample (no longer used in DR12)
QSO_WISE_FULL_SKY 10 Quasar selected from the WISE All-Sky Survey
XMMSDSS 11 Hard x-ray-selected AGN from XMM
IAMASERS 12 Known or potential maser
DISKEMITTER_REPEAT 13 Candidate massive binary black hole pair
WISE_BOSS_QSO 14 Quasar identified in the WISE All-Sky Survey
QSO_XD_KDE_PAIR 15 Candidate closely-separated quasar pair
CLUSTER_MEMBER 16 Member of a galaxy cluster selected from ROSAT All-Sky Survey data
SPOKE2 17 Candidate binary pair in which one star is an M dwarf
FAINT_ELG 18 Blue star-forming galaxy selected from CFHT-LS photometry
PTF_GAL 19 A nearby galaxy identified in PTF imaging with an SDSS counterpart
QSO_STD 20 A standard star targeted to improve BOSS spectrophotometric calibration
HIZ_LRG 21 A candidate z > 0.6 LRG, selected using a narrower r-i color constraint and observed at higher priority
LRG_ROUND3 22 A candidate z > 0.6 LRG, selected using a broader r-i color constraint and observed at lower priority
WISE_COMPLETE 23 Galaxy in the same redshift range as the BOSS CMASS sample, but selected with a more relaxed color cut
TDSS_PILOT 24 Objects identified from PanSTARRS imaging using the selection criteria described on the BOSS ancillary target page
SPIDERS_PILOT 25 Objects identified from PanSTARRS imaging using the selection criteria described on the BOSS ancillary target page
TDSS_SPIDERS_PILOT 26 Objects identified using both sets of selection criteria for TDSS_PILOT and SPIDERS_PILOT
QSO_VAR_LF 27 Candidate quasar in stripe 82, selected by color and variability
TDSS_PILOT_PM 28 Objects identified using X-ray imaging that has high proper motions
TDSS_PILOT_SNHOST 29 Objects identified in PanSTARRS imaging that showed transient behavior in extended objects
FAINT_HIZ_LRG 30 Candidate galaxy in the redshift range 0.6 < z < 0.9, defined by color cuts
QSO_EBOSS_W3_ADM 31 Candidate quasar, defined by one of the complex color cuts described below and recorded in the W3bitmask parameter of the original targeting file
XMM_PRIME 32 Candidate AGN identified from the XMM-XXL survey observed at higher priority
XMM_SECOND 33 Candidate AGN identified from the XMM-XXL survey observed at lower priority
SEQUELS_ELG 34 Emission-line galaxy targeted by the SEQUELS program
GES 35 Star observed by the Gaia/ESO Survey (GES)
SEGUE1 36 Star observed by the prior SDSS spectroscopic SEGUE-1 survey
SEGUE2 37 Star observed by SEGUE-2
SDSSFILLER 38 Star in the GES survey area, targeted from prior SDSS photometry
SEQUELS_ELG_LOWP 39 Emission-line galaxy targeted by the SEQUELS program at lower priority
25_ORI_WISE 40 WISE-selected target near the star 25 Ori
25_ORI_WISE_W3 41 WISE-selected target near the star 25 Ori, selected from data in the W3 band
KOEKAP_STAR 42 WISE-selected source in the star-forming region Kappa Ori, selected from WISE infrared excess
KOE2023_STAR 43 WISE-selected source in the star-forming region NGC 2023, selected from WISE infrared excess
KOE2068_STAR 44 WISE-selected source in the star-forming region NGC 2068, selected from WISE infrared excess
KOE2023BSTAR 45 Other WISE-selected source in the star-forming region NGC 2023
KOE2068BSTAR 46 Other WISE-selected source in the star-forming region NGC 2068
KOEKAPAPBSTAR 47 Other WISE-selected source in the star-forming region Kappa Ori
COROTGESAPOG 48 Star observed by both the CoRoT survey and by APOGEE
COROTGES 49 Star observed by both CoRoT and GES
APOGEE 50 Star in the CoRoT survey area, not observed by CoRoT but with an APOGEE spectrum
2MASSFILL 51 Star in the CoRoT survey area targeted from 2MASS photometry
TAU_STAR 52 Spitzer-selected source in the Taurus Heiles 2 molecular cloud
SEQUELS_TARGET 53 A target from the SEQUELS program (no longer used, replaced by EBOSS_TARGET0 flag)
RM_TILE1 54 AGN selected for reverberation mapping study at high priority
RM_TILE2 55 AGN selected for reverberation mapping study at lower priority
QSO_DEEP 56 Candidate quasar selected by time variability
LBG 57 Candidate Lyman-break galaxy selected by color
ELAIS_N1_LOFAR 58 LOFAR source selected with RMS noise criteria
ELAIS_N1_FIRST 59 Source detected in the FIRST radio catalog
ELAIS_N1_GMRT_GARN 60 Source identified from deeper GMRT radio data
ELAIS_N1_GMRT_TAYLOR 61 Fainter source identified from deeper GMRT radio data
ELAIS_N1_JVLA 62 Very faint source detected in JVLA radio data
Bit Name Binary Digit Description
TILED 0 assigned a fiber
NAKED 1 not in area covered by tiles
BOSSTARGET 2 in the high priority set of targets
DECOLLIDED 3 in the decollided set of high priority
ANCILLARY 4 in the lower priority, ancillary set
POSSIBLE_KNOCKOUT 5 knocked out of at least one tile by BOSSTARGET
IGNORE_PRIORITY 6 priority exceeds max (ANCILLARY only)
TOOBRIGHT 7 fibermag too bright
BLUEFIBER 8 allocate this object a blue fiber
CENTERPOST 9 92 arcsec collision with center post
REPEAT 10 included on more than one tile
FILLER 11 was a filler (not normal repeat)
NOT_TILED_TARGET 12 though in input file, not a tiled target
OUT_OF_BOUNDS 13 outside bounds for this sort of target (for restricted QSO geometry, e.g.)
BAD_CALIB_STATUS 14 bad CALIB_STATUS
PREVIOUS_CHUNK 15 included because not tiled in previous overlapping chunk
KNOWN_OBJECT 16 galaxy has known redshift
DUPLICATE 17 trimmed as a duplicate object (only checked if not trimmed for any other reason)
DUPLICATE_PRIMARY 18 has associated duplicate object that were trimmed (but this one is kept)
DUPLICATE_TILED 19 trimmed as a duplicate object, and its primary was tiled
TOOFAINT 20 trimmed because it was fainter than the ifiber2mag limit
SUPPLEMENTARY 21 supplementary targets tiles after the ancillaries (subset of ancillaries)
Bit Name Binary Digit Description
ORIGINAL_FLUXMATCH 0 used the original positional match (which exists)
FIBER_FLUXMATCH 1 flagged due to fiberflux/aperflux issue
NONMATCH_FLUXMATCH 2 flagged due to non-match
NOPARENT_FLUXMATCH 3 no overlapping parent in primary field
PARENT_FLUXMATCH 4 overlapping parent has no children, so used it
BRIGHTEST_FLUXMATCH 5 picked the brightest child
Each of these bits is set for each fiber and each pixel. Bits 0-15 indicate something about the spectrum as a whole, or at least about its red or blue half (corresponding to the two spectrographs). Within a spectrum, if these bits are set they will be set for all the bits in one or both of the halves. Bits 16-31 indicate something about each particular pixel.
The conditions that are considered very bad are already used to set the errors to infinity for the effected pixels (specifically, the inverse variance is set to zero). The most useful mask bit to look at is BRIGHTSKY, which indicates when the sky is so bright relative to the object that perhaps one shouldn't trust any of the object flux there. Our reported errors are meant to include sky-subtraction errors, but there are instances (particularly around 5577) where these errors may be untrustworthy.

Bit Name Binary Digit Description
NOPLUG 0 Fiber not listed in plugmap file
BADTRACE 1 Bad trace from routine TRACE320CRUDE
BADFLAT 2 Low counts in fiberflat
BADARC 3 Bad arc solution
MANYBADCOLUMNS 4 More than 10% of pixels are bad columns
MANYREJECTED 5 More than 10% of pixels are rejected in extraction
LARGESHIFT 6 Large spatial shift between flat and object position
BADSKYFIBER 7 Sky fiber shows extreme residuals
NEARWHOPPER 8 DEPRECATED, no longer set as of BOSS DR9. Prior to DR9 meant within 2 fibers of a whopping fiber (exclusive)
WHOPPER 9 Whopping fiber, with a very bright source.
SMEARIMAGE 10 DEPRECATED. Prior to DR9 meant smear available for red and blue cameras
SMEARHIGHSN 11 DEPRECATED. Prior to DR9 meant S/N sufficient for full smear fit
SMEARMEDSN 12 DEPRECATED. Prior to DR9 meant S/N only sufficient for scaled median fit
NEARBADPIXEL 16 Bad pixel within 3 pixels of trace.
LOWFLAT 17 Flat field less than 0.5
FULLREJECT 18 Pixel fully rejected in extraction (INVVAR=0)
PARTIALREJECT 19 Some pixels rejected in extraction
SCATTEREDLIGHT 20 Scattered light significant
CROSSTALK 21 Cross-talk significant
NOSKY 22 Sky level unknown at this wavelength (INVVAR=0)
BRIGHTSKY 23 Sky level > flux + 10*(flux_err) AND sky > 1.25 * median(sky,99 pixels)
NODATA 24 DEPRECATED, should be ignored in favor of flagging on INVVAR=0. Prior to DR9 meant no data available in combine B-spline (INVVAR=0)
COMBINEREJ 25 Rejected in combine B-spline
BADFLUXFACTOR 26 Low flux-calibration or flux-correction factor
BADSKYCHI 27 Relative ?2 > 3 in sky residuals at this wavelength
REDMONSTER 28 Contiguous region of bad ?2 in sky residuals (with threshold of relative ?2 > 3).
Spectra with zWarning equal to zero have no known problems. MANY_OUTLIERS is only ever set in the data taken with the SDSS spectrograph, not the BOSS spectrograph (the SDSS-I, -II and SEGUE-2 surveys). If it is set, that usually indicates a high signal-to-noise spectrum or broad emission lines in a galaxy; that is, MANY_OUTLIERS only rarely signifies a real error.

Bit Name Binary Digit Description
SKY 0 sky fiber
LITTLE_COVERAGE 1 too little wavelength coverage (WCOVERAGE < 0.18)
SMALL_DELTA_CHI2 2 chi-squared of best fit is too close to that of second best (< 0.01 in reduced chi-squared)
NEGATIVE_MODEL 3 synthetic spectrum is negative (only set for stars and QSOs)
MANY_OUTLIERS 4 fraction of points more than 5 sigma away from best model is too large (> 0.05)
Z_FITLIMIT 5 chi-squared minimum at edge of the redshift fitting range (Z_ERR set to -1)
NEGATIVE_EMISSION 6 a QSO line exhibits negative emission, triggered only in QSO spectra, if C_IV, C_III, Mg_II, H_beta, or H_alpha has LINEAREA + 3 * LINEAREA_ERR < 0
UNPLUGGED 7 the fiber was unplugged or damaged, and the location of any spectrum is unknown
BAD_TARGET 8 catastrophically bad targeting data (e.g. bad astrometry)
NODATA 9 No data for this fiber, e.g. because spectrograph was broken during this exposure (ivar=0 for all pixels)
Same as ZWARNING above but without taking into account QSO templates when determining the best fit template model to the spectra. It only compares GALAXY and STAR templates. It is the target bit used to select confident galaxy redshifts in BOSS and eBOSS.
Bit Name Binary Digit Description
APOGEE_FAINT 0 Star selected in faint bin of cohort
APOGEE_MEDIUM 1 Star selected in medium bin of cohort
APOGEE_BRIGHT 2 Star selected in bright bin of cohort
APOGEE_IRAC_DERED 3 Star selected using RJCE-IRAC dereddening
APOGEE_WISE_DERED 4 Star selected using RJCE-WISE dereddening
APOGEE_SFD_DERED 5 Selected using SFD E(B-V) dereddening
APOGEE_NO_DERED 6 Star selected using no dereddening
APOGEE_WASH_GIANT 7 Selected as giant star via Washington+DDO51 photometry
APOGEE_WASH_DWARF 8 Selected as dwarf star via Washington+DDO51 photometry
APOGEE_SCI_CLUSTER 9 Probable stellar cluster member
APOGEE_EXTENDED 10 Extended object
APOGEE_SHORT 11 Short cohort target star
APOGEE_INTERMEDIATE 12 Intermediate cohort target star
APOGEE_LONG 13 Long cohort target star
--- 14 ---
APOGEE_SERENDIPITOUS 15 Serendipitous interesting target to re-observe
APOGEE_FIRST_LIGHT 16 "First Light" cluster target
APOGEE_ANCILLARY 17 An ancillary program target (particular program specified in other bits, see below)
APOGEE_M31_CLUSTER 18 M31 cluster target (ancillary)
APOGEE_MDWARF 19 M dwarf star selected for RV/metallicity program (ancillary)
APOGEE_HIRES 20 Star with optical hi-res spectra (ancillary)
APOGEE_OLD_STAR 21 Selected as old star (ancillary)
APOGEE_DISK_RED_GIANT 22 Disk red giant star (ancillary)
APOGEE_KEPLER_EB 23 Eclipsing binary star from Kepler (ancillary)
APOGEE_GC_PAL1 24 Star in Pal1 globular cluster (ancillary)
APOGEE_MASSIVE_STAR 25 Massive star (ancillary)
APOGEE_SGR_DSPH 26 Sagittarius dwarf galaxy member
APOGEE_KEPLER_SEISMO 27 Kepler astroseismology program target star
APOGEE_KEPLER_HOST 28 Kepler planet-host program target star
APOGEE_FAINT_EXTRA 29 Selected as faint target for low target density field
APOGEE_SEGUE_OVERLAP 30 Selected because of overlap with SEGUE survey
APOGEE_CHECKED 31 This object was checked for APOGEE target selection.
Bit Name Binary Digit Description
--- 0 ---
APOGEE_FLUX_STANDARD 1 Flux standard
APOGEE_STANDARD_STAR 2 Stellar abundance and/or parameters standard
APOGEE_RV_STANDARD 3 Stellar radial velocity standard
SKY 4 Blank sky position
--- 5 ---
--- 6 ---
--- 7 ---
--- 8 ---
APOGEE_TELLURIC 9 Hot (telluric) standard star
APOGEE_CALIB_CLUSTER 10 Known calibration cluster member star
APOGEE_BULGE_GIANT 11 Probable giant star in Galactic bulge
APOGEE_BULGE_SUPER_GIANT 12 Probable supergiant star in Galactic bulge
APOGEE_EMBEDDEDCLUSTER_STAR 13 Young embedded cluster member (ancillary)
APOGEE_LONGBAR 14 Probable RC star in long bar (ancillary)
APOGEE_EMISSION_STAR 15 Emission-line star (ancillary)
APOGEE_KEPLER_COOLDWARF 16 Kepler cool dwarf or subgiant (ancillary)
APOGEE_MIRCLUSTER_STAR 17 MIR-detected candidate cluster member (ancillary)
APOGEE_RV_MONITOR_IC348 18 IC 348 star monitored for RV variability (ancillary)
APOGEE_RV_MONITOR_KEPLER 19 Kepler planet host or binary monitored for RV variability (ancillary)
APOGEE_GES_CALIBRATE 20 Gaia-ESO calibrator
APOGEE_BULGE_RV_VERIFY 21 Bulge commissioning RV verification
APOGEE_1M_TARGET 22 Targeted with the 1-m telescope
--- 23 ---
--- 24 ---
--- 25 ---
--- 26 ---
--- 27 ---
--- 28 ---
--- 29 ---
--- 30 ---
APOGEE_CHECKED 31 This object was checked for APOGEE target selection.
Bit Name Binary Digit Description
APOGEE2_ONEBIN_GT_0_5 0 Selected in single $(J-K_s)_0 \gt 0.5$ color bin
APOGEE2_TWOBIN_0_5_TO_0_8 1 Selected in "blue" $0.5 \lt (J-K_s)_0 \lt 0.8$ color bin
APOGEE2_TWOBIN_GT_0_8 2 Selected in "red" $(J-K_s)_0 \gt 0.8$ color bin
APOGEE2_IRAC_DERED 3 Star selected using RJCE-IRAC dereddening
APOGEE2_WISE_DERED 4 Star selected using RJCE-WISE dereddening
APOGEE2_SFD_DERED 5 Selected using SFD $E(B-V)$ dereddening
APOGEE2_NO_DERED 6 Star selected using no dereddening
APOGEE2_WASH_GIANT 7 Selected as giant star via Washington+DDO51 photometry
APOGEE2_WASH_DWARF 8 Selected as dwarf star via Washington+DDO51 photometry
APOGEE2_SCI_CLUSTER 9 Science cluster candidate member
APOGEE2_EXTENDED 10 Extended object
APOGEE2_SHORT 11 Short cohort target star
APOGEE2_MEDIUM 12 Intermediate cohort target star
APOGEE2_LONG 13 Long cohort target star
APOGEE2_NORMAL_SAMPLE 14 Selected as part of the random sample
APOGEE2_MANGA_LED 15 Star on a shared MaNGA-led design
APOGEE2_ONEBIN_GT_0_3 16 Selected in single $(J-K_s)_0 \gt 0.3$ color bin
APOGEE2_WASH_NOCLASS 17 Selected because it has no W+D classification
APOGEE2_STREAM_MEMBER 18 Selected as confirmed halo tidal stream member
APOGEE2_STREAM_CANDIDATE 19 Selected as potential halo tidal stream member
APOGEE2_DSPH_MEMBER 20 Selected as confirmed dSph member (non Sgr)
APOGEE2_DSPH_CANDIDATE 21 Selected as potential dSph member (non Sgr) (based on photometry)
APOGEE2_MAGCLOUD_MEMBER 22 Selected as confirmed Mag Cloud member
APOGEE2_MAGCLOUD_CANDIDATE 23 Selected as potential Mag Cloud member (based on photometry)
APOGEE2_RRLYR 24 Selected as an RR Lyrae star
APOGEE2_BULGE_RC 25 Selected as a bulge candidate RC star
APOGEE2_SGR_DSPH 26 Sagittarius dwarf galaxy member
APOGEE2_APOKASC_GIANT 27 Selected as part of APOKASC "giant" sample
APOGEE2_APOKASC_DWARF 28 Selected as part of APOKASC "dwarf" sample
APOGEE2_FAINT_EXTRA 29 Selected as faint target for low target density field
APOGEE2_APOKASC 30 Selected as part of the APOKASC program (incl. seismic/gyro targets and others, both the Cygnus field and K2)
APOGEE2_CHECKED 31 This object was checked for APOGEE target selection.
Bit Name Binary Digit Description
--- 0 ---
--- 1 ---
APOGEE2_STANDARD_STAR 2 Stellar parameters/abundance standard
APOGEE2_RV_STANDARD 3 Stellar RV standard
APOGEE2_SKY 4 Sky fiber
APOGEE2_EXTERNAL_CALIB 5 External survey calibration target
APOGEE2_INTERNAL_CALIB 6 Internal survey calibration target
--- 7 ---
--- 8 ---
APOGEE2_TELLURIC 9 Telluric calibrator target
APOGEE2_CALIB_CLUSTER 10 Selected as calibration cluster member
--- 11 ---
--- 12 ---
APOGEE2_LITERATURE_CALIB 13 Overlap with high-resolution literature studies
APOGEE2_GES_OVERLAP 14 Overlap with Gaia-ESO
APOGEE2_ARGOS_OVERLAP 15 Overlap with ARGOS
APOGEE2_GAIA_OVERLAP 16 Overlap with Gaia
APOGEE2_GALAH_OVERLAP 17 Overlap with GALAH
APOGEE2_RAVE_OVERLAP 18 Overlap with RAVE
APOGEE2_COMMIS_SOUTH_SPEC 19 Commissioning special targets for APOGEE-2S
--- 20 ---
--- 21 ---
APOGEE2_1M_TARGET 22 Selected as a 1-m target
APOGEE2_MOD_BRIGHT_LIMIT 23 Selected in a cohort with H>10 rather than H>7
APOGEE2_CIS 24 Carnegie program target
APOGEE2_CNTAC 25 Chilean community target
APOGEE2_EXTERNAL 26 Proprietary external target
--- 27 ---
--- 28 ---
--- 29 ---
APOGEE2_OBJECT 30 An APOGEE-2 object
--- 31 ---
Bit Name Binary Digit Description
APOGEE2_KOI 0 Selected as part of the long cadence KOI study
APOGEE2_EB 1 Selected as part of the EB program
APOGEE2_KOI_CONTROL 2 Selected as part of the long cadence KOI "control sample"
APOGEE2_MDWARF 3 Selected as part of the M dwarf study
APOGEE2_SUBSTELLAR_COMPANIONS 4 Selected as part of the substellar companion search
APOGEE2_YOUNG_CLUSTER 5 Selected as part of the young cluster study (IN-SYNC)
--- 6 ---
--- 7 ---
APOGEE2_ANCILLARY 8 Selected as an ancillary target
APOGEE2_MASSIVE_STAR 9 Selected as part of the Massive Star program
APOGEE2_QSO 10 ancillary QSO program
APOGEE2_CEPHEID 11 ancillary Cepheid sparse targets
APOGEE2_LOW_AV_WINDOWS 12 ancillary Deep Disk sample
APOGEE2_BE_STAR 13 ancillary ASHELS sample
APOGEE2_YOUNG_MOVING_GROUP 14 ancillary young moving group members
APOGEE2_NGC6791 15 ancillary NGC 6791 star
APOGEE2_LABEL_STAR 16 ancillary Cannon calibrator sample (Ness)
APOGEE2_FAINT_KEPLER_GIANTS 17 ancillary APOKASC faint giants
APOGEE2_W345 18 ancillary W3/4/5 star forming complex
APOGEE2_MASSIVE_EVOLVED 19 ancillary massive/evolved star targets
APOGEE2_REDDENING_TARGETS 20 ancillary extinction targets
APOGEE2_KEPLER_MDWARF_KOI 21 ancillary M dwarf targets
APOGEE2_AGB 22 ancillary AGB sample
--- 23 ---
--- 24 ---
--- 25 ---
--- 26 ---
--- 27 ---
--- 28 ---
--- 29 ---
--- 30 ---
--- 31 ---
This bit mask provides a convenient way to select only main survey targets (EXTRATARG==0) and identifies the main classes of other targets.

Bit Name Binary Digit Description
NOT_MAIN 0 Not main survey target
COMMISSIONING 1 Commissioning data
TELLURIC 2 Telluric target
APO1M 3 1m observation
DUPLICATE 4 Duplicate observation
This bit mask describes the warnings and failures for pixels within the 1D spectra for APOGEE. The bits are set on a per-pixel basis.

Bit Name Binary Digit Description
BADPIX 0 Pixel marked as BAD in bad pixel mask
CRPIX 1 Pixel marked as cosmic ray in ap3d
SATPIX 2 Pixel marked as saturated in ap3d
UNFIXABLE 3 Pixel marked as unfixable in ap3d
BADDARK 4 Pixel marked as bad as determined from dark frame
BADFLAT 5 Pixel marked as bad as determined from flat frame
BADERR 6 Pixel set to have very high error (not used)
NOSKY 7 No sky available for this pixel from sky fibers
LITTROW_GHOST 8 Pixel falls in Littrow ghost, may be affected
PERSIST_HIGH 9 Pixel falls in high persistence region, may be affected
PERSIST_MED 10 Pixel falls in medium persistence region, may be affected
PERSIST_LOW 11 Pixel falls in low persistence region, may be affected
SIG_SKYLINE 12 Pixel falls near sky line that has significant flux compared with object
SIG_TELLURIC 13 Pixel falls near telluric line that has significant absorption
NOT_ENOUGH_PSF 14 Less than 50 percent PSF in good pixels
15
Bit Name Binary Digit Description
BAD_PIXELS 0 Spectrum has many bad pixels (>40%): BAD
COMMISSIONING 1 Commissioning data (MJD<55761), non-standard configuration, poor LSF: WARN
BRIGHT_NEIGHBOR 2 Star has neighbor more than 10 times brighter: WARN
VERY_BRIGHT_NEIGHBOR 3 Star has neighbor more than 100 times brighter: BAD
LOW_SNR 4 Spectrum has low S/N (S/N<5): BAD
5
6
7
8
PERSIST_HIGH 9 Spectrum has significant number (>20%) of pixels in high persistence region: WARN
PERSIST_MED 10 Spectrum has significant number (>20%) of pixels in medium persistence region: WARN
PERSIST_LOW 11 Spectrum has significant number (>20%) of pixels in low persistence region: WARN
PERSIST_JUMP_POS 12 Spectrum show obvious positive jump in blue chip: WARN
PERSIST_JUMP_NEG 13 Spectrum show obvious negative jump in blue chip: WARN
14
15
SUSPECT_RV_COMBINATION 16 WARNING: RVs from synthetic template differ significantly from those from combined template
SUSPECT_BROAD_LINES 17 WARNING: cross-correlation peak with template significantly broader than autocorrelation of template
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Bit Name Binary Digit Description
TEFF_WARN 0 WARNING on effective temperature (see PARAMFLAG[0] for details)
LOGG_WARN 1 WARNING on log g (see PARAMFLAG[1] for details)
VMICRO_WARN 2 WARNING on vmicro (see PARAMFLAG[2] for details)
METALS_WARN 3 WARNING on metals (see PARAMFLAG[3] for details)
ALPHAFE_WARN 4 WARNING on [alpha/Fe] (see PARAMFLAG[4] for details)
CFE_WARN 5 WARNING on [C/Fe] (see PARAMFLAG[5] for details)
NFE_WARN 6 WARNING on [N/Fe] (see PARAMFLAG[6] for details)
STAR_WARN 7 WARNING overall for star: set if any of TEFF, LOGG, CHI2, COLORTE, ROTATION, SN warn are set
CHI2_WARN 8 high chi^2 (> 2*median at ASPCAP temperature (WARN)
COLORTE_WARN 9 effective temperature more than 500K from photometric temperature for dereddened color (WARN)
ROTATION_WARN 10 Spectrum has broad lines, with possible bad effects: FWHM of cross-correlation of spectrum with best RV template relative to auto-correltion of template > 1.5 (WARN)
SN_WARN 11 S/N<70 (WARN)
12
13
VSINI_WARN 14
15
TEFF_BAD 16 BAD effective temperature (see PARAMFLAG[0] for details)
LOGG_BAD 17 BAD log g (see PARAMFLAG[1] for details)
VMICRO_BAD 18 BAD vmicro (see PARAMFLAG[2] for details)
METALS_BAD 19 BAD metals (see PARAMFLAG[3] for details)
ALPHAFE_BAD 20 BAD [alpha/Fe] (see PARAMFLAG[4] for details)
CFE_BAD 21 BAD [C/Fe] (see PARAMFLAG[5] for details)
NFE_BAD 22 BAD [N/Fe] (see PARAMFLAG[6] for details)
STAR_BAD 23 BAD overall for star: set if any of TEFF, LOGG, CHI2, COLORTE, ROTATION, SN error are set, or any parameter is near grid edge (GRIDEDGE_BAD is set in any PARAMFLAG)
CHI2_BAD 24 high chi^2 (> 5*median at ASPCAP temperature (BAD)
COLORTE_BAD 25 effective temperature more than 1000K from photometric temperature for dereddened color (BAD)
ROTATION_BAD 26 Spectrum has broad lines, with possible bad effects: FWHM of cross-correlation of spectrum with best RV template relative to auto-correltion of template > 2 (BAD)
SN_BAD 27 S/N<50 (BAD)
28
29
VSINI_BAD 30
NO_ASPCAP_RESULT 31
Bit Name Binary Digit Description
GRIDEDGE_BAD 0 Parameter within 1/8 grid spacing of grid edge
CALRANGE_BAD 1 Parameter outside valid range of calibration determination
OTHER_BAD 2 Other error condition
FERRE_BAD 3 FERRE failed to return a value
PARAM_MISMATCH_BAD 4 Elemental abundance from window differs > 0.5 dex from parameter abundance
5-7 Currently unused
GRIDEDGE_WARN 8 Parameter within 1/2 grid spacing of grid edge
CALRANGE_WARN 9 Parameter in possibly unreliable range of calibration determination
OTHER_WARN 10 Other warning condition
FERRE_WARN 11 FERRE provided a value and a warning
PARAM_MISMATCH_WARN 12 Elemental abundance from window differs > 0.25 dex from parameter abundance
13-15 Currently unused
PARAM_FIXED 16 Parameter set at fixed value, not fit
17-31 Currently unused
The MANGA_TARGET1, MANGA_TARGET2, and MANGA_TARGET3 integers are used to track the target type (e.g., primary sample galaxies, F-standard stars, etc). Loosely speaking, all galaxy targets have a non-zero bit set for MANGA_TARGET1, all non-galaxy targets (e.g., MaStar) have a non-zero bit set for MANGA_TARGET2, and all ancillary program targets have a non-zero bit set for MANGA_TARGET3.

Bit name Binary digit Value Description
NONE 0 1 Unused.
PRIMARY_PLUS_COM 1 2 March 2014 commissioning
SECONDARY_COM 2 4 March 2014 commissioning
COLOR_ENHANCED_COM 3 8 March 2014 commissioning
PRIMARY_v1_1_0 4 16 First tag, August 2014 plates
SECONDARY_v1_1_0 5 32 First tag, August 2014 plates
COLOR_ENHANCED_v1_1_0 6 64 First tag, August 2014 plates
PRIMARY_COM2 7 128 July 2014 commissioning
SECONDARY_COM2 8 256 July 2014 commissioning
COLOR_ENHANCED_COM2 9 512 July 2014 commissioning
PRIMARY_v1_2_0 10 1024 MaNGA main survey primary selection
SECONDARY_v1_2_0 11 2048 MaNGA main survey secondary selection
COLOR_ENHANCED_v1_2_0 12 4096 MaNGA main survey color-enhanced selection
FILLER 13 8192 Filler targets
RETIRED 14 16384 Retired bit; do not use
The MANGA_TARGET1, MANGA_TARGET2, and MANGA_TARGET3 integers are used to track the target type (e.g., primary sample galaxies, F-standard stars, etc). Loosely speaking, all galaxy targets have a non-zero bit set for MANGA_TARGET1, all non-galaxy targets (e.g., MaStar) have a non-zero bit set for MANGA_TARGET2, and all ancillary program targets have a non-zero bit set for MANGA_TARGET3.

Bit name Binary digit Value Description
NONE 0 1 Unused.
SKY 1 2
MaStar stellar library targets:
STELLIB_SDSS_COM 2 4 Commissioning selection using SDSS photometry.
STELLIB_2MASS_COM 3 8 Commissioning selection using 2MASS photometry.
STELLIB_KNOWN_COM 4 16 Commissioning selection of known parameter stars.
STELLIB_COM_mar2015 5 32 Commissioning selection in March 2015.
STELLIB_COM_jun2015 6 64 Commissioning selection in June 2015.
STELLIB_PS1 7 128 Library stars using PS1 photometry.
STELLIB_APASS 8 256 Library stars using APASS photometry.
STELLIB_PHOTO_COM 9 512 Commissioning selection using photo-derived para.
STELLIB_aug2015 10 1024 Global Selection generated in Aug 2015.
STELLIB_SDSS 11 2048 Library stars using SDSS photometry.
STELLIB_GAIA 12 4096 Library stars using GAIA photometry, g band only.
STELLIB_TYCHO2 13 8192 Library stars using TYCHO2 photometry (B and V in place of u and r).
STELLIB_BRIGHT 14 16384 Bright stars observed with short exposures.
STELLIB_UNRELIABLE 15 32768 Library stars with unreliable photometry
Spetrophotometric calibration standards:
STD_FSTAR_COM 20 1048576
STD_WD_COM 21 2097152
STD_STD_COM 22 4194304
STD_FSTAR 23 8388608
STD_WD 24 16777216
STD_APASS_COM 25 33554432 Commissioning selection of stds using APASS photometry
STD_PS1_COM 26 67108864 Commissioning selection of stds using PS1 photometry
STD_BRIGHT 27 134217728 standards on bright star plates
The MANGA_TARGET1, MANGA_TARGET2, and MANGA_TARGET3 integers are used to track the target type (e.g., primary sample galaxies, F-standard stars, etc). Loosely speaking, all galaxy targets have a non-zero bit set for MANGA_TARGET1, all non-galaxy targets (e.g., MaStar) have a non-zero bit set for MANGA_TARGET2, and all ancillary program targets have a non-zero bit set for MANGA_TARGET3.

Bit name Binary digit Value Description
NONE 0 1 Unused.
AGN_BAT 1 2
AGN_OIII 2 4
AGN_WISE 3 8
AGN_PALOMAR 4 16
VOID 5 32
EDGE_ON_WINDS 6 64
PAIR_ENLARGE 7 128
PAIR_RECENTER 8 256
PAIR_SIM 9 512
PAIR_2IFU 10 1024
LETTERS 11 2048
MASSIVE 12 4096
MWA 13 8192
DWARF 14 16384
RADIO_JETS 15 32768
DISKMASS 16 65536
BCG 17 131072
ANGST 18 262144
DEEP_COMA 19 524288
IC342 20 1048576
M31 21 2097152
SN_ENV 22 4194304
MW_ANALOG 23 8388608
POST-STARBURST 24 16777216
GLSB 25 33554432
SN1A_HOST 26 67108864
The 2d section of the MaNGA/MaStar DRP (i.e., reducing a single exposure of an entire plate through to the flux calibrated stage) uses the MANGA_DRP2PIXMASK maskbits. These maskbits apply to individual pixels in these images, and are used to determine (e.g.) where the extraction quality is bad due to hot pixels, cosmic ray hits, etc. These masks are contained in the MASK extensions to data produced by the 2d DRP.

Bit name Binary digit Value Description
The following mask bits are for fibers:
NOPLUG 0 1 Fiber not listed in plugmap file.
BADTRACE 1 2 Bad trace.
BADFLAT 2 4 Low counts in fiberflat.
BADARC 3 8 Bad arc solution.
MANYBADCOLUMNS 4 16 More than 10% of pixels are bad columns.
MANYREJECTED 5 32 More than 10% of pixels are rejected in extraction.
LARGESHIFT 6 64 Large spatial shift between flat and object position.
BADSKYFIBER 7 128 Sky fiber shows extreme residuals.
NEARWHOPPER 8 256 Within 2 fibers of a whopping fiber (exclusive).
WHOPPER 9 512 Whopping fiber, with a very bright source.
SMEARIMAGE 10 1024 Smear available for red and blue cameras.
SMEARHIGHSN 11 2048 S/N sufficient for full smear fit.
SMEARMEDSN 12 4096 S/N only sufficient for scaled median fit.
DEADFIBER 13 8192 Broken fiber according to metrology files.
The following mask bits are for a pixel:
SATURATION 14 16384 Pixel considered saturated.
BADPIX 15 32768 Pixel flagged in badpix reference file.
COSMIC 16 65536 Pixel flagged as cosmic ray.
NEARBADPIXEL 17 131072 Bad pixel within 3 pixels of trace.
LOWFLAT 18 262144 Flat field less than 0.5.
FULLREJECT 19 524288 Pixel fully rejected in extraction model fit (INVVAR=0).
PARTIALREJECT 20 1048576 Some pixels rejected in extraction model fit.
SCATTEREDLIGHT 21 2097152 Scattered light significant.
CROSSTALK 22 4194304 Cross-talk significant.
NOSKY 23 8388608 Sky level unknown at this wavelength (INVVAR=0).
BRIGHTSKY 24 16777216 Sky level > flux + 10*(flux_err) AND sky > 1.25 * median(sky,99 pixels).
NODATA 25 33554432 No data available in combine B-spline (INVVAR=0).
COMBINEREJ 26 671108864 Rejected in combine B-spline.
BADFLUXFACTOR 27 134217728 Low flux-calibration or flux-correction factor.
BADSKYCHI 28 268435456 Relative chi2 > 3 in sky residuals at this wavelength.
REDMONSTER 29 536870912 Contiguous region of bad chi2 in sky residuals (with threshhold of relative chi2 > 3).
3DREJECT 30 1073741824 Used in RSS file, indicates should be rejected when making 3D cube.
Since the RSS files combining all exposures for specific IFUs have the same data format as the 2d pipeline, they retain the MANGA_DRP2PIXMASK mask bits. These are informative, in the sense that they tell the end user why a given pixel was masked at the detector level (e.g., cosmic ray, full rejection of the model fit during spectral extraction, etc.).
The combined 3d data cubes use the MANGA_DRP3PIXMASK mask bits that describe whether a given spaxel should be used for science analyses. For instance, it tells where dead fibers are, low relative exposure depth (e.g. at the edges of the frame), no coverage (beyond the borders of the IFU hexagon but within the rectilinear data cube frame, etc. The most generally useful mask bit though is the 'DONOTUSE' bit, which should be self explanatory, and is a distillation of all of the relevant reasons why not to trust particular values.
There is also a FORESTAR bit that indicates where a foreground star has been noted, and should probably be masked out for galaxy analyses. Since the spectra in these regions are still valid, having the FORESTAR bit set does not automatically set the DONOTUSE bit.

Bit name Binary digit Value Description
NOCOV 0 1 No coverage in cube.
LOWCOV 1 2 Low coverage depth in cube.
DEADFIBER 2 4 Major contributing fiber is dead.
FORESTAR 3 8 Foreground star.
DONOTUSE 10 1024 Do not use this spaxel for science.
MANGA_DAPPIXMASK is the 2d image bitmap used to describe the quality of individual pixel measurements in the DAP MAPS file. In addition to reproducing some entries from the MANGA_DRP3PIXMASK for the data cubes (e.g., flagging foreground stars, low coverage, etc) it also adds some new entries indicating spaxels for which the fitting algorithms failed in some manner (e.g., by reaching the bounds of allowable values, failing to derive a fit, etc). The most important flags are incorporated into the DONOTUSE bit, which indicates that a given pixel should not be used for science.

The NEARBOUND flag is used to signify that a returned parameter is likely biased by an imposed boundary on the allowed parameter space. These are specifically relevant to the kinematics (both for stars and ionized-gas) from pPXF. pPXF imposes a ±2000 km/s limit relative to the input guess velocity (set to cz as given by the SCINPVEL header keyword and most often identical to the NSA redshift) on the returned velocity and dv/100 < σ < 1000 limit on the velocity dispersion, where dv is the size of the MaNGA LOGCUBE wavelength channel (~70 km/s; given by VSTEP header keyword). The returned velocity is determined to be NEARBOUND if the "best-fit" value is within 100th of the width of the allowed range of either boundary; i.e., NEARBOUND is triggered if the velocity is -2000 < v < -1980 or 1980 < v < 2000. For the velocity dispersion, NEARBOUND is triggered by the same criterion but geometrically; i.e., if the velocity dispersion is 0.69 < σ < 0.74 or 929.8 < σ < 1000. The UNRELIABLE flag is not incorporated into the DONOTUSE flag. This flag is intended to act as a warning to users that the data may be biased in some way, based on a set of criteria developed by the data pipeline team. You are strongly encouraged to understand the implications of this flag on the data and how to properly make the distinction between the DONOTUSE and UNRELIABLE flags for your science application. For DR15, the UNRELIABLE flag is only set if there are masked pixels in any of the wavelength passbands used when calculating the emission-line equivalent widths or the spectral indices (extensions EMLINE_SEW, EMLINE_GEW, and SPECINDEX in the MAPS file).

Bit name Binary digit Value Description
NOCOV 0 1 No coverage in cube.
LOWCOV 1 2 Low coverage depth in cube.
DEADFIBER 2 4 Major contributing fiber is dead.
FORESTAR 3 8 Foreground star.
NOVALUE 4 16 Spaxel was not fit because it did not meet selection criteria.
UNRELIABLE 5 32 Value is deemed unreliable.
MATHERROR 6 64 Mathematical error in computing value.
FITFAILED 7 128 Attempted fit for property failed.
NEARBOUND 8 256 Fitted value is too near an imposed boundary.
NOCORRECTION 9 512 Appropriate correction not available.
MULTICOMP 10 1024 Multi-component velocity features present (placeholder, not used in DR15).
DONOTUSE 30 1073741824 Do not use this spaxel for science.
MANGA_DAPSPECMASK is the 3d cube bitmap used to describe the quality of individual spaxel fits in the DAP model data cube file.

Bit name Binary digit Value Description
IGNORED 0 1 Ignored because of DRP flags or stacking parameters.
FORESTAR 1 2 There is a foreground star within the data cube.
FLUXINVALID 2 4 Ignored because (stacked) flux not valid.
IVARINVALID 3 8 Ignored because inverse variance not valid.
ARTIFACT 4 16 Contains a designated artifact.
FITIGNORED 5 32 Ignored during fit.
FITFAILED 6 64 Fit failed in this region.
ELIGNORED 7 128 Ignored during emission-line fit.
ELFAILED 8 256 Emission-line fit failed.
The quality of DRP-2d products is tracked using the integer DRP2QUAL that is contained in the output FITS headers of all 2d DRP products (and in the OBSINFO extensions of all 3d DRP products). This uses the bitmask values MANGA_DRP2QUAL. These provide information to the pipeline about failure points that need to be addressed in quality control. For instance, a detected failure in sky subtraction will trigger a mask bit SKYSUBBAD to be set; the flux calibration routine will detect this, and not try to flux calibrate data that has failed the sky subtraction stage.

Bit name Binary digit Value Description
RETIRED 0 1 Retired bit; do not use.
EXTRACTBAD 1 2 Many bad values in extracted frame.
EXTRACTBRIGHT 2 4 Extracted spectra abnormally bright.
LOWEXPTIME 3 8 Exposure time less than 10 minutes.
BADIFU 4 16 One or more IFUs missing/bad in this frame.
HIGHSCAT 5 32 High scattered light levels.
SCATFAIL 6 64 Failure to correct high scattered light levels.
BADDITHER 7 128 Bad dither location information.
ARCFOCUS 8 256 Bad focus on arc frames.
RAMPAGINGBUNNY 9 512 Rampaging dust bunnies in IFU flats.
SKYSUBBAD 10 1024 Bad sky subtraction.
SKYSUBFAIL 11 2048 Failed sky subtraction.
FULLCLOUD 12 4096 Completely cloudy exposure.
BADFLEXURE 13 8192 Abnormally high flexure LSF correction.
VGROOVEFAIL 14 16384 Possible V-groove glue failure.
NOGUIDER 15 32768 No guider data available.
NOSPEC1 16 65536 No data from spec1.
NOSPEC2 17 131072 No data from spec2.
The quality of DRP-3d products is tracked using the integer DRP3QUAL that is contained in the output FITS headers of all 3d DRP products. This uses the bitmask values MANGA_DRP3QUAL. These provide information to end-users and the DAP about final cubes and RSS files that do not meet quality standards (e.g., this ifu dropped out of the plate for some observations, so the data are not as deep as for other IFUs on the plate).

Bit name Binary digit Value Description
RETIRED 0 1 Bit retired from use; do not use.
BADDEPTH 1 2 IFU does not reach target depth.
SKYSUBBAD 2 4 Bad sky subtraction in one or more frames.
HIGHSCAT 3 8 High scattered light in one or more frames.
BADASTROM 4 16 Bad astrometry in one or more frames.
VARIABLELSF 5 32 LSF varies signif. between component spectra.
BADOMEGA 6 64 Omega greater than threshhold in one or more sets.
BADSET 7 128 One or more sets are bad.
BADFLUX 8 256 Bad flux calibration.
BADPSF 9 512 PSF estimate may be bad.
MANYDEAD 10 1024 Many dead fibers.
RETIRED2 11 2048 Bit retired, moved into MASTAR_QUAL instead.
CRITICAL 30 1073741824 Critical failure in one or more frames .
The overall quality of DAP data products is tracked using MANGA_DAPQUAL bit contained in the headers of the DAP output fits files. This bit provides information to end-users about DAP maps and model data cubes that do not meet quality standards (e.g., a bad NSA redshift, ppxf failures, etc.). Anything with the CRITICAL bit set in MANGA_DAPQUAL should generally not be used for scientific purposes.

Bit name Binary digit Value Description
FORESTAR 0 1 There is a foreground star within the data cube.
BADZ 1 2 NSA redshift does not match derived redshift.
LINELESS 2 4 No emission lines in data cube.
PPXFFAIL 3 8 PPXF fails to fit this object.
SINGLEBIN 4 16 Voronoi binning resulted in all spectra in a single bin.
BADGEOM 5 32 Invalid input geometry; elliptical coordinates and effective radius are meaningless.
DRPCRIT 28 268435456 Critical failure in DRP.
DAPCRIT 29 536870912 Critical failure in DAP.
CRITICAL 30 1073741824 Critical failure in DRP or DAP.
The overall quality of summary MaStar spectra is tracked using the integers MJDQUAL, EXPQUAL, and MSTRQUAL that are contained in the output FITS headers and/or binary tables of all MaStar data products. These all use the bitmask values MASTAR_QUAL (see further info at MaStar spectra). These provide information to end-users about spectra that do not meet quality standards (e.g., bad flux calibration, high variance in radial velocity estimates, problematic visual inspection, etc.).

Bit name Binary digit Value Description
NODATA 0 1 No Data.
SKYSUBBAD 1 2 Bad sky subtraction in one or more frames.
HIGHSCAT 2 4 High scattered light in one or more frames.
BADFLUX 3 8 Bad flux calibration.
LOWCOV 4 16 PSF-covering fraction by fiber is too small (<10%).
POORCAL 5 32 Poor throughput.
BADHELIORV 6 64 High variance between stellar RVs.
MANUAL 7 128 Flagged as problematic by visual inspection.
EMLINE 8 256 Spectrum contain emission lines.
LOWSN 9 512 Per-MJD Spectrum has median S/N <= 15.
CRITICAL 30 1073741824 Critical failure in one or more frames.