Developer’s corner

Documentation for

Requirements: in order to be able to use find_gaia_dr2, you must first download and retrieve python-cdsclient, as instructed on this page.

All options can be retrieved typing -h

The sections below give some examples for the most common usages.

Query by spatial constraints

Query by cone (around a position)

You can query around an ICRS position written in sexagesimal:

./ -r 100 "05 35 17.299 -05 23 28.00"

The -r option sets the search radius in arcsec

Position can also be given in decimal degrees:

./ -r 1000 56.75 +24.1167"

By default, only the first 100 matching rows are returned. This can be changed with the -m option:

./ -m 1500 -r 1000 56.75 +24.1167"

Query around an object name

You can also provide with an object name, that will be converted to a position by the Sesame service. The following query will output Gaia DR2 sources around Messier 13:

./ -r 240 Messier 13

Query by HEALPix pixel

If you want to retrieve data for a given HEALPix pixel (in ICRS coordinates frame, in the NESTED scheme), use the --ipix=<NORDER:NPIX> option.

./ --ipix 9:12345

will retrieve the data for the pixel #12345 at NORDER 9.

Query by source ID

./ --source_id=3403771275824689024

will retrieve the data for the source Gaia DR2 3403771275824689024

By default, only the VizieR default columns are displayed. The -a flag allows one to retrieve all columns:

./ -a --source_id=3403771275824689024

Set a constraint on some columns

You can put some constraints on all the indexed columns, using the following options:


For instance, to retrieve sources with a parallax greater than 2mas:

./ --parallax=">2"

Default format is ascii, this can be changed to tsv or votable using the --format flag:

./ --format tsv --parallax=">2"

Retrieve unformatted data

By default, floating numbers data are formatted according to the format defined in VizieR ReadMe.
If you wish to retrieve unformatted data, with full decimal precision, you can use the --no-format option

This option is only available when querying by position or by HEALPix pixel. Example:

./ --ipix 9:12345 --no-format
cdsclient/doc-find_gaia_dr2.txt · Last modified: 2018/04/25 11:25 by Thomas Boch

Thanks for acknowledging the CDS developer’s resources (libraries, source code, etc.)

© Université de Strasbourg/CNRS

    • Contact