GaiaClass¶
-
class
astroquery.gaia.
GaiaClass
(tap_plus_handler=None)[source]¶ Bases:
object
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+ launch_job
(query[, name, output_file, …])Launches a synchronous job TAP & TAP+ launch_job_async
(query[, name, output_file, …])Launches an asynchronous job TAP & TAP+ list_async_jobs
([verbose])Returns all the asynchronous jobs TAP & TAP+ load_async_job
([jobid, name, verbose])Loads an asynchronous job TAP & TAP+ load_table
(table[, verbose])Loads the specified table TAP+ only load_tables
([only_names, …])Loads all public tables TAP & TAP+ login
([user, password, credentials_file, …])Performs a login. login_gui
([verbose])Performs a login using a GUI dialog TAP+ only logout
([verbose])Performs a logout TAP+ only query_object
(coordinate[, radius, width, …])Launches a job TAP & TAP+ query_object_async
(coordinate[, radius, …])Launches a job (async) TAP & TAP+ remove_jobs
(jobs_list[, verbose])Removes the specified jobs TAP+ save_results
(job[, verbose])Saves job results TAP & TAP+ search_async_jobs
([jobfilter, verbose])Searches for jobs applying the specified filter TAP+ only Attributes Documentation
-
MAIN_GAIA_TABLE
= 'gaiadr2.gaia_source'¶
-
MAIN_GAIA_TABLE_DEC
= 'dec'¶
-
MAIN_GAIA_TABLE_RA
= 'ra'¶
Methods Documentation
-
cone_search
(coordinate, radius=None, output_file=None, output_format='votable', verbose=False, dump_to_file=False)[source]¶ Cone search sorted by distance (sync.) TAP & TAP+
Parameters: coordinate : astropy.coordinate, mandatory
coordinates center point
radius : astropy.units, mandatory
radius
output_file : str, 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_format : str, optional, default ‘votable’
results format
verbose : bool, optional, default ‘False’
flag to display information about the process
dump_to_file : bool, 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, background=False, output_file=None, output_format='votable', verbose=False, dump_to_file=False)[source]¶ Cone search sorted by distance (async) TAP & TAP+
Parameters: coordinate : astropy.coordinate, mandatory
coordinates center point
radius : astropy.units, mandatory
radius
background : bool, optional, default ‘False’
when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available
output_file : str, 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_format : str, optional, default ‘votable’
results format
verbose : bool, optional, default ‘False’
flag to display information about the process
dump_to_file : bool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
Returns: A Job object
-
launch_job
(query, name=None, output_file=None, output_format='votable', verbose=False, dump_to_file=False, upload_resource=None, upload_table_name=None)[source]¶ Launches a synchronous job TAP & TAP+
Parameters: query : str, mandatory
query to be executed
output_file : str, 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_format : str, optional, default ‘votable’
results format
verbose : bool, optional, default ‘False’
flag to display information about the process
dump_to_file : bool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
upload_resource: str, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
upload_table_name: str, required if uploadResource is provided, default None
resource temporary table name associated to the uploaded resource
Returns: A Job object
-
launch_job_async
(query, name=None, output_file=None, output_format='votable', verbose=False, dump_to_file=False, background=False, upload_resource=None, upload_table_name=None)[source]¶ Launches an asynchronous job TAP & TAP+
Parameters: query : str, mandatory
query to be executed
output_file : str, 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_format : str, optional, default ‘votable’
results format
verbose : bool, optional, default ‘False’
flag to display information about the process
dump_to_file : bool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
background : bool, optional, default ‘False’
when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available
upload_resource: str, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
upload_table_name: str, required if uploadResource is provided, default None
resource temporary table name associated to the uploaded resource
Returns: A Job object
-
list_async_jobs
(verbose=False)[source]¶ Returns all the asynchronous jobs TAP & TAP+
Parameters: verbose : bool, optional, default ‘False’
flag to display information about the process
Returns: A list of Job objects
-
load_async_job
(jobid=None, name=None, verbose=False)[source]¶ Loads an asynchronous job TAP & TAP+
Parameters: jobid : str, mandatory if no name is provided, default None
job identifier
name : str, mandatory if no jobid is provided, default None
job name
verbose : bool, optional, default ‘False’
flag to display information about the process
Returns: A Job object
-
load_table
(table, verbose=False)[source]¶ Loads the specified table TAP+ only
Parameters: table : str, mandatory
full qualified table name (i.e. schema name + table name)
verbose : bool, optional, default ‘False’
flag to display information about the process
Returns: A table object
-
load_tables
(only_names=False, include_shared_tables=False, verbose=False)[source]¶ Loads all public tables TAP & TAP+
Parameters: only_names : bool, TAP+ only, optional, default ‘False’
True to load table names only
include_shared_tables : bool, TAP+, optional, default ‘False’
True to include shared tables
verbose : bool, optional, default ‘False’
flag to display information about the process
Returns: A list of table objects
-
login
(user=None, password=None, credentials_file=None, verbose=False)[source]¶ Performs a login. TAP+ only User and password can be used or a file that contains user name and password (2 lines: one for user name and the following one for the password)
Parameters: user : str, mandatory if ‘file’ is not provided, default None
login name
password : str, mandatory if ‘file’ is not provided, default None
user password
credentials_file : str, mandatory if no ‘user’ & ‘password’ are provided
file containing user and password in two lines
verbose : bool, optional, default ‘False’
flag to display information about the process
-
login_gui
(verbose=False)[source]¶ Performs a login using a GUI dialog TAP+ only
Parameters: verbose : bool, optional, default ‘False’
flag to display information about the process
-
logout
(verbose=False)[source]¶ Performs a logout TAP+ only
Parameters: verbose : bool, optional, default ‘False’
flag to display information about the process
-
query_object
(coordinate, radius=None, width=None, height=None, verbose=False)[source]¶ Launches a job TAP & TAP+
Parameters: coordinate : astropy.coordinates, mandatory
coordinates center point
radius : astropy.units, required if no ‘width’ nor ‘height’ are provided
radius (deg)
width : astropy.units, required if no ‘radius’ is provided
box width
height : astropy.units, required if no ‘radius’ is provided
box height
verbose : bool, 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: coordinate : astropy.coordinates, mandatory
coordinates center point
radius : astropy.units, required if no ‘width’ nor ‘height’ are provided
radius
width : astropy.units, required if no ‘radius’ is provided
box width
height : astropy.units, required if no ‘radius’ is provided
box height
async_job : bool, optional, default ‘False’
executes the query (job) in asynchronous/synchronous mode (default synchronous)
verbose : bool, optional, default ‘False’
flag to display information about the process
Returns: The job results (astropy.table).
-
remove_jobs
(jobs_list, verbose=False)[source]¶ Removes the specified jobs TAP+
Parameters: jobs_list : str, mandatory
jobs identifiers to be removed
verbose : bool, optional, default ‘False’
flag to display information about the process
-
save_results
(job, verbose=False)[source]¶ Saves job results TAP & TAP+
Parameters: job : Job, mandatory
job
verbose : bool, optional, default ‘False’
flag to display information about the process
-
search_async_jobs
(jobfilter=None, verbose=False)[source]¶ Searches for jobs applying the specified filter TAP+ only
Parameters: jobfilter : JobFilter, optional, default None
job filter
verbose : bool, optional, default ‘False’
flag to display information about the process
Returns: A list of Job objects
-