Examples for Pavol Jozef Šafárik University Archive TAP service

Cone selection using ssa_location

Find timeseries for object by simbad resolvable name using ssa_location (↗upjs_ts.ts_ssa):

SELECT TOP 10 * FROM upjs_ts.ts_ssa
WHERE 1=CONTAINS(ivo_simbadpoint('VY UMi'), CIRCLE(ssa_location, ssa_aperture))

Cone selection using ssa_region

Find timeseries for object by simbad resolvable name using ssa_region (↗gaiadr3_eb.ts_ssa):

SELECT TOP 10 * FROM gaiadr3_eb.ts_ssa
WHERE 1=CONTAINS(ivo_simbadpoint('AA And'), ssa_region)

Count photometric measurements

How many photometric measurements of the specified star in filter I and performed during phase 4 are there (↗ogle.lightcurves)?

SELECT COUNT(*) FROM ogle.lightcurves l
NATURAL JOIN ogle.objects_all WHERE object_id='OGLE-BLAP-051'
        AND passband='I' AND ogle_phase=4

Distribution of star types

Estimate the distribution of sources by type. Estimate sources distributeion by types. The ssa_targclass contains one of the SIMBAD object type codes. We can estimate their distribution using the TABLESAMPLE method. This method does not work on non-materialized views (ssa_ts is not), so we will use ↗ogle.raw_data table and pretend we believe that TABLESAMPLE produces truly random sampling

SELECT ssa_targclass, count(*) AS n
FROM ogle.raw_data TABLESAMPLE(0.1)
        GROUP BY ssa_targclass

Lightcurve length histogram

Estimate the distribution of G-band lightcurve lengths from Gaia DR3 epoch photometry using the SSA-style table ↗gaiadr3_eb.ts_ssa. If you are curious why this distribution has two humps, follow the next example, "Lightcurve Length HEALPix Map".

SELECT ROUND(ssa_length/2) * 2 AS bin, count(*) AS n
FROM gaiadr3_eb.ts_ssa
WHERE ssa_bandpass='Gaia G'
        GROUP BY bin

Lightcurve length HEALPix Map

Draw HEALPix map showing the the celestial distribution of lightcurve length. To plot it in TOPCAT use Sky Plot --> Add new healpix layer, select the last table, and set HEALPix Data Level to 6:

SELECT round(AVG(ssa_length)) AS length,
        ivo_healpix_index(6, coord1(ssa_location), coord2(ssa_location)) AS hpx
FROM gaiadr3_eb.ts_ssa
        GROUP BY hpx

HEALPix map

To draw HEALPix map of the OCVS ↗ogle.objects_all, use TOPCAT's Sky Plot --> Add new healpix layer control with results of the query. Before running the query, set TOPCAT "Max Rows" to "max"

SELECT count(*) as n, ivo_healpix_index(8, raj2000, dej2000) as hpx
FROM ogle.objects_all GROUP BY hpx

ObsCore coverage

To see actual coverage of Kolonica observations (both images and timeseries), you can plot the result of this query against ↗ivoa.obscore table with TOPCAT (Sky Plot --> Add a new area plot control). Before running the query, set TOPCAT "Max Rows" to "max":

SELECT obs_id, s_region FROM ivoa.obscore
WHERE obs_collection ILIKE '%kolonica%'

ADQL Unit Conversion

Demonstration of the new ADQL unit-conversion feature. Query ObsCore for timeseries spanning more than one year and display the spectral passband limits in nanometres rather than metres.

SELECT TOP 100 access_url, preview,
        em_min@{nm} AS em_min,
        em_max@{nm} AS em_max
FROM ivoa.obscore
WHERE dataproduct_type='timeseries'
        AND (t_max-t_min)@{yr} > 1{yr}

More Examples