IrsaDustClass¶
-
class
astroquery.irsa_dust.IrsaDustClass[source]¶ Bases:
astroquery.query.BaseQueryAttributes Summary
DUST_SERVICE_URLTIMEOUTimage_type_to_sectionMethods Summary
extract_image_urls(raw_xml[, image_type])Extracts the image URLs from the query results and returns these as a list. get_extinction_table(coordinate[, radius, …])Query function that fetches the extinction table from the query result. get_extinction_table_async(coordinate[, …])A query function similar to astroquery.irsa_dust.IrsaDustClass.get_extinction_tablebut returns a file-handler to the remote files rather than downloading it.get_image_list(coordinate[, radius, …])Query function that performs coordinate-based query and returns a list of URLs to the Irsa-Dust images. get_images(coordinate[, radius, image_type, …])A query function that performs a coordinate-based query to acquire Irsa-Dust images. get_images_async(coordinate[, radius, …])A query function similar to astroquery.irsa_dust.IrsaDustClass.get_imagesbut returns file-handlers to the remote files rather than downloading them.get_query_table(coordinate[, radius, …])Create and return an Tablerepresenting the query response(s).list_image_types()Returns a list of image_types available in the Irsa Dust query results Attributes Documentation
-
DUST_SERVICE_URL= 'https://irsa.ipac.caltech.edu/cgi-bin/DUST/nph-dust'¶
-
TIMEOUT= 30¶
-
image_type_to_section= {'100um': 'e', 'ebv': 'r', 'temperature': 't'}¶
Methods Documentation
-
extract_image_urls(raw_xml, image_type=None)[source]¶ Extracts the image URLs from the query results and returns these as a list. If section is missing or
'all'returns all the URLs, otherwise returns URL corresponding to the section specified ('emission','reddening','temperature').Parameters: raw_xml : str
XML response returned by the query as a string
image_type : str, optional
When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of
'temperature','ebv','100um'. Defaults toNone.Returns: url_list : list
list of URLs to images extracted from query results.
-
get_extinction_table(coordinate, radius=None, timeout=30, show_progress=True)[source]¶ Query function that fetches the extinction table from the query result.
Parameters: coordinate : str
Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.
radius : str /
Quantity, optionalThe size of the region to include in the dust query, in radian, degree or hour as per format specified by
AngleorQuantity. Defaults to 5 degrees.timeout : int, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT.Returns: table :
Table
-
get_extinction_table_async(coordinate, radius=None, timeout=30, show_progress=True)[source]¶ A query function similar to
astroquery.irsa_dust.IrsaDustClass.get_extinction_tablebut returns a file-handler to the remote files rather than downloading it. Useful for asynchronous queries so that the actual download may be performed later.Parameters: coordinate : str
Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.
radius : str, optional
The size of the region to include in the dust query, in radian, degree or hour as per format specified by
Angle. Defaults to 5 degrees.timeout : int, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT.Returns: result : A context manager that yields a file like readable object.
-
get_image_list(coordinate, radius=None, image_type=None, timeout=30)[source]¶ Query function that performs coordinate-based query and returns a list of URLs to the Irsa-Dust images.
Parameters: coordinate : str
Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.
radius : str /
Quantity, optionalThe size of the region to include in the dust query, in radian, degree or hour as per format specified by
AngleorQuantity. Defaults to 5 degrees.image_type : str, optional
When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of
'temperature','ebv','100um'. Defaults toNone.timeout : int, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT.get_query_payload : bool
Returns: url_list : list
A list of URLs to the FITS images corresponding to the queried object.
-
get_images(coordinate, radius=None, image_type=None, timeout=30, get_query_payload=False, show_progress=True)[source]¶ A query function that performs a coordinate-based query to acquire Irsa-Dust images.
Parameters: coordinate : str
Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.
radius : str /
Quantity, optionalThe size of the region to include in the dust query, in radian, degree or hour as per format specified by
AngleorQuantity. Defaults to 5 degrees.image_type : str, optional
When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of
'temperature','ebv','100um'. Defaults toNone.timeout : int, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT.get_query_payload : bool, optional
Returns: A list of
HDUListobjects
-
get_images_async(coordinate, radius=None, image_type=None, timeout=30, get_query_payload=False, show_progress=True)[source]¶ A query function similar to
astroquery.irsa_dust.IrsaDustClass.get_imagesbut returns file-handlers to the remote files rather than downloading them. Useful for asynchronous queries so that the actual download may be performed later.Parameters: coordinate : str
Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.
radius : str /
Quantity, optionalThe size of the region to include in the dust query, in radian, degree or hour as per format specified by
AngleorQuantity. Defaults to 5 degrees.image_type : str, optional
When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of
'temperature','ebv','100um'. Defaults toNone.timeout : int, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT.get_query_payload : bool, optional
Returns: list : list
A list of context-managers that yield readable file-like objects.
-
get_query_table(coordinate, radius=None, section=None, timeout=30, url='https://irsa.ipac.caltech.edu/cgi-bin/DUST/nph-dust')[source]¶ Create and return an
Tablerepresenting the query response(s).When
sectionis missing, returns the full table. When a section is specified ('location','temperature','ebv', or'100um'), only that portion of the table is returned.Parameters: coordinate : str
Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.
radius : str /
Quantity, optionalThe size of the region to include in the dust query, in radian, degree or hour as per format specified by
AngleorQuantity. Defaults to 5 degrees.section : str, optional
When missing, all the sections of the query result are returned. Otherwise only the specified section (
'ebv','100um','temperature','location') is returned. Defaults toNone.timeout : int, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT.url : str, optional
Only provided for debugging. Should generally not be assigned. Defaults to
DUST_SERVICE_URL.Returns: table :
TableTable representing the query results, (all or as per specified).
-