Mini Tools for Gaia data

Note

astroNN only contains a limited amount of necessary tools. For a more comprehensive python tool to deal with Gaia data, please refer to Jo Bovy’s gaia_tools

astroNN.gaia module provides a handful of tools to deal with astrometry and photometry. The mission of the Gaia spacecraft is to create a dynamic, three-dimensional map of the Milky Way Galaxy by measuring the distances, positions and proper motion of stars. To do this, the spacecraft employs two telescopes, an imaging system, an instrument for measuring the brightness of stars, and a spectrograph. Launched in 2013, Gaia orbits the Sun at Lagrange point L2, 1.5 million kilometres from Earth. By the end of its five-year mission, Gaia will have mapped well over one billion stars—one percent of the Galactic stellar population.

ESA Gaia satellite: https://sci.esa.int/gaia/

fakemag (dummy scale)

fakemag is an astroNN dummy scale primarily used to preserve the gaussian standard error from Gaia. astroNN always assume there is no error in apparent magnitude measurement.

\(L_\mathrm{fakemag} = \varpi 10^{\frac{1}{5}m_\mathrm{apparent}} = 10^{\frac{1}{5}M_\mathrm{absolute}+2}\), where \(\varpi\) is parallax in mas

You can get a sense of the fakemag scale from the following plot

_images/fakemag_scale.png

Coordinates Matching between catalogs xmatch

astroNN.datasets.xmatch.xmatch(ra1, dec1, ra2, dec2, epoch1=2000.0, epoch2=2000.0, pmra2=None, pmdec2=None, maxdist=2)[source]

Cross-matching between arrays by RA/DEC coordiantes

Parameters:
  • ra1 (ndarray) – 1d array for the first catalog RA

  • dec1 (ndarray) – 1d array for the first catalog DEC

  • ra2 (ndarray) – 1d array for the second catalog RA

  • dec2 (ndarray) – 1d array for the second catalog DEC

  • epoch1 (Union([float, ndarray])) – Epoch for the first catalog, can be float or 1d array

  • epoch1 – Epoch for the second catalog, can be float or 1d array

  • pmra2 (ndarray) – RA proper motion for second catalog, only effective if epoch1 not equals epoch2

  • pmdec2 (ndarray) – DEC proper motion for second catalog, only effective if epoch1 not equals epoch2

  • maxdist (float) – Maximium distance in arcsecond

Returns:

numpy array of ra, dec, separation

Return type:

ndarrays

History:
2018-Jan-25 - Written - Henry Leung (University of Toronto)
2021-Jan-29 - Updated - Henry Leung (University of Toronto)

Here is an example

>>> from astroNN.datasets import xmatch
>>> import numpy as np

>>> # Some coordinates for cat1, J2000.
>>> cat1_ra = np.array([36.,68.,105.,23.,96.,96.])
>>> cat1_dec = np.array([72.,56.,54.,55.,88.,88.])

>>> # Some coordinates for cat2, J2000.
>>> cat2_ra = np.array([23.,56.,222.,96.,245.,68.])
>>> cat2_dec = np.array([36.,68.,82.,88.,26.,56.])

>>> # Using maxdist=2 arcsecond separation threshold, because its default, so not shown here
>>> # Using epoch1=2000. and epoch2=2000., because its default, so not shown here
>>> # because both datasets are J2000., so no need to provide pmra and pmdec which represent proper motion
>>> idx_1, idx_2, sep = xmatch(ra1=cat1_ra, dec1=cat1_dec, ra2=cat2_ra, dec2=cat2_dec)
>>> idx_1
array([1, 4, 5])
>>> idx_2
array([5, 3, 3])
>>> cat1_ra[idx_1], cat2_ra[idx_2]
(array([68., 96., 96.]), array([68., 96., 96.]))

>>> # What happens if we swap cat_1 and cat_2
>>> idx_1, idx_2, sep = xmatch(ra1=cat2_ra, dec1=cat2_dec, ra2=cat1_ra, dec2=cat1_dec)
>>> idx_1
array([3, 5])
>>> idx_2
array([4, 1])
>>> cat1_ra[idx_2], cat2_ra[idx_1]
(array([96., 68.]), array([96., 68.]))