astroquery:docs

IrsaDust

class astroquery.irsa_dust.core.IrsaDust(*args)[source] [edit on github]

Bases: astroquery.query.BaseQuery

Attributes Summary

DUST_SERVICE_URL str(object=’‘) -> string
TIMEOUT int(x=0) -> int or long
image_type_to_section

Methods Summary

extract_image_urls(*args, **kwds) Extracts the image URLs from the query results and returns these as a list.
get_extinction_table(*args, **kwds) 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 resolveable by NED, SIMBAD, 2MASS, or SWAS.
get_extinction_table_async(*args, **kwds) A query function similar to astroquery.irsa_dust.IrsaDust.get_extinction_table but returns a file-handler to the remote files rather than downloading it.
get_image_list(*args, **kwds) Query function that performes 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 resolveable by NED, SIMBAD, 2MASS, or SWAS.
get_images(*args, **kwds) 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 resolveable by NED, SIMBAD, 2MASS, or SWAS.
get_images_async(*args, **kwds) A query function similar to astroquery.irsa_dust.IrsaDust.get_images but returns file-handlers to the remote files rather than downloading them.
get_query_table(*args, **kwds) Create and return an astropy Table representing the query response(s).
list_image_types(*args, **kwds) Returns a list of image_types available in the Irsa Dust

Attributes Documentation

DUST_SERVICE_URL = 'http://irsa.ipac.caltech.edu/cgi-bin/DUST/nph-dust'
TIMEOUT = 30
image_type_to_section = {'ebv': 'r', 'extinction': 't', '100um': 'e'}

Methods Documentation

static extract_image_urls(*args, **kwds)[source] [edit on github]

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 extinction, ebv, 100um. Defaults to None.

Returns :

url_list : list

list of URLs to images extracted from query results.

static get_extinction_table(*args, **kwds)[source] [edit on github]

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 resolveable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here: http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html

radius : str/astropy.units.Quantity, optional

The size of the region to include in the dust query, in radian, degree or hour as per format specified by astropy.coordinates.Angle or `astropy .units.Quantity. Defaults to 5 degrees.

timeout : int, optional

Time limit for establishing successful connection with remote server. Defaults to astroquery.irsa_dust.IrsaDust.TIMEOUT

Returns :

table : astropy.table.Table

static get_extinction_table_async(*args, **kwds)[source] [edit on github]

A query function similar to astroquery.irsa_dust.IrsaDust.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 :

coordinate : str

Can be either the name of an object or a coordinate string If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here: http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html

radius : str, optional

The size of the region to include in the dust query, in radian, degree or hour as per format specified by astropy.coordinates.Angle. Defaults to 5 degrees.

timeout : int, optional

Time limit for establishing successful connection with remote server. Defaults to astroquery.irsa_dust.IrsaDust.TIMEOUT

Returns :

A context manager that yields a file like readable object :

static get_image_list(*args, **kwds)[source] [edit on github]

Query function that performes 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 resolveable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here: http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html

radius : str/astropy.units.Quantity, optional

The size of the region to include in the dust query, in radian, degree or hour as per format specified by astropy.coordinates.Angle or `astropy .units.Quantity. 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 extinction, ebv, 100um. Defaults to None.

timeout : int, optional

Time limit for establishing successful connection with remote server. Defaults to astroquery.irsa_dust.IrsaDust.TIMEOUT

get_query_payload : bool

If true than returns the dictionary of query parameters, posted to remote server. Defaults to False

Returns :

A list of URLs to the FITS images corresponding to the queried object :

static get_images(*args, **kwds)[source] [edit on github]

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 resolveable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here: http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html.

radius : str/astropy.units.Quantity, optional

The size of the region to include in the dust query, in radian, degree or hour as per format specified by astropy.coordinates.Angle or `astropy .units.Quantity. 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 extinction, ebv, 100um. Defaults to None.

timeout : int, optional

Time limit for establishing successful connection with remote server. Defaults to astroquery.irsa_dust.IrsaDust.TIMEOUT.

get_query_payload : bool, optional

If true than returns the dictionary of query parameters, posted to remote server. Defaults to False.

Returns :

A list of `astropy.fits.HDUList` objects :

static get_images_async(*args, **kwds)[source] [edit on github]

A query function similar to astroquery.irsa_dust.IrsaDust.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 :

coordinate : str

Can be either the name of an object or a coordinate string If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here: http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html

radius : str/astropy.units.Quantity, optional

The size of the region to include in the dust query, in radian, degree or hour as per format specified by astropy.coordinates.Angle or `astropy .units.Quantity. 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 extinction, ebv, 100um. Defaults to None.

timeout : int, optional

Time limit for establishing successful connection with remote server. Defaults to astroquery.irsa_dust.IrsaDust.TIMEOUT

get_query_payload : bool, optional

If true than returns the dictionary of query parameters, posted to remote server. Defaults to False

Returns :

A list of context-managers that yield readable file-like objects :

static get_query_table(*args, **kwds)[source] [edit on github]

Create and return an astropy Table representing the query response(s). When section is missing, returns the full table. When a section is specified (location, extinction, 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 resolveable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here: http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html

radius : str/astropy.units.Quantity, optional

The size of the region to include in the dust query, in radian, degree or hour as per format specified by astropy.coordinates.Angle or `astropy .units.Quantity. 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, extinction`, location) is returned. Defaults to None

timeout : int, optional

Time limit for establishing successful connection with remote server. Defaults to astroquery.irsa_dust.IrsaDust.TIMEOUT

url : str, optional

Only provided for debugging. Should generally not be assigned. Defaults to astroquery.irsa_dust.IrsaDust.DUST_SERVICE_URL

Returns :

table : astropy.table.Table

table representing the query results, (all or as per specified)

static list_image_types(*args, **kwds)[source] [edit on github]

Returns a list of image_types available in the Irsa Dust query results

Page Contents