Presentation is loading. Please wait.

Presentation is loading. Please wait.

IVOA Interoperalibity 20031 JVO Query Language Naoki Yasuda (NAOJ/Japanese VO)

Similar presentations


Presentation on theme: "IVOA Interoperalibity 20031 JVO Query Language Naoki Yasuda (NAOJ/Japanese VO)"— Presentation transcript:

1 IVOA Interoperalibity 20031 JVO Query Language Naoki Yasuda (NAOJ/Japanese VO)

2 IVOA Interoperalibity 20032 Basic Functions of JVOQL Query and retrieve required data –Describe query condition –Describe what to retrieve –Describe analyses on retrieved data Federate distributed databases –Describe queries for multi databases in one unit Federate catalogs (tables) and images –Need not to discriminate catalogs and images

3 IVOA Interoperalibity 20033 Requirement for JVOQL Platform independent –VO will be constructed as heterogeneous system –Query must be transferable among systems Sufficient to describe astronomical queries –QL must describe what astronomers want to do Easy to understand for human and machine –Necessary for debugging and programming

4 IVOA Interoperalibity 20034 Format of JVOQL JVOQL adopted SQL as a base language –SQL is a well-defined query language optimized for relational database –SQL is easy to understand for human and machine –Backend queries can be done by DBMS Astronomy specific functions are defined as extensions for SQL –SQL is not sufficient enough for astronomical queries XMATCH (Cross Matching) AREA (Image cutout / Celestial area limit)

5 IVOA Interoperalibity 20035 Extension 1 : Cross-Matching Astronomical objects will be identified mainly based on its celestial position (and distance from the earth). Distributed databases can be related through celestial positions. Similar to ‘join’ in SQL –where A.id = B.id –where XMATCH(A, B) < 3 arcsec

6 IVOA Interoperalibity 20036 XMATCH XMATCH(A, B, !C, …) < 3 arcsec –Select objects whose celestial positions in catalog A and catalog B coincide within the tolerance of 3 arcsec but not found in catalog C. Catalog ACatalog B Catalog C

7 IVOA Interoperalibity 20037 Extension 2 : Image cutout In most cases, astronomers request images associated with objects selected from catalogs. –Cutout area will be defined as celestial area. Celestial area definition can be used to limit searching celestial area. Image cutout can be easily expressed like SQL –select A.ra, A.dec, A.BOX(POINT(A.ra, A.dec, J2000), 3 arcmin, 3 arcmin)

8 IVOA Interoperalibity 20038 AREA POINT(long, lat, coord) will define a point on the celestial sphere. –coord could be J2000, B1950, GAL, … AREA will be defined based on POINT –BOX(POINT(…), width, height[, PA]) CIRCLE(POINT(…), radius) OVAL(POINT(…), rad1, rad2[, PA]) TRIANGLE(POINT(…), POINT(…), POINT(…))

9 IVOA Interoperalibity 20039 Sample Query create view myEROtable as select s.ra, s.dec, s.Rmag, t.Kmag, sr.BOX(POINT(s.ra, s.dec, J2000), 1 arcmin, 1 arcmin) as Rimage, tk.BOX(POINT(s.ra, s.dec, J2000), 1 arcmin, 1 arcmin) as Kimage from SUBARU s, 2MASS t, SUBARU.R sr, 2MASS.K tk where XMATCH(s,t) < 3 arcsec and (s.Rmag-t.Kmag) > 6 mag and BOX(POINT(201.0 deg, 27.4 deg, J2000), 1 deg, 1 deg)

10 IVOA Interoperalibity 200310 Sample Query create view myEROtable as select s.ra, s.dec, s.Rmag, t.Kmag, sr.BOX(POINT(s.ra, s.dec, J2000), 1 arcmin, 1 arcmin) as Rimage, tk.BOX(POINT(s.ra, s.dec, J2000), 1 arcmin, 1 arcmin) as Kimage from SUBARU s, 2MASS t, SUBARU.R sr, 2MASS.K tk where XMATCH(s,t) < 3 arcsec and (s.Rmag-t.Kmag) > 6 mag and BOX(POINT(201.0 deg, 27.4 deg, J2000), 1 deg, 1 deg) common constraint multiple DB constraints

11 IVOA Interoperalibity 200311 select count(*) from SUBARU s where BOX(POINT(201.0, 27.4, J2000), 1.0, 1.0) select count(*) from 2MASS t Where BOX(POINT(201.0, 27.4, J2000), 1.0, 1.0) count 1 count 2 First count the number of objects which satisfies common constraints According to the counts, server access sequence will determined count 1count 2 > 2MASS SUBARU count 1count 2 < 2MASS SUBARU

12 IVOA Interoperalibity 200312 select s.ra, s.dec, s.Rmag from SUBARU s where BOX(POINT(201.0, 27.4, J2000), 1.0, 1.0) select t.Kmag from 2MASS t where XMATCH(s,t) < 3 arcsec and (s.Rmag-t.Kmag) > 6 mag select sr.BOX(POINT(s.ra, s.dec, J2000),…) as Rimage from SUBARU.R sr select tk.BOX(POINT(s.ra, s.dec, J2000),…) as Kimage from 2MASS.K tk Output Table A Output Table B Output Table C Result Table

13 IVOA Interoperalibity 200313 Extension of AREA Usual queries are for catalogs There is a need for query for area like –Search for area where V band, I band, and K band observations are available. –Search for area where observed in B band more than 3 times and their intervals are more than 1 month. –… These queries will expand the usefulness of astronomical data archives.

14 IVOA Interoperalibity 200314 Sample Queries select s.a, t.a,... from SUBARU.R s, 2MASS.K t,... where (s.AREA() OVERLAP t.AREA()) as a select x.a, y.a from SUBARU.B x, SUBARU.B y where (DIFF(x.obs_date, Y.obs_date) > 30 days) and (s.AREA() OVERLAP t.AREA())) as a

15 IVOA Interoperalibity 200315 s.AREA()t.AREA() AREA info OVERLAP cutout request Divide into pieces st a1 a2 a3


Download ppt "IVOA Interoperalibity 20031 JVO Query Language Naoki Yasuda (NAOJ/Japanese VO)"

Similar presentations


Ads by Google