Dust in the Milky Way
Project description
Dust in 3D in the Milky Way
Installation
Install the latest released version using pip:
pip install mwdust
To install the latest development version, clone the repository and do
python setup.py install
or
python setup.py install --user
Using custom implementations of necessary HEALPIx functions, basic evaluation of extinction is available on all platforms (Linux, Mac OS, Windows) for all dust maps. However, some HEALPIx-based features like plotting require healpy, which is unavailable on Windows. Install on Linux/Mac OS for full functionality.
Dust Data
By default, dust maps are download when you use them for the first time. If you define an environment variable DUST_DIR, then all dust data downloaded by the code will be downloaded to this directory. If you do not set the DUST_DIR variable, then mwdust will download data to ~/.mwdust.
The code can download all of the necessary data at by running
from mwdust import download_all
download_all()
Note that some of the maps are very large (multiple GB) and some of the downloads are slow, so this may take a while.
The data are put in subdirectories of a directory DUST_DIR or ~/.mwdust, with roughly the following lay-out:
$DUST_DIR/ combined15/ dust-map-3d.h5 combined19/ combine19.h5 green15/ dust-map-3d.h5 green17/ bayestar2017.h5 green19/ bayestar2019.h5 maps/ SFD_dust_4096_ngp.fits SFD_dust_4096_sgp.fits marshall06/ ReadMe table1.dat sale14/ Amap.dat ReadMe
The data for the Drimmel et al. (2003) map is installed in the code directory, because it is not very large.
Usage
All of the maps can be initialized similar to
import mwdust
drimmel= mwdust.Drimmel03(filter='2MASS H')
combined= mwdust.Combined15(filter='2MASS H')
combined19= mwdust.Combined19(filter='2MASS H')
sfd= mwdust.SFD(filter='2MASS H')
which sets up the Drimmel et al. (2003) map, the combined Bovy et al. (2016) map, an updated version of the combined map using the Green et al. (2019) Bayestar19 map, and the SFD map for the H-band filter. The maps can be evaluate for a given Galactic longitude l, Galactic latitude b, and an array (or scalar) of distances D
drimmel(60.,0.,3.) # inputs are (l,b,D)
array([ 0.38813341])
combined(30.,3.,numpy.array([1.,2.,3.,10.]))
array([ 0.22304147, 0.55687252, 0.86694602, 1.18779507])
# SFD is just the constant SFD extinction
sfd(30.,3.,numpy.array([1.,2.,3.]))
array([ 1.19977335, 1.19977335, 1.19977335])
and they can be plotted as a function of distance at a given (l,b)
combined.plot(55.,0.5) # inputs are (l,b)
(plot not shown). Maps that are derived from the HierarchicalHealpixMap.py class (currently all Green-type maps and the combined maps) can be vectorized to evaluate on array inputs of l, b, D
combined(numpy.array([30.,40.,50.,60.]),numpy.array([3.,4.,3.,6.]),numpy.array([1.,2.,3.,10.]))
array([0.22304147, 0.3780736 , 0.42528571, 0.22258065])
They can also be plotted on the sky using a Mollweide projection at a given distance using
combined.plot_mollweide(5.) # input is distance in kpc
Note that this requires healpy to be installed, so this does not work on Windows.
Supported bandpasses
Currently only a few filters are supported. To obtain E(B-V), specify filter='E(B-V)'. To check what bandpasses are supported on the sf10=True scale (these are all the bandpasses from Table 6 in Schlafly & Finkbeiner 2011), do
from mwdust.util import extCurves
extCurves.avebvsf.keys()
which gives
['Stromgren u',
'Stromgren v',
'ACS clear',
'CTIO R',
'CTIO V',
'CTIO U',
'CTIO I',
...]
To check the bandpasses that are supported on the old SFD scale (sf10=False), do
numpy.array(extCurves.avebv.keys())[True-numpy.isnan(extCurves.avebv.values())]
which gives
array(['CTIO R', 'CTIO V', 'CTIO U', 'CTIO I', 'CTIO B', 'DSS-II i',
'DSS-II g', 'WISE-1', 'WISE-2', 'DSS-II r', 'UKIRT H', 'UKIRT J',
'UKIRT K', 'IRAC-1', 'IRAC-2', 'IRAC-3', 'IRAC-4', '2MASS H',
'SDSS r', 'SDSS u', 'SDSS z', 'SDSS g', 'SDSS i', '2MASS Ks',
'2MASS J'], dtype='|S14')
If no filter is supplied, E(B-V) is returned on the SFD scale if the object is initialized with sf10=True (which tells the code to use re-scalings from Schlafly & Finkbeiner 2011). sf10=True is the default initialization for every map, so be careful in interpreting the raw E(B-V) that come out of the code when not setting filter or when setting filter=None. Only use sf10=False when you have an extinction map in true E(B-V), not SFD E(B-V). No map currently included in this package is in this situation, so using sf10=False is never recommended.
Acknowledging mwdust and its data
When making use of this code in a publication, please cite Bovy et al. (2015a). Also cite the relevant papers for the dust map that you use:
mwdust.SFD: Schlegel et al. (1998)
mwdust.Drimmel03: Drimmel et al. (2003)
mwdust.Marshall06: Marshall et al. (2006)
mwdust.Sale14: Sale et al. (2014)
mwdust.Green15: Green et al. (2015)
mwdust.Green17: Green et al. (2018) (added by @jan-rybizki)
mwdust.Green19: Green et al. (2019) (added by @jan-rybizki)
mwdust.Combined15: Combination of
Marshall et al. (2006) (mwdust.Marshall06),
Green et al. (2015) (mwdust.Green15), and
Drimmel et al. (2003) (mwdust.Drimmel03);
see Bovy et al. (2015a).
mwdust.Combined19: Similar to mwdust.Combined15, but using mwdust.Green19 instead of mwdust.Green15; see Bovy et al. (2015a) for details on the combination (added by @jan-rybizki)
mwdust.Zero: Bovy et al. (2015b) :smirk:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file mwdust-1.5.post0.tar.gz
.
File metadata
- Download URL: mwdust-1.5.post0.tar.gz
- Upload date:
- Size: 68.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44e360ee6cf479f1f61b2bcab625598fa16fbbe44610493f81bcb6d94c565c40 |
|
MD5 | 1cf83ecf53405b5260bfdf65136f6cf4 |
|
BLAKE2b-256 | ff2345b115ee7ca976bcf9cda0c3d60298424c4164ea2c196bb3b560c836fd27 |
File details
Details for the file mwdust-1.5.post0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 68.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b33dfbeb6f8a540018fa6d3fd521e86d5fd6381bcd5e0236c69c0a5a60ff16c |
|
MD5 | 688b91e820d98f7cf6a7f2594ce53aa7 |
|
BLAKE2b-256 | 62a43237cc8768defbc71b700779ac37bee534fed848ecd20f94fad0a355dba2 |
File details
Details for the file mwdust-1.5.post0-cp312-cp312-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp312-cp312-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 132.9 kB
- Tags: CPython 3.12, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73e58f398f4a0cb00d6f9805cc8f0c7bf5281a782a36332b53f73a45b87a4b7f |
|
MD5 | 78c09d4e42de34e185e1c171d47b531c |
|
BLAKE2b-256 | 0d78b3cc596068755e6fe73f791a2747f75402e0da6730a7bded64bc25777a23 |
File details
Details for the file mwdust-1.5.post0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1306426cba5da468c1f09458791c677cede5750cc95fe2ce932bc35aa763d64c |
|
MD5 | 81c6f17d197da68a7c9156b2ed011080 |
|
BLAKE2b-256 | 9c9aeed81b7b74b7767f11ba6125adc8821c64571ee0373d349996c85a697356 |
File details
Details for the file mwdust-1.5.post0-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 85.3 kB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35066510537150e369a3d955f054c7e8a47c80d7fc41fe4639925f901ce47d37 |
|
MD5 | fb1cbf214c754802e223d837848a0c31 |
|
BLAKE2b-256 | 280dcf5c190ea6a1e9e5a9ee7cc5ee4fe995475edc03383a4925181a2caf4de8 |
File details
Details for the file mwdust-1.5.post0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 68.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc95afd9747aa084b7b58a79ceb98c70df95c790cb37e5950b4931b2a1db8b5b |
|
MD5 | bcbdb6e6435f19c46c7ab801d22a48e7 |
|
BLAKE2b-256 | a7cf5f13e07faf9a4a4a30be39e2ee98ad14a6a5c39c9ba9f422e553f468470a |
File details
Details for the file mwdust-1.5.post0-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 132.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc724b67149ed372a5ca3ecc5ffb75972c7081d8da445c171d91d464d999f02 |
|
MD5 | a71c9d7e8bfbd9c49c789888a8aec023 |
|
BLAKE2b-256 | 6c5a7be2c201ef5a1548fb1300cfbceba841ad5debd47d3a8b6a47050bb325d9 |
File details
Details for the file mwdust-1.5.post0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed45895747e523ce29e0b2fc8588b0b7903de2b1c312bdb1130e2dc1a3514161 |
|
MD5 | 4d9dfea8fa4d2d2b59ff375a0cccede7 |
|
BLAKE2b-256 | acaaf9ccccd5ceb4e7f2453de0ada4bac57efd345f54ecf54b6fc43816e913d5 |
File details
Details for the file mwdust-1.5.post0-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 85.3 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef9f4697c81c1d4c16d22811ca4bfcba84363dca4ef31549cbed0bdb836778a8 |
|
MD5 | 5d8a0c14ae2549e5016ae93fc4efd823 |
|
BLAKE2b-256 | fd4605353769598c401ba86f71b2118f03cc544e8bdd231fd8500984cbc8028c |
File details
Details for the file mwdust-1.5.post0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 68.6 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 833f1ca27f486cf59ad53eb4b5570fba9f9d51db895b24e6fb1299ea2fb86331 |
|
MD5 | 20c769f25793d32c13d666e17e114f6b |
|
BLAKE2b-256 | 0660cbb95362602576c627061d53969fb5b6bf5c7e3e364cfe1437c22ec80fcd |
File details
Details for the file mwdust-1.5.post0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 132.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3e1f69fb6ac53c360063461cfc9c26608fc0e1b3b74912369c790e9b6a1520c |
|
MD5 | c0ee110dbe06fa14b6cd0026756b1dc4 |
|
BLAKE2b-256 | 76e19f2c91a321585df2b69cbceddef27c374eebaf60a1c04fd4022b6ffd735d |
File details
Details for the file mwdust-1.5.post0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36af9054e8b5fdb250f84186da7fde3b56d00b183f8e02d621dc77edc47e099d |
|
MD5 | 1670de0591f1b24b0c5c8c5d052c6fc1 |
|
BLAKE2b-256 | 815437e03050672e1f6c9be2c05c3840db2ba095e5fa886c3e9f64ba3173e63d |
File details
Details for the file mwdust-1.5.post0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 85.3 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47a93bea70dc2ddd8639868b3e4e38464585616191a16100cc104ae338eb05b6 |
|
MD5 | b08f67427ad94d1e06d87e72f0af4e98 |
|
BLAKE2b-256 | b30ba5b03640d1a1641d11d383be7616a99c8adedab11aa66ecf6bd5fe8fda8e |
File details
Details for the file mwdust-1.5.post0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 68.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cbd54588c7e5bf7738f11be3b7272f6423730c107add498fdff336ca8f02c55 |
|
MD5 | 186bfde2bc41d67b6d77cc9bab0bccbb |
|
BLAKE2b-256 | a32062d05a3e460e254fb308fecd8301a77c0eaf9ee96bf23561d35337127858 |
File details
Details for the file mwdust-1.5.post0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 132.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c97a111b5115fdeb6117c5b1a4f9401eab87839aec28a5e6816d4f4c1ec256e2 |
|
MD5 | 6c47b4166c78982eab00db4a8cb9dac1 |
|
BLAKE2b-256 | e44521fb27eed0778079017f721e8cea81d1f3cf1ecb736ff0705cfd73d0b4db |
File details
Details for the file mwdust-1.5.post0-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95a72c80a27585cd691d0387ed845f7fc518b7f6dafd7f21835adf55feb4d42a |
|
MD5 | 65f1435f24c3725c3aa32d8d0918a7f3 |
|
BLAKE2b-256 | cd902031bb481e57bee661007f02a79e3b56c06b34cbac84256dd50102c67811 |
File details
Details for the file mwdust-1.5.post0-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 85.3 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2b0da0396b927b591d7fc7acbb3d0747ed7908d1b789bf982e1bbb889d322a9 |
|
MD5 | f92ee74d056a4da8ada26a9d4cca8cfb |
|
BLAKE2b-256 | 218ce7e85fc5be36a6d547aba2cc65c571c17776dbb0630dc29cf7b83e88317e |
File details
Details for the file mwdust-1.5.post0-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 68.5 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f3aeed468903d11ea5802bf0c43ad7eb1cf5c199568b96c9b8e26f7c21dcde |
|
MD5 | 0c332ae5b1e6b92ae0865aa34e10f03d |
|
BLAKE2b-256 | 6209b45af1dbc51b709f221a73ead88b0fdce932f049caaf57a062bc562e51c4 |
File details
Details for the file mwdust-1.5.post0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 132.9 kB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 705d0227f1e2687bc4d8f45c449c21a72f6571ef2f7335c3315a8ae28c9f9cb2 |
|
MD5 | 3beca446e7eae0dd9a02c98adda218a2 |
|
BLAKE2b-256 | a0532310db69cf980054b8d638912b02769bcf5b383c51507608330d53009be3 |
File details
Details for the file mwdust-1.5.post0-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 534fb4e1f563a4e2aba10206517b73756699ecd28af3ce21f75a9ebd1428496d |
|
MD5 | c004e82fd091e25cea8949f4f06e03f6 |
|
BLAKE2b-256 | 8b0c7040519057710c084e0af99482210c581d2f0df50c2a0f31ec995a9f980e |
File details
Details for the file mwdust-1.5.post0-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: mwdust-1.5.post0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 85.3 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a4f99387b943fe0a77130ad7b5a11b96e6f35d86ea676bfcd57268dac408047 |
|
MD5 | db62a7edbd215bb2d7e7157964018fbd |
|
BLAKE2b-256 | 29f0710be9ddf33487a9584ab35f8e3143470b8faa086b42405cf4d28c32998e |