ESASkyClass¶
-
class
astroquery.esasky.
ESASkyClass
[source]¶ Bases:
astroquery.query.BaseQuery
Attributes Summary
DEFAULT_ROW_LIMIT
TIMEOUT
URLbase
Methods Summary
get_images
(position[, radius, missions, …])This method gets the fits files available for the selected position and mission and downloads all maps to the the selected folder. get_maps
(query_table_list[, missions, …])This method takes the dictionary of missions and metadata as returned by query_region_maps and downloads all maps to the selected folder. list_catalogs
()Get a list of the mission names of the available catalogs in ESASky list_maps
()Get a list of the mission names of the available observations in ESASky query_object_catalogs
(position[, catalogs, …])This method queries a chosen object or coordinate for all available catalogs and returns a TableList with all the found catalogs metadata for the chosen missions and object. query_object_maps
(position[, missions, …])This method queries a chosen object or coordinate for all available maps which have observation data on the chosen position. query_region_catalogs
(position, radius[, …])This method queries a chosen region for all available catalogs and returns a TableList with all the found catalogs metadata for the chosen missions and region. query_region_maps
(position, radius[, …])This method queries a chosen region for all available maps and returns a TableList with all the found maps metadata for the chosen missions and region. Attributes Documentation
-
DEFAULT_ROW_LIMIT
= 10000¶
-
TIMEOUT
= 1000¶
-
URLbase
= 'http://sky.esa.int/esasky-tap'¶
Methods Documentation
-
get_images
(position, radius='0 arcmin', missions='all', download_dir='Maps', cache=True)[source]¶ This method gets the fits files available for the selected position and mission and downloads all maps to the the selected folder. The method returns a dictionary which is divided by mission. All mission except Herschel returns a list of HDULists. For Herschel each item in the list is a dictionary where the used filter is the key and the HDUList is the value.
Parameters: position : str or
astropy.coordinates
objectCan either be a string of the location, eg ‘M51’, or the coordinates of the object.
radius : str or
Quantity
, optionalThe radius of a region. Defaults to 0.
missions : string or list, optional
Can be either a specific mission or a list of missions (all mission names are found in list_missions()) or ‘all’ to search in all missions. Defaults to ‘all’.
download_dir : string, optional
The folder where all downloaded maps should be stored. Defaults to a folder called ‘Maps’ in the current working directory.
cache : bool, optional
When set to True the method will use a cache located at .astropy/astroquery/cache. Defaults to True.
Returns: maps :
dict
All mission except Herschel returns a list of HDULists. For Herschel each item in the list is a dictionary where the used filter is the key and the HDUList is the value. It is structured in a dictionary like this: dict: { ‘HERSCHEL’: [{‘70’: [HDUList], ‘160’: [HDUList]}, {‘70’: [HDUList], ‘160’: [HDUList]}, …], ‘HST’:[[HDUList], [HDUList], [HDUList], [HDUList], [HDUList], …], ‘XMM-EPIC’ : [[HDUList], [HDUList], [HDUList], [HDUList], …] … }
Examples
get_images(“m101”, “14’”, “all”)
-
get_maps
(query_table_list, missions='all', download_dir='Maps', cache=True)[source]¶ This method takes the dictionary of missions and metadata as returned by query_region_maps and downloads all maps to the selected folder. The method returns a dictionary which is divided by mission. All mission except Herschel returns a list of HDULists. For Herschel each item in the list is a dictionary where the used filter is the key and the HDUList is the value.
Parameters: query_table_list :
TableList
or dict or list of (name,Table
) pairsA TableList or dict or list of name and Table pairs with all the missions wanted and their respective metadata. Usually the return value of query_region_maps.
missions : string or list, optional
Can be either a specific mission or a list of missions (all mission names are found in list_missions()) or ‘all’ to search in all missions. Defaults to ‘all’.
download_dir : string, optional
The folder where all downloaded maps should be stored. Defaults to a folder called ‘Maps’ in the current working directory.
cache : bool, optional
When set to True the method will use a cache located at .astropy/astroquery/cache. Defaults to True.
Returns: maps :
dict
All mission except Herschel returns a list of HDULists. For Herschel each item in the list is a dictionary where the used filter is the key and the HDUList is the value. It is structured in a dictionary like this: dict: { ‘HERSCHEL’: [{‘70’: [HDUList], ‘160’: [HDUList]}, {‘70’: [HDUList], ‘160’: [HDUList]}, …], ‘HST’:[[HDUList], [HDUList], [HDUList], [HDUList], [HDUList], …], ‘XMM-EPIC’ : [[HDUList], [HDUList], [HDUList], [HDUList], …] … }
Examples
get_maps(query_region_catalogs(“m101”, “14’”, “all”))
-
query_object_catalogs
(position, catalogs='all', row_limit=10000, get_query_payload=False, cache=True)[source]¶ This method queries a chosen object or coordinate for all available catalogs and returns a TableList with all the found catalogs metadata for the chosen missions and object. To account for errors in telescope position, the method will look for any sources within a radius of 5 arcsec of the chosen position.
Parameters: position : str or
astropy.coordinates
objectCan either be a string of the location, eg ‘M51’, or the coordinates of the object.
catalogs : string or list, optional
Can be either a specific catalog or a list of catalogs (all catalog names are found in list_catalogs()) or ‘all’ to search in all catalogs. Defaults to ‘all’.
row_limit : int, optional
Determines how many rows that will be fetched from the database for each mission. Can be -1 to select maximum (currently 100 000). Defaults to 10000.
get_query_payload : bool, optional
When set to True the method returns the HTTP request parameters. Defaults to False.
cache : bool, optional
When set to True the method will use a cache located at .astropy/astroquery/cache. Defaults to True.
Returns
——-
table_list :
TableList
Each mission returns a
Table
with the metadata of the catalogs available for the chosen mission and object. It is structured in a TableList like this: TableList with 8 tables: ‘0:Gaia DR1 TGA’ with 8 column(s) and 25 row(s) ‘1:HSC’ with 8 column(s) and 75 row(s)Examples
query_object_catalogs(“m101”, “all”)
query_object_catalogs(“265.05, 69.0”, “Gaia DR1 TGA”) query_object_catalogs(“265.05, 69.0”, [“Gaia DR1 TGA”, “HSC”])
-
query_object_maps
(position, missions='all', get_query_payload=False, cache=True)[source]¶ This method queries a chosen object or coordinate for all available maps which have observation data on the chosen position. It returns a TableList with all the found maps metadata for the chosen missions and object.
Parameters: position : str or
astropy.coordinates
objectCan either be a string of the location, eg ‘M51’, or the coordinates of the object.
missions : string or list, optional
Can be either a specific mission or a list of missions (all mission names are found in list_missions()) or ‘all’ to search in all missions. Defaults to ‘all’.
get_query_payload : bool, optional
When set to True the method returns the HTTP request parameters. Defaults to False.
cache : bool, optional
When set to True the method will use a cache located at .astropy/astroquery/cache. Defaults to True.
Returns: table_list :
TableList
Each mission returns a
Table
with the metadata and observations available for the chosen missions and object. It is structured in a TableList like this: TableList with 8 tables: ‘0:HERSCHEL’ with 8 column(s) and 25 row(s) ‘1:HST’ with 8 column(s) and 735 row(s)Examples
query_object_maps(“m101”, “all”)
query_object_maps(“265.05, 69.0”, “Herschel”) query_object_maps(“265.05, 69.0”, [“Herschel”, “HST”])
-
query_region_catalogs
(position, radius, catalogs='all', row_limit=10000, get_query_payload=False, cache=True)[source]¶ This method queries a chosen region for all available catalogs and returns a TableList with all the found catalogs metadata for the chosen missions and region.
Parameters: position : str or
astropy.coordinates
objectCan either be a string of the location, eg ‘M51’, or the coordinates of the object.
radius : str or
Quantity
The radius of a region.
catalogs : string or list, optional
Can be either a specific catalog or a list of catalogs (all catalog names are found in list_catalogs()) or ‘all’ to search in all catalogs. Defaults to ‘all’.
row_limit : int, optional
Determines how many rows that will be fetched from the database for each mission. Can be -1 to select maximum (currently 100 000). Defaults to 10000.
get_query_payload : bool, optional
When set to True the method returns the HTTP request parameters. Defaults to False.
cache : bool, optional
When set to True the method will use a cache located at .astropy/astroquery/cache. Defaults to True.
Returns: table_list :
TableList
Each mission returns a
Table
with the metadata of the catalogs available for the chosen mission and region. It is structured in a TableList like this: TableList with 8 tables: ‘0:Gaia DR1 TGA’ with 8 column(s) and 25 row(s) ‘1:HSC’ with 8 column(s) and 75 row(s)Examples
query_region_catalogs(“m101”, “14’”, “all”)
import astropy.units as u query_region_catalogs(“265.05, 69.0”, 14*u.arcmin, “Gaia DR1 TGA”) query_region_catalogs(“265.05, 69.0”, 14*u.arcmin, [“Gaia DR1 TGA”, “HSC”])
-
query_region_maps
(position, radius, missions='all', get_query_payload=False, cache=True)[source]¶ This method queries a chosen region for all available maps and returns a TableList with all the found maps metadata for the chosen missions and region.
Parameters: position : str or
astropy.coordinates
objectCan either be a string of the location, eg ‘M51’, or the coordinates of the object.
radius : str or
Quantity
The radius of a region.
missions : string or list, optional
Can be either a specific mission or a list of missions (all mission names are found in list_missions()) or ‘all’ to search in all missions. Defaults to ‘all’.
get_query_payload : bool, optional
When set to True the method returns the HTTP request parameters. Defaults to False.
cache : bool, optional
When set to True the method will use a cache located at .astropy/astroquery/cache. Defaults to True.
Returns: table_list :
TableList
Each mission returns a
Table
with the metadata and observations available for the chosen missions and region. It is structured in a TableList like this: TableList with 8 tables: ‘0:HERSCHEL’ with 8 column(s) and 25 row(s) ‘1:HST’ with 8 column(s) and 735 row(s)Examples
query_region_maps(“m101”, “14’”, “all”)
import astropy.units as u query_region_maps(“265.05, 69.0”, 14*u.arcmin, “Herschel”) query_region_maps(“265.05, 69.0”, [“Herschel”, “HST”])
-