# External catalogs used in processing

## External Catalogs used for Astrometry and Photometry

Several external catalogs are used for astrometric and photometric calibration of DR9. These catalogs are currently availble in the indicated directories at NERSC, although we will soon make them available to the wider public.

### Pan-STARRS-1 (PS1)

/global/cfs/cdirs/cosmo/work/ps1/cats/chunks-qz-star-v3
These files were produced by Doug Finkbeiner from proprietary Pan-STARRS1 (PS1) data. The data in the files should be public as of Data Release 1 of PS1. The format of the file names is ps1-<hhhhh>.fits where <hhhhh> corresponds to HEALPixel numbers in the nside=32, NESTED scheme. Each file contains a FITS table of PS1 sources.

### Gaia DR2

/global/cfs/cdirs/cosmo/work/gaia/chunks-gaia-dr2-astrom-2
These files contain all sources from the Gaia DR2 public data release, with columns corresponding to the Gaia DR2 data model. The format of the the file names is chunk-<hhhhh>.fits where <hhhhh> corresponds to HEALPixel numbers in the nside=32, NESTED scheme. The provenance of these files is documented at /global/cfs/cdirs/cosmo/work/gaia/chunks-gaia-dr2-astrom-2/README and /global/cfs/cdirs/cosmo/staging/gaia/dr2/README.

### Tycho-2

/global/cfs/cdirs/cosmo/staging/tycho2/tycho2.kd.fits
This file corresponds to the Tycho-2 star catalog, produced from the original binary .dat files, and augmented with an isgalaxy column, plus $J$, $H$, $K$ and estimated $z$ magnitudes. How these extra columns were derived is detailed in /global/cfs/cdirs/cosmo/staging/tycho2/README.

## External Catalogs used for Masking

External catalogs are used for masking regions near foreground sources in DR9 (e.g. to construct MASKBITS on the bitmasks page). These catalogs are available to collaborators in the indicated directories at NERSC.

### "BRIGHT" stars

/global/cfs/cdirs/cosmo/staging/tycho2 and
/global/cfs/cdirs/cosmo/work/gaia/chunks-gaia-dr2-astrom-2
Bright stars are defined from a starting sample of all sources in the Tycho-2 catalog that have MAG_VT < 13. The BRIGHT bit is set for all such Tycho-2 stars. In addition, Gaia DR2 sources with phot_g_mean_mag < 13 have the BRIGHT bit set, provided they do not already match a Tycho-2 source. Gaia and Tycho-2 sources are matched after accounting for proper motion.

### "MEDIUM-bright" stars

/global/cfs/cdirs/cosmo/staging/tycho2 and
/global/cfs/cdirs/cosmo/work/gaia/chunks-gaia-dr2-astrom-2
Medium-bright stars are also defined starting with all sources in the Tycho-2 catalog cut to MAG_VT < 13. All such Tycho-2 stars have the MEDIUM bit set. In addition, Gaia DR2 sources with phot_g_mean_mag < 16 have the MEDIUM bit set, provided they do not already match a Tycho-2 source (where the match accounts for proper motion). Note that this means that all BRIGHT stars also have the MEDIUM bit set. The specific (Gaia G) magnitude-radius relationship is hardcoded in legacypipe.

### Globular Clusters & Planetary Nebulae

In DR9 we mask globular clusters and planetary nebulae selected from the OpenNGC catalog of NGC/IC objects. Specifically, we select all objects classified as GCl or PN and use a circular mask with a diameter taken from the majax attribute of this catalog. The input catalog can be found in the legacypipe software product. Objects in this mask are given the CLUSTER bit on the bitmasks page.

### SGA Large Galaxies

The input catalog used to define and mask large galaxies (and to set the GALAXY bit on the bitmasks page) is taken from John Moustakas' Siena Galaxy Atlas (SGA) work with Dustin Lang which builds on the HyperLeda catalog. More documentation on how the SGA was constructed for DR9 is coming soon.