NGVS query documentation

Back to the query page
MegaPipe catalogue documentation
Aperture corrected catalogue documentation
THELI photometric catalogue documentation
Back to the NGVS Graphical Search Tool
Basic Usage
Setting the query: Use the check boxes to select which columns to return. Apply constraints on any column using the entry boxes. Use the positional constraint boxes if you want restrict the search to a smaller area. Use magnitude limit, masking and field criteria. It's usually best to test a query with "Max rows" set to a small number, then switch to unlimited rows once you're sure you've got the constraints right.

Synchronous vs. Asynchronous queries: For small queries, restricted in position, only returning a hundred thousand rows or less, synchronous queries are fine. Just hit submit and wait a few seconds for the results. The results will show up directly in your browser. However, the NGVS database contains 22 million sources with 195 parameters recorded for each object; if your query will return a significant fraction of the database, the query will take up to an hour to complete. The connection between your broswer and the CADC server will probably be lost. In this case, you are probably better off using the asynchronous queries. In this the case, your query will be executed as before but the webpage returned will just indicate that the query is running until it completes, when it will give you a link to the location of the results in the NGVS queries VOspace. Only NGVS members can view this page; you will need your CADC username and password. The results file will perist there for at least a week. Note that for asynchronus queries, the only return formats available are TSV, CSV, and VOTables. If you lose track of your query, it will end up here with a file name that is a combination of your username and the time (UTC) when you submitted the query. For example: sgwyn_2012-07-12T20:38:03.tsv

Advanced Usage
Setting the query: As you fill out the query page form, you will notice that the text in the query box changes. You can also modify the text directly for a higher degree of customization. As well as selecting individual columns you can select combinations of columns: G_MAG_AUTO-R_MAG_AUTO for example. The query language is the Astronomical Data Query Language or ADQL which was developed by the IVOA. It's very similiar to SQL with a few additions. The only caveat concerning setting the query manually is that if you modify the query manually first, and then use the various checkboxes and fields on the web page, it will overwrite your edits.

Executing multiple queries: If you click submit from the web page, you should get back the results. For one-off queries, this is fine. However you want to execute multiple (small) queries, you may want to execute the queries from a script. You can modify the query by changing the part of the URL after "query=" to set an arbitrary query (remember to encode the special characters). In synchronous mode, GETs to that URL should work. Remember that NGVS data is proprietary; you will need to include your CADC username and password in the script.

Behind the scenes
Table Access Protocol (TAP): This is the VO standard for accessing tables. All the of the NGVS query pages are running TAP for you behind the scenes. However feel free to bypass them and access the table cfht.ngvs directly. The table is proprierary to the NGVS group; you will need to authenticate with a certificate or a username/password. Documention for TAP in general can be found here. Details of the implementation at the CADC can be found here.

Astronomical Data Query Language (ADQL): The query language used by TAP is ADQL. As mentioned before, ADQL is based on SQL, special restrictions and extensions to SQL92 have been defined in order to support generic and astronomy specific operations. The full details of ADQL can be found here.

Universal Worker Service (UWS): In asynchronous mode, TAP uses UWS to monitor the progress of the query. More documentation for UWS is available here

 

Send comments/suggestions/problems to
Stephen.Gwyn@nrc.ca