Utility Functions
Functions in utility module for getting data.
- utils.get_spectrum(ra, dec)
Returns the spectrum of input star from SDSS.
- Parameters
ra (float) – ra of input stars.
dec (float) – dec of input stars.
- Returns
wavelength in SDSS spectrum sp_flux (array): flux in SDSS spectrum
- Return type
sp_lambda (array)
- utils.load_gaia(ra, dec, dr=2)
Read in Gaia data from Gaia DR2, and returns stellar parameters & Gaia IDs.
- Parameters
ra (float) – ra values of input stars.
dec (float) – dec values of input stars.
dr (int) – Gaia data release no. Default is 2.
- Returns
Gaia Source IDs for all stars. teff (float): stellar effective temperature in Kelvin. rad (float): stellar radius in solar units. lum (float): stellar luminosity in solar units.
- Return type
gaia_id (int)
- utils.load_kepler(ra, dec, quarters=False, cadence='long')
Load in photometry from Kepler if exists. Example: KIC 3733346 (287.11345099999994, 38.81283)
- Parameters
ra (float) – ra values of input stars.
dec (float) – dec values of input stars.
quarters (boolean) – Kepler quarters to download. Default is False.
cadence (str) – Kepler cadence of data to use. Default is long.
- Returns
time values in lightcurve flux (array): flux values in lightcurve kicid (int): KICID of object
- Return type
time (array)
- utils.load_sdss(ra, dec)
Read in Gaia data from Gaia DR2.
- Parameters
ra (float) – ra of input stars.
dec (float) – dec of input stars.
- Returns
SDSS ID of input star.
- Return type
sdss_ids (array)
- utils.load_tess(ra, dec)
Load in photometry from TESS if exists. Example: KIC 3733346 (287.11345099999994, 38.81283) TESS example: 261136679
- Parameters
ra (float) – ra values of input stars.
dec (float) – dec values of input stars.
- Returns
time values in lightcurve flux (array): flux values in lightcurve ticid (int): TICID of object
- Return type
time (array)
- utils.read_table(fname)
Read in stars from a file if it exists with columns RA & Dec.
- Parameters
fname (str) – name of file that contains stars to read in.
- Returns
right ascension (ra) values of input stars. dec (array): declination (dec) values of input stars.
- Return type
ra (array)