Further access options are discussed below
For a list of all services and tables belonging to this service's resource, see Information on resource 'BGDS DR2 time series'
The time series from BGDS DR2 by default come as IVOA Spectral Data Model compliant VOTables. If you what plain text instead, add &format=txt to the dlget URIs. The columns you get back then are epoch in MJD, magnitude and magnitude error in mag, and a link to a cutout showing where the measurement came from.
Let us briefly illustrate how to access and plot the GDS data with pyVO. First, some basic definitions that we will need in the code below; there is no need to understand this code in detail:
import pyvo as vo import matplotlib.pyplot as plt import numpy as np service = vo.dal.TAPService("http://dc.g-vo.org/tap") def get_lc(ra, dec, rad, filter): """Returns a light curve given by mjds and mags around the coordinates ra and dec. """ # Search for the object coordinates in the metadata table: id_set = service.search("SELECT obs_id" " FROM bgds2.ssa_time_series" f" WHERE DISTANCE({ra}, {dec}, ra, dec)<{rad}/3600." " AND ssa_bandpass like '% " + filter + "%'") if len(id_set) >= 1: # Use the ID from the first result in the time series metadata table # (there is only one result for the examples here, but sources in # overlapping observation fields can have up to four light curves # per filter) to receive the corresponding light curve from the # light curve table: lc_set = service.search( "SELECT mjds, mags FROM bgds2.lc_allbands" " WHERE obs_id = '" + id_set.getcolumn("obs_id")[0] + "'") mjds = lc_set.getcolumn("mjds") mags = lc_set.getcolumn("mags") return mjds[0], mags[0] else: print(f"There is no GDS light curve for the filter {filter}" f" in a radius of {rad}'' around the coordinates {ra} {dec}.") def plot_ts(r_mjds, r_mags, i_mjds, i_mags): """Plot r' and i' light curves given by r_mjds, i_mjds and r_mags, i_mags. """ plt.plot(r_mjds, r_mags, 'ro', markersize=3.0) plt.plot(i_mjds, i_mags, 'ko', markersize=3.0) plt.gca().invert_yaxis() plt.xlabel('MJD (d)') plt.ylabel('Magnitude') plt.show() return def fold_lc(mjds, mags, p): """Fold a light curve given by mjds and mags with a period p. """ # Fold the dates mjds by the period p: mjds_fold = mjds % p / p # Sort mjds and mags by the phase: idx_fold = np.argsort(mjds_fold) mjds_fold = mjds_fold[idx_fold] mags_fold = mags[idx_fold] return mjds_fold, mags_fold def find_p(mjds, mags, min_p, max_p, p_step): """Find the period p in a given range from min_p to max_p in steps of p_step with minimal theta. """ theta_list = [] p_candidates = np.arange(min_p, max_p, p_step) for j in range(len(p_candidates)): mjds_fold, mags_fold = fold_lc(mjds, mags, p_candidates[j]) # Shift the magnitudes of the folded light curve mags_fold by one step to # compute differences: mags_shift = [mags_fold[1:len(mags_fold)]] mags_shift = np.append(mags_shift,mags_fold[0]) theta = np.sum((mags_fold - mags_shift)**2) theta_list.append(theta) theta_list = np.asarray(theta_list) min_ind = np.argmin(theta_list) p = p_candidates[min_ind] return p, p_candidates, theta_list def plot_theta(p_candidates, theta_list): """Plot theta (given by a list/array theta_list) in dependence of the period given by a an array p_candidates. """ plt.plot(p_candidates, theta_list, 'ko', markersize=2.5) plt.xlim([np.min(p_candidates), np.max(p_candidates)]) plt.xlabel('$P$ (d)') plt.ylabel('$\\theta$') plt.show() return def plot_phase(r_mjds, r_mags, i_mjds, i_mags, p): """Fold r' and i' light curves given by r_mjds, i_mjds and r_mags, i_mags with a period p and plot two phases. """ r_mjds_fold, r_mags_fold = fold_lc(r_mjds, r_mags, p) i_mjds_fold, i_mags_fold = fold_lc(i_mjds, i_mags, p) plt.plot([r_mjds_fold, [x+1 for x in r_mjds_fold]], [r_mags_fold, r_mags_fold], 'ro', markersize=3.0) plt.plot([i_mjds_fold, [x+1 for x in i_mjds_fold]], [i_mags_fold, i_mags_fold], 'ko', markersize=3.0) plt.axvline(1, color = 'gray', linestyle='-', markersize=0.3) plt.xlim([0.,2.]) plt.gca().invert_yaxis() plt.xlabel('Phase') plt.ylabel('Magnitude') plt.title('$P = %.4f\,\mathrm{d}$' % p) plt.show() return def get_multi_wl_set(ra, dec, rad): """Returns a data set from the multi-wavelength photometry catalogue (matched Gaia DR3 ID gdr3_id, arrays for magnitudes multi_wl_mags and spectral flux density in mJy multi_wl_fluxes in UBVr'i'z', and an estimated spectral type spt from UBV photometry) around the coordinates ra and dec. """ wl_cols = ["u", "b", "v", "r", "i", "z"] multi_wl_set = service.search( "SELECT gdr3_id, u_med_mag, b_med_mag, v_med_mag," " r_med_mag, i_med_mag, z_med_mag, u_flux, b_flux, v_flux," " r_flux, i_flux, z_flux, spt FROM bgds2.matched" f" WHERE DISTANCE({ra}, {dec}, ra, dec)<{rad}/3600.") if len(multi_wl_set) >= 1.: multi_wl_mags = np.zeros(6) multi_wl_fluxes = np.zeros(6) for n in range(len(wl_cols)): multi_wl_mags[n] = multi_wl_set.getcolumn(wl_cols[n] + "_med_mag")[0] multi_wl_fluxes[n] = multi_wl_set.getcolumn(wl_cols[n] + "_flux")[0] gdr3_id = str(multi_wl_set.getcolumn("gdr3_id")[0]) spt = multi_wl_set.getcolumn("spt")[0] return gdr3_id, multi_wl_mags, multi_wl_fluxes, spt else: print(f"There is no GDS photometry in a radius of {rad}" f" around the coordinates {ra} {dec}.") def plot_sed(multi_wl_fluxes): """Plot the spectral flux density in UBVr'i'z' in dependence of the filter wavelength. """ wls = np.array([365, 433, 550, 623, 764, 906]) filters = ["U", "B", "V", "r'", "i'", "z'"] plt.plot(wls, multi_wl_fluxes, 'ko', markersize=5.0) for n in range(len(multi_wl_fluxes)): plt.text(wls[n]+7, multi_wl_fluxes[n]-8, filters[n]) plt.xlabel('Wavelength (nm)') plt.ylabel('Flux (mJy)') plt.show() return def calc_abs_mag(mag, plx): """Calculate the absolute magnitude abs_mag from the relative magnitude mag and the parallax plx in milli-second of arc. """ # Approximation of the distance dist in parsec: dist = 1000./plx abs_mag = mag - 5.*(np.log10(dist) - 1.) return abs_mag
The GDS contains light curves in up to 10 filters per observation field, among which the r’ and i’ light curves contain the largest numbers of data points. We can take a look at the r’ and i’ light curves of a star, e.g., the highly variable V352 Nor:
r_mjds, r_mags = get_lc(241.71551, -52.07636, 1., "r") i_mjds, i_mags = get_lc(241.71551, -52.07636, 1., "i") plot_ts(r_mjds, r_mags, i_mjds, i_mags)
The result is:
The periods of many periodic variables in the GDS are still unknown or uncertain. Short periods are not obvious when looking at the (unfolded) light curve, as is the case for the eclipsing binary EH Mon:
r_mjds, r_mags = get_lc(103.03654, -7.06476, 1., "r") i_mjds, i_mags = get_lc(103.03654, -7.06476, 1., "i") plot_ts(r_mjds, r_mags, i_mjds, i_mags)
Among the numerous options for an automated period classification, here we will use the Lafler-Kinman algorithm.
The light curve is folded by trial periods and the sum of squares θ of the differences between two magnitude measurements of adjacent phase is calculated. Basically, θ measures how smooth a folded light is when folded by a trial period. Usually, θ is minimized when a light curve is folded by a multiple of the correct period, therefore, test values with local minima in θ are the best candidates for the period, in order from low to high.
r_p, r_p_candidates, r_theta_list = find_p(r_mjds, r_mags, 1., 15., 1e-4) i_p, i_p_candidates, i_theta_list = find_p(i_mjds, i_mags, 1., 15., 1e-4) # Exemplarily plot theta for the filter i': plot_theta(i_p_candidates, i_theta_list)
# The final period p is the average between period results from the # r' and i' light curves: p = (r_p + i_p) / 2. plot_phase(r_mjds, r_mags, i_mjds, i_mags, p)
Median magnitudes and light curves are not only available separately for filters and fields, but there is also a multi-wavelength photometry catalogue that is matched with Gaia DR3 sources. The filter magnitudes can be noticeably effected by reddening; in this case, the roughly estimated spectral types from the GDS UBV photometry might be more useful. For Gaia DR3 5334136458661121280, median magnitudes in UBVr’i’z’ are available:
gdr3_id, multi_wl_mags, multi_wl_fluxes, spt = get_multi_wl_set( 175.11591, -62.02608, 1.) print("Gaia DR3 ID: " + gdr3_id + ", Spectral type from UBV photometry: " + spt) print(f"U = {np.round(multi_wl_mags[0], 3)}, " f"B = {np.round(multi_wl_mags[1], 3)}, " f"V = {np.round(multi_wl_mags[2], 3)}, " f"r' = {np.round(multi_wl_mags[3], 3)}, " f"i' = {np.round(multi_wl_mags[4], 3)}, " f"z' = {np.round(multi_wl_mags[5], 3)}") plot_sed(multi_wl_fluxes)
The result is:
Gaia DR3 ID: 5334136458661121280, Spectral type from UBV photometry: K5 U = 14.15, B = 12.996, V = 11.781, r' = 11.366, i' = 10.853, z' = 10.551
The match with Gaia DR3 allows to directly get information from the Gaia DR 3 catalogue like the Gaia DR parallaxes to compute absolute magnitudes:
gdr3_set = service.search( "SELECT parallax FROM gaia.dr3lite WHERE source_id=" + gdr3_id) plx = gaia_set.getcolumn("parallax")[0] multi_wl_abs_mags = np.zeros(6) for n in range(len(multi_wl_abs_mags)): multi_wl_abs_mags[n] = calc_abs_mag(multi_wl_mags[n], plx) print(f"M_U = {np.round(multi_wl_abs_mags[0], 3)}, " f"M_B = {np.round(multi_wl_abs_mags[1], 3)}, " f"M_V = {np.round(multi_wl_abs_mags[2], 3)}, " f"M_r' = {np.round(multi_wl_abs_mags[3], 3)}, " f"M_i' = {np.round(multi_wl_abs_mags[4], 3)}, " f"M_z' = {np.round(multi_wl_abs_mags[5], 3)}")
This gives:
M_U = 10.193, M_B = 9.039, M_V = 7.824, M_r' = 7.409, M_i' = 6.896, M_z' = 6.594
You can access this service using:
Intervals of messenger energies reflected in this resource: 1.10912 4.1325 eV
Time covered by this resource's data: 2010.69 2019.73
This service is published as follows:
local means it is listed on our front page, ivo_managed means it has a record in the VO registry.
Other services provided on the underlying data include:
The following fields are available to provide input to the service (with some renderers, some of these fields may be unavailable):
Name | Table Head | Description | Unit | UCD |
---|---|---|---|---|
DEC | Delta (ICRS) | Declination (ICRS decimal) | deg | pos.eq.dec |
hscs_pos | Position/Name | Coordinates (as h m s, d m s or decimal degrees), or SIMBAD-resolvable object | N/A | N/A |
hscs_sr | Search radius | Search radius in arcminutes | N/A | N/A |
i_med_mag | m_i | Median magnitude in SDSS i' | mag | phot.mag;em.opt.I |
maxrec | Match limit | Maximum number of records returned. Pass 0 to retrieve service parameters. | N/A | N/A |
r_med_mag | m_r | Median magnitude in SDSS r' | mag | phot.mag;em.opt.r |
RA | Alpha (ICRS) | Right Ascension (ICRS decimal) | deg | pos.eq.ra |
responseformat | Output Format | File format requested for output. | N/A | meta.code.mime |
SR | Search Radius | Search radius | deg | N/A |
var | Var | 1 if at least one of the r or i light curves was classified as variable. 0 otherwise. | N/A | meta.code;src.var |
verb | Verbosity | Exhaustiveness of column selection. VERB=1 only returns the most important columns, VERB=2 selects the columns deemed useful to the average user, VERB=3 returns a table with all available columns. | N/A | N/A |
The following fields are contained in the output by default. More fields may be available for selection; these would be given below in the VOTable output fields.
Name | Table Head | Description | Unit | UCD |
---|---|---|---|---|
_r | Dist. | Distance to cone center | deg | pos.angDistance |
b_flux | Flux b | Median flux in Johnson B | mag | phot.mag;em.opt.b |
b_med_mag | m_b | Median magnitude in Johnson B | mag | phot.mag;em.opt.b |
dec | Dec | ICRS Declination of the object, obtained as the median of all declination measurements of all r and i measurements. If there are no r and i positions, this is the median of the positions from all filters. | deg | pos.eq.dec;meta.main |
gdr3_id | GDR3 | Gaia DR3 source_id of this object. | N/A | meta.id;meta.main |
ha_flux | Flux ha | Median flux in Astrodon Halpha | mag | phot.mag;em.line.halpha |
ha_med_mag | m_ha | Median magnitude in Astrodon Halpha | mag | phot.mag;em.line.halpha |
i_flux | Flux i | Median flux in SDSS i' | mag | phot.mag;em.opt.I |
i_med_mag | m_i | Median magnitude in SDSS i' | mag | phot.mag;em.opt.I |
nb_flux | Flux nb | Median flux in Astrodon NB | mag | phot.mag;em.line |
nb_med_mag | m_nb | Median magnitude in Astrodon NB | mag | phot.mag;em.line |
oiii_flux | Flux oiii | Median flux in Astrodon OIII | mag | phot.mag;em.line.oiii |
oiii_med_mag | m_oiii | Median magnitude in Astrodon OIII | mag | phot.mag;em.line.oiii |
r_flux | Flux r | Median flux in SDSS r' | mag | phot.mag;em.opt.r |
r_med_mag | m_r | Median magnitude in SDSS r' | mag | phot.mag;em.opt.r |
ra | RA | ICRS RA of the object, obtained as the median of all RA measurements of all r and i measurements. If there are no r and i positions, this is the median of the positions from all filters. | deg | pos.eq.ra;meta.main |
sii_flux | Flux sii | Median flux in Astrodon SII | mag | phot.mag;em.line |
sii_med_mag | m_sii | Median magnitude in Astrodon SII | mag | phot.mag;em.line |
spt | Spect. | Spectral type estimated via UBV photometry, the reddening path, and the fiducial colours per spectral type (from Tab. 1–2 in <a href='https://ui.adsabs.harvard.edu/abs/1970A%26A.....4..234F/abstract' target='_blank'>Fitzgerald 1970</a>). This is only given where UBV photometry is available and the reddening path (from <a href='https://ui.adsabs.harvard.edu/abs/1956ApJ...124..367H/abstract' target='_blank'>Hiltner & Johnson 1956</a>) as a unique intersection with the spectral type. | N/A | src.sptype |
u_flux | Flux u | Median flux in Johnson U | mag | phot.mag;em.opt.U |
u_med_mag | m_u | Median magnitude in Johnson U | mag | phot.mag;em.opt.U |
v_flux | Flux v | Median flux in Johnson V | mag | phot.mag;em.opt.V |
v_med_mag | m_v | Median magnitude in Johnson V | mag | phot.mag;em.opt.V |
var | Var | 1 if at least one of the r or i light curves was classified as variable. 0 otherwise. | N/A | meta.code;src.var |
z_flux | Flux z | Median flux in SDSS z' | mag | phot.mag;em.opt.I |
z_med_mag | m_z | Median magnitude in SDSS z' | mag | phot.mag;em.opt.I |
The following fields are available in VOTable output. The verbosity level is a number intended to represent the relative importance of the field on a scale of 1 to 30. The services take a VERB argument. A field is included in the output if their verbosity level is less or equal VERB*10.
Name | Table Head | Description | Unit | UCD | Verb. Level |
---|---|---|---|---|---|
ra | RA | ICRS RA of the object, obtained as the median of all RA measurements of all r and i measurements. If there are no r and i positions, this is the median of the positions from all filters. | deg | pos.eq.ra;meta.main | 1 |
dec | Dec | ICRS Declination of the object, obtained as the median of all declination measurements of all r and i measurements. If there are no r and i positions, this is the median of the positions from all filters. | deg | pos.eq.dec;meta.main | 1 |
var | Var | 1 if at least one of the r or i light curves was classified as variable. 0 otherwise. | N/A | meta.code;src.var | 1 |
spt | Spect. | Spectral type estimated via UBV photometry, the reddening path, and the fiducial colours per spectral type (from Tab. 1–2 in <a href='https://ui.adsabs.harvard.edu/abs/1970A%26A.....4..234F/abstract' target='_blank'>Fitzgerald 1970</a>). This is only given where UBV photometry is available and the reddening path (from <a href='https://ui.adsabs.harvard.edu/abs/1956ApJ...124..367H/abstract' target='_blank'>Hiltner & Johnson 1956</a>) as a unique intersection with the spectral type. | N/A | src.sptype | 1 |
gdr3_id | GDR3 | Gaia DR3 source_id of this object. | N/A | meta.id;meta.main | 5 |
_r | Dist. | Distance to cone center | deg | pos.angDistance | 10 |
i_med_mag | m_i | Median magnitude in SDSS i' | mag | phot.mag;em.opt.I | 10 |
i_flux | Flux i | Median flux in SDSS i' | mag | phot.mag;em.opt.I | 10 |
r_med_mag | m_r | Median magnitude in SDSS r' | mag | phot.mag;em.opt.r | 10 |
r_flux | Flux r | Median flux in SDSS r' | mag | phot.mag;em.opt.r | 10 |
b_med_mag | m_b | Median magnitude in Johnson B | mag | phot.mag;em.opt.b | 10 |
b_flux | Flux b | Median flux in Johnson B | mag | phot.mag;em.opt.b | 10 |
ha_med_mag | m_ha | Median magnitude in Astrodon Halpha | mag | phot.mag;em.line.halpha | 10 |
ha_flux | Flux ha | Median flux in Astrodon Halpha | mag | phot.mag;em.line.halpha | 10 |
nb_med_mag | m_nb | Median magnitude in Astrodon NB | mag | phot.mag;em.line | 10 |
nb_flux | Flux nb | Median flux in Astrodon NB | mag | phot.mag;em.line | 10 |
oiii_med_mag | m_oiii | Median magnitude in Astrodon OIII | mag | phot.mag;em.line.oiii | 10 |
oiii_flux | Flux oiii | Median flux in Astrodon OIII | mag | phot.mag;em.line.oiii | 10 |
sii_med_mag | m_sii | Median magnitude in Astrodon SII | mag | phot.mag;em.line | 10 |
sii_flux | Flux sii | Median flux in Astrodon SII | mag | phot.mag;em.line | 10 |
u_med_mag | m_u | Median magnitude in Johnson U | mag | phot.mag;em.opt.U | 10 |
u_flux | Flux u | Median flux in Johnson U | mag | phot.mag;em.opt.U | 10 |
v_med_mag | m_v | Median magnitude in Johnson V | mag | phot.mag;em.opt.V | 10 |
v_flux | Flux v | Median flux in Johnson V | mag | phot.mag;em.opt.V | 10 |
z_med_mag | m_z | Median magnitude in SDSS z' | mag | phot.mag;em.opt.I | 10 |
z_flux | Flux z | Median flux in SDSS z' | mag | phot.mag;em.opt.I | 10 |
err_i_med_mag | Err. m_i | Uncertainty in i_med_mag | mag | stat.error;phot.mag;em.opt.I | 30 |
err_i_flux | Err. Flux i | Uncertainty in i_flux | mag | stat.error;phot.mag;em.opt.I | 30 |
err_r_med_mag | Err. m_r | Uncertainty in r_med_mag | mag | stat.error;phot.mag;em.opt.r | 30 |
err_r_flux | Err. Flux r | Uncertainty in r_flux | mag | stat.error;phot.mag;em.opt.r | 30 |
err_b_med_mag | Err. m_b | Uncertainty in b_med_mag | mag | stat.error;phot.mag;em.opt.b | 30 |
err_b_flux | Err. Flux b | Uncertainty in b_flux | mag | stat.error;phot.mag;em.opt.b | 30 |
err_ha_med_mag | Err. m_ha | Uncertainty in ha_med_mag | mag | stat.error;phot.mag;em.line.halpha | 30 |
err_ha_flux | Err. Flux ha | Uncertainty in ha_flux | mag | stat.error;phot.mag;em.line.halpha | 30 |
err_nb_med_mag | Err. m_nb | Uncertainty in nb_med_mag | mag | stat.error;phot.mag;em.line | 30 |
err_nb_flux | Err. Flux nb | Uncertainty in nb_flux | mag | stat.error;phot.mag;em.line | 30 |
err_oiii_med_mag | Err. m_oiii | Uncertainty in oiii_med_mag | mag | stat.error;phot.mag;em.line.oiii | 30 |
err_oiii_flux | Err. Flux oiii | Uncertainty in oiii_flux | mag | stat.error;phot.mag;em.line.oiii | 30 |
err_sii_med_mag | Err. m_sii | Uncertainty in sii_med_mag | mag | stat.error;phot.mag;em.line | 30 |
err_sii_flux | Err. Flux sii | Uncertainty in sii_flux | mag | stat.error;phot.mag;em.line | 30 |
err_u_med_mag | Err. m_u | Uncertainty in u_med_mag | mag | stat.error;phot.mag;em.opt.U | 30 |
err_u_flux | Err. Flux u | Uncertainty in u_flux | mag | stat.error;phot.mag;em.opt.U | 30 |
err_v_med_mag | Err. m_v | Uncertainty in v_med_mag | mag | stat.error;phot.mag;em.opt.V | 30 |
err_v_flux | Err. Flux v | Uncertainty in v_flux | mag | stat.error;phot.mag;em.opt.V | 30 |
err_z_med_mag | Err. m_z | Uncertainty in z_med_mag | mag | stat.error;phot.mag;em.opt.I | 30 |
err_z_flux | Err. Flux z | Uncertainty in z_flux | mag | stat.error;phot.mag;em.opt.I | 30 |
If you use GDS data, please cite 2015AN....336..590H.
VOResource XML (that's something exclusively for VO nerds)