Reference catalogues

In order to perform astrometric and photometric calibrations, you will need a reference catalogue. For STDPipe, any table that contains sky positions of the stars and their magnitudes will work - so you may either construct it yourself, load from file or database, or download from Internet.

For the latter, we have a convenience routine stdpipe.catalogs.get_cat_vizier() that helps accessing any catalogue available in Vizier.

For some of them we have a special support - we automatically augment them with magnitudes in photometric bands not originally present there. To do so, we use the following sources of photometric transformations:

The following example shows how to get a reference catalogue for a given image

# Load initial WCS from FITS header
wcs = WCS(header)

# Get the center position, size and pixel scale for the image from WCS
center_ra,center_dec,center_sr = astrometry.get_frame_center(wcs=wcs,
             width=image.shape[1], height=image.shape[0])
pixscale = astrometry.get_pixscale(wcs=wcs)

print('Frame center is %.2f %.2f radius %.2f deg, %.2f arcsec/pixel' %
             (center_ra, center_dec, center_sr, pixscale*3600))

# Load Pan-STARRS stars for this region brighter than r=18.0 mag
cat = catalogs.get_cat_vizier(center_ra, center_dec, center_sr, 'ps1',
             filters={'rmag':'<18'})
print(len(cat), 'catalogue stars')

Attention

These catalogue-access functions all use Astroquery package to do the actual work. It caches the results (so that consecutive queries to the same region of the same catalogue do not need to re-download the data) inside your home directory - in the ~/.astropy/cache/astropy/ directory. There is no built-in way to limit its size yet - so you will need to monitor its disk space usage, and probably clean it up manually from time to time!

stdpipe.catalogs.get_cat_vizier(ra0, dec0, sr0, catalog='ps1', limit=-1, filters={}, extra=[], get_distance=False, augment_bands=True, verbose=False)[source]

Download any catalogue from Vizier.

The catalogue may be any Vizier identifier. For a number of popular catalogues, additional photometric bands are computed from analytical conversion formulae:

  • ps1 — Pan-STARRS DR1, augmented with Johnson-Cousins B, V, R, I

  • gaiadr2 — Gaia DR2, augmented with Johnson-Cousins B, V, R, I, Pan-STARRS and SDSS

  • gaiaedr3 — Gaia eDR3

  • gaiadr3syn — Gaia DR3 synthetic photometry from XP spectra

  • skymapper — SkyMapper DR1.1

  • vsx — AAVSO Variable Stars Index

  • apass — AAVSO APASS DR9

  • sdss — SDSS DR16

  • atlas — ATLAS-RefCat2, augmented with Johnson-Cousins B, V, R, I

  • usnob1 — USNO-B1

  • gsc — Guide Star Catalogue 2.2

Parameters:
ra0float

Right Ascension of the field center in degrees.

dec0float

Declination of the field center in degrees.

sr0float

Field radius in degrees.

catalogstr, optional

Any Vizier catalogue identifier or a short name from the list above.

limitint, optional

Maximum number of rows to return (-1 for unlimited).

filtersdict, optional

Column filters applied server-side. Keys are column names; values are Vizier filter expressions.

extralist of str, optional

Additional column names to include beyond the defaults.

get_distancebool, optional

If True, include a _r column with angular distance from field center.

augment_bandsbool, optional

If True (default), augment photometry with derived bands where supported.

verbosebool or callable, optional

Whether to show verbose messages. May be boolean or a print-like callable.

Returns:
astropy.table.Table or None

Catalogue as returned by Vizier, with additional columns for supported catalogues, or None if the query fails.

Cross-matching with Vizier catalogues

STDPipe also has a couple of convenience routines for cross-matching object lists with Vizier catalogues that use CDS XMatch service, as well as with Solar system objects using IMCCE SkyBoT service. Both are thin wrappers around corresponding routines from Astroquery package.

stdpipe.catalogs.xmatch_objects(obj, catalog='ps1', sr=0.0008333333333333334, col_ra='ra', col_dec='dec', augment_bands=True)[source]

Cross-match object list with a Vizier catalogue using the CDS XMatch service.

Parameters:
objastropy.table.Table

Table of objects to cross-match.

catalogstr, optional

Any Vizier catalogue identifier or a short name recognized by get_cat_vizier().

srfloat, optional

Cross-matching radius in degrees.

col_rastr, optional

Column name in obj containing Right Ascension values.

col_decstr, optional

Column name in obj containing Declination values.

augment_bandsbool, optional

If True (default), augment photometry with derived bands where supported.

Returns:
astropy.table.Table

Table of matched objects augmented with columns from the Vizier catalogue.

stdpipe.catalogs.xmatch_skybot(obj, sr=0.002777777777777778, time=None, col_ra='ra', col_dec='dec', col_id='id')[source]

Cross-match object list with Solar System object positions using SkyBoT.

Queries SkyBoT for all Solar System objects in a cone covering the input field at the specified time, then cross-matches them against the input list within sr.

Parameters:
objastropy.table.Table

Table of objects to cross-match.

srfloat, optional

Cross-matching radius in degrees.

timeastropy.time.Time or datetime or str

Observation time.

col_rastr, optional

Column name in obj containing Right Ascension values.

col_decstr, optional

Column name in obj containing Declination values.

col_idstr, optional

Column name in obj containing unique object identifiers.

Returns:
astropy.table.Table or None

Table of matched Solar System objects with a col_id column referencing the matched input objects, or None if no matches are found.