dustmaps
The dustmaps package provides a uniform interface for dealing with a number
of 2D and 3D maps of interstellar dust reddening/extinction.
Supported Dust Maps
The currently supported dust maps are:
- Burstein & Heiles (1982; BH'82)
- Chen et al. (2014)
- Green, Schlafly, Finkbeiner et al. (2015,2018,2019; Bayestar)
- Marshall et al. (2006)
- Planck Collaboration (2013)
- Planck Collaboration (2016; GNILC)
- Sale et al. (2014; IPHAS)
- Schlegel, Finkbeiner & Davis (1998; SFD'98)
- Lenz, Hensley & Doré (2017)
- Peek & Graves (2010)
- Leike & Enßlin (2019)
- Leike, Glatzle & Enßlin (2020)
- Edenhofer et al. (2023)
- Chiang (2023; CSFD)
- Zucker, Saydjari, & Speagle et al. (2025; DECaPS)
To request addition of another dust map in this package, file an issue on GitHub, or submit a pull request.
Installation
Download the repository from GitHub and then run:
python setup.py install --large-data-dir=/path/where/you/want/large/data/files/stored
Alternatively, you can use the Python package manager pip:
pip install dustmaps
Getting the Data
To fetch the data for the SFD dust map, run:
python setup.py fetch --map-name=sfd
You can download the other dust maps by changing "sfd" to "csfd", "planck", "planckGNILC", "bayestar", "iphas", "marshall", "chen2014", "lenz2017", "pg2010", "leikeensslin2019", "leike2020", "edenhofer2023", "bh", or "decaps".
Alternatively, if you have used pip to install dustmaps, then you can
configure the data directory and download the data by opening up a python
interpreter and running:
>>> from dustmaps.config import config
>>> config['data_dir'] = '/path/where/you/want/large/data/files/stored'
>>>
>>> import dustmaps.sfd
>>> dustmaps.sfd.fetch()
>>>
>>> import dustmaps.csfd
>>> dustmaps.csfd.fetch()
>>>
>>> import dustmaps.planck
>>> dustmaps.planck.fetch()
>>>
>>> import dustmaps.planck
>>> dustmaps.planck.fetch(which='GNILC')
>>>
>>> import dustmaps.bayestar
>>> dustmaps.bayestar.fetch()
>>>
>>> import dustmaps.iphas
>>> dustmaps.iphas.fetch()
>>>
>>> import dustmaps.marshall
>>> dustmaps.marshall.fetch()
>>>
>>> import dustmaps.chen2014
>>> dustmaps.chen2014.fetch()
>>>
>>> import dustmaps.lenz2017
>>> dustmaps.lenz2017.fetch()
>>>
>>> import dustmaps.pg2010
>>> dustmaps.pg2010.fetch()
>>>
>>> import dustmaps.leike_ensslin_2019
>>> dustmaps.leike_ensslin_2019.fetch()
>>>
>>> import dustmaps.leike2020
>>> dustmaps.leike2020.fetch()
>>>
>>> import dustmaps.edenhofer2023
>>> dustmaps.edenhofer2023.fetch()
>>>
>>> import dustmaps.decaps
>>> dustmaps.decaps.fetch()
Querying the Maps
Maps are queried using
astropy.coordinates.SkyCoord
objects. This means that any coordinate system supported by astropy can be
used as input. For example, we can query SFD'98 as follows:
>>> from dustmaps.sfd import SFDQuery
>>> from astropy.coordinates import SkyCoord
>>>
>>> sfd = SFDQuery()
>>>
>>> c = SkyCoord(
'05h00m00.00000s',
'+30d00m00.0000s',
frame='icrs')
>>> print sfd(c)
0.483961
Above, we have used the ICRS coordinate system (the inputs are RA and Dec). We can use other coordinate systems, such as Galactic coordinates, and we can provide coordinate arrays. The following example uses both features:
>>> c = SkyCoord(
[75.00000000, 130.00000000],
[-89.00000000, 10.00000000],
frame='galactic',
unit='deg')
>>> print sfd(c)
[ 0.0146584 0.97695869]
Documentation
Read the full documentation at http://dustmaps.readthedocs.io/en/latest/.
Citation
If you make use of this software in a publication, please cite Green (2018) in The Journal of Open Source Software:
@ARTICLE{2018JOSS....3..695M,
author = {{Green}, {Gregory M.}},
title = "{dustmaps: A Python interface for maps of interstellar dust}",
journal = {The Journal of Open Source Software},
year = "2018",
month = "Jun",
volume = {3},
number = {26},
pages = {695},
doi = {10.21105/joss.00695},
adsurl = {https://ui.adsabs.harvard.edu/abs/2018JOSS....3..695M},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
Development
Development of dustmaps takes place on GitHub, at
https://github.com/gregreen/dustmaps. Any bugs, feature requests, pull requests,
or other issues can be filed there. Contributions to the software are welcome.
Metadata
Release files for dustmaps 1.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dustmaps-1.0.14.tar.gz | 1.8 MB | Without provenance | Details for dustmaps-1.0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dustmaps-1.0.14-py3-none-any.whl | Python 3 | none | any | Details for dustmaps-1.0.14-py3-none-any.whl |
Total release size: 2.5 MB
Release files / dustmaps-1.0.14.tar.gz
| Download URL | dustmaps-1.0.14.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51347809dcd186d14c4f88c7856bb11a931bc422e8f57774e9c90d19e76c43cf
|
|
BLAKE2b-256 checksum How to use checksums |
5b5c17092ef3580f1e2a4574de0c794d86d9b5d865f2eba05f4eacaa3e8af6ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / dustmaps-1.0.14-py3-none-any.whl
| Download URL | dustmaps-1.0.14-py3-none-any.whl |
|---|---|
| Size | 754.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
201bb78a8569d4a4907d2b044e96ba9b2d012b19ac62fbd2c45b516203b21472
|
|
BLAKE2b-256 checksum How to use checksums |
ca17fcf593cc07f6b060318d3590c09ca7793b45d14428ebbc121e392c240b60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for dustmaps 1.0.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.