astrobase.services.dust module¶
This gets extinction tables from the the 2MASS DUST service at:
http://irsa.ipac.caltech.edu/applications/DUST/
If you use this, please cite the SF11 and SFD98 papers and acknowledge the use of 2MASS/IPAC services.
- http://www.adsabs.harvard.edu/abs/1998ApJ…500..525S
- http://www.adsabs.harvard.edu/abs/2011ApJ…737..103S
Also see:
http://irsa.ipac.caltech.edu/applications/DUST/docs/background.html
-
astrobase.services.dust.
extinction_query
(lon, lat, coordtype='equatorial', sizedeg=5.0, forcefetch=False, cachedir='~/.astrobase/dust-cache', verbose=True, timeout=10.0, jitter=5.0)[source]¶ This queries the 2MASS DUST service to find the extinction parameters for the given lon, lat.
Parameters: - lon,lat (float) – These are decimal right ascension and declination if coordtype = ‘equatorial’. These are are decimal Galactic longitude and latitude if coordtype = ‘galactic’.
- coordtype ({'equatorial','galactic'}) – Sets the type of coordinates passed in as lon, lat.
- sizedeg (float) – This is the width of the image returned by the DUST service. This can usually be left as-is if you’re interested in the extinction only.
- forcefetch (bool) – If this is True, the query will be retried even if cached results for it exist.
- cachedir (str) – This points to the directory where results will be downloaded.
- verbose (bool) – If True, will indicate progress and warn of any issues.
- timeout (float) – This sets the amount of time in seconds to wait for the service to respond to our request.
- jitter (float) – This is used to control the scale of the random wait in seconds before starting the query. Useful in parallelized situations.
Returns: A dict of the following form is returned:
{'Amag':{dict of extinction A_v values for several mag systems}, 'table': array containing the full extinction table, 'tablefile': the path to the full extinction table file on disk, 'provenance': 'cached' or 'new download', 'request': string repr of the request made to 2MASS DUST}
Return type: dict