GaiaClass

class astroquery.gaia.GaiaClass(tap_plus_conn_handler=None, datalink_handler=None)[source]

Bases: astroquery.utils.tap.TapPlus

Proxy class to default TapPlus object (pointing to Gaia Archive)

Attributes Summary

MAIN_GAIA_TABLE

MAIN_GAIA_TABLE_DEC

MAIN_GAIA_TABLE_RA

Methods Summary

cone_search(coordinate[, radius, …])

Cone search sorted by distance (sync.) TAP & TAP+

cone_search_async(coordinate[, radius, …])

Cone search sorted by distance (async) TAP & TAP+

cross_match([full_qualified_table_name_a, …])

Performs a cross match between the specified tables The result is a join table (stored in the user storage area) with the identifies of both tables and the distance.

get_datalinks(ids[, verbose])

Gets datalinks associated to the provided identifiers TAP+ only

load_data(ids[, retrieval_type, valid_data, …])

Loads the specified table TAP+ only

load_user(user_id[, verbose])

Loads the specified user TAP+ only

query_object(coordinate[, radius, width, …])

Launches a job TAP & TAP+

query_object_async(coordinate[, radius, …])

Launches a job (async) TAP & TAP+

Attributes Documentation

MAIN_GAIA_TABLE = 'gaiadr2.gaia_source'
MAIN_GAIA_TABLE_DEC = 'dec'
MAIN_GAIA_TABLE_RA = 'ra'

Methods Documentation

Cone search sorted by distance (sync.) TAP & TAP+

Parameters
coordinateastropy.coordinate, mandatory

coordinates center point

radiusastropy.units, mandatory

radius

table_namestr, optional, default main gaia table

table name doing the cone search against

ra_column_namestr, optional, default ra column in main gaia table

ra column doing the cone search against

dec_column_namestr, optional, default dec column in main gaia table

dec column doing the cone search against

output_filestr, optional, default None

file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead

output_formatstr, optional, default ‘votable’

results format

verbosebool, optional, default ‘False’

flag to display information about the process

dump_to_filebool, optional, default ‘False’

if True, the results are saved in a file instead of using memory

Returns
A Job object
cone_search_async(coordinate, radius=None, table_name='gaiadr2.gaia_source', ra_column_name='ra', dec_column_name='dec', background=False, output_file=None, output_format='votable', verbose=False, dump_to_file=False)[source]

Cone search sorted by distance (async) TAP & TAP+

Parameters
coordinateastropy.coordinate, mandatory

coordinates center point

radiusastropy.units, mandatory

radius

table_namestr, optional, default main gaia table

table name doing the cone search against

ra_column_namestr, optional, default ra column in main gaia table

ra column doing the cone search against

dec_column_namestr, optional, default dec column in main gaia table

dec column doing the cone search against

backgroundbool, optional, default ‘False’

when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available

output_filestr, optional, default None

file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead

output_formatstr, optional, default ‘votable’

results format

verbosebool, optional, default ‘False’

flag to display information about the process

dump_to_filebool, optional, default ‘False’

if True, the results are saved in a file instead of using memory

Returns
A Job object
cross_match(full_qualified_table_name_a=None, full_qualified_table_name_b=None, results_table_name=None, radius=1.0, background=False, verbose=False)[source]

Performs a cross match between the specified tables The result is a join table (stored in the user storage area) with the identifies of both tables and the distance. TAP+ only

Parameters
full_qualified_table_name_astr, mandatory

a full qualified table name (i.e. schema name and table name)

full_qualified_table_name_bstr, mandatory

a full qualified table name (i.e. schema name and table name)

results_table_namestr, mandatory

a table name without schema. The schema is set to the user one

radiusfloat (arc. seconds), optional, default 1.0

radius (valid range: 0.1-10.0)

verbosebool, optional, default ‘False’

flag to display information about the process

Returns
Boolean indicating if the specified user is valid

Gets datalinks associated to the provided identifiers TAP+ only

Parameters
idsstr list, mandatory

list of identifiers

verbosebool, optional, default ‘False’

flag to display information about the process

Returns
A table object
load_data(ids, retrieval_type='epoch_photometry', valid_data=True, band=None, format='VOTABLE', output_file=None, verbose=False)[source]

Loads the specified table TAP+ only

Parameters
idsstr list, mandatory

list of identifiers

retrieval_typestr, optional, default ‘epoch_photometry’

retrieval type identifier

valid_databool, optional, default True

By default, the epoch photometry service returns only valid data, that is, all data rows where flux is not null and rejected_by_photometry flag is not true. In order to retrieve all data associated to a given source without this filter, this request parameter should be included (valid_data=False)

bandstr, optional, default None, valid values: G, BP, RP

By default, the epoch photometry service returns all the available photometry bands for the requested source. This parameter allows to filter the output lightcurve by its band.

formatstr, optional, default ‘votable’

loading format

output_filestring, optional, default None

file where the results are saved. If it is not provided, the http response contents are returned.

verbosebool, optional, default ‘False’

flag to display information about the process

Returns
A table object
load_user(user_id, verbose=False)[source]

Loads the specified user TAP+ only

Parameters
user_idstr, mandatory

user id to load

verbosebool, optional, default ‘False’

flag to display information about the process

Returns
A user
query_object(coordinate, radius=None, width=None, height=None, verbose=False)[source]

Launches a job TAP & TAP+

Parameters
coordinateastropy.coordinates, mandatory

coordinates center point

radiusastropy.units, required if no ‘width’/’height’ are provided

radius (deg)

widthastropy.units, required if no ‘radius’ is provided

box width

heightastropy.units, required if no ‘radius’ is provided

box height

verbosebool, optional, default ‘False’

flag to display information about the process

Returns
The job results (astropy.table).
query_object_async(coordinate, radius=None, width=None, height=None, verbose=False)[source]

Launches a job (async) TAP & TAP+

Parameters
coordinateastropy.coordinates, mandatory

coordinates center point

radiusastropy.units, required if no ‘width’/’height’ are provided

radius

widthastropy.units, required if no ‘radius’ is provided

box width

heightastropy.units, required if no ‘radius’ is provided

box height

async_jobbool, optional, default ‘False’

executes the query (job) in asynchronous/synchronous mode (default synchronous)

verbosebool, optional, default ‘False’

flag to display information about the process

Returns
The job results (astropy.table).