IrsaDustClass¶
- class astroquery.ipac.irsa.irsa_dust.IrsaDustClass[source]¶
Bases:
BaseQuery
Attributes Summary
Methods 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.ipac.irsa.irsa_dust.IrsaDustClass.get_extinction_table
but 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.ipac.irsa.irsa_dust.IrsaDustClass.get_images
but returns file-handlers to the remote files rather than downloading them.get_query_table
(coordinate[, radius, ...])Create and return an
Table
representing the query response(s).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_xmlstr
XML response returned by the query as a string
- image_typestr, 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_listlist
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:
- coordinatestr
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.
- radiusstr /
Quantity
, optional The size of the region to include in the dust query, in radian, degree or hour as per format specified by
Angle
orQuantity
. Defaults to 5 degrees.- timeoutint, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT
.
- Returns:
- table
Table
- table
- get_extinction_table_async(coordinate, radius=None, timeout=30, show_progress=True)[source]¶
A query function similar to
astroquery.ipac.irsa.irsa_dust.IrsaDustClass.get_extinction_table
but 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:
- coordinatestr
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.
- radiusstr, 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.- timeoutint, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT
.
- Returns:
- resultA 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:
- coordinatestr
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.
- radiusstr /
Quantity
, optional The size of the region to include in the dust query, in radian, degree or hour as per format specified by
Angle
orQuantity
. Defaults to 5 degrees.- image_typestr, 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
.- timeoutint, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT
.- get_query_payloadbool
If
True
then returns the dictionary of query parameters, posted to remote server. Defaults toFalse
.
- Returns:
- url_listlist
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:
- coordinatestr
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.
- radiusstr /
Quantity
, optional The size of the region to include in the dust query, in radian, degree or hour as per format specified by
Angle
orQuantity
. Defaults to 5 degrees.- image_typestr, 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
.- timeoutint, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT
.- get_query_payloadbool, optional
If
True
then returns the dictionary of query parameters, posted to remote server. Defaults toFalse
.
- Returns:
- A list of
HDUList
objects
- A list of
- 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.ipac.irsa.irsa_dust.IrsaDustClass.get_images
but 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:
- coordinatestr
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.
- radiusstr /
Quantity
, optional The size of the region to include in the dust query, in radian, degree or hour as per format specified by
Angle
orQuantity
. Defaults to 5 degrees.- image_typestr, 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
.- timeoutint, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT
.- get_query_payloadbool, optional
If
True
then returns the dictionary of query parameters, posted to remote server. Defaults toFalse
.
- Returns:
- listlist
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
Table
representing the query response(s).When
section
is missing, returns the full table. When a section is specified ('location'
,'temperature'
,'ebv'
, or'100um'
), only that portion of the table is returned.- Parameters:
- coordinatestr
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.
- radiusstr /
Quantity
, optional The size of the region to include in the dust query, in radian, degree or hour as per format specified by
Angle
orQuantity
. Defaults to 5 degrees.- sectionstr, 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
.- timeoutint, optional
Time limit for establishing successful connection with remote server. Defaults to
TIMEOUT
.- urlstr, optional
Only provided for debugging. Should generally not be assigned. Defaults to
DUST_SERVICE_URL
.
- Returns:
- table
Table
Table representing the query results, (all or as per specified).
- table