dustmaps


Namedustmaps JSON
Version 1.0.13 PyPI version JSON
download
home_pagehttps://github.com/gregreen/dustmaps
SummaryUniform interface for multiple dust reddening maps.
upload_time2024-01-16 09:29:18
maintainer
docs_urlNone
authorGregory M. Green
requires_python
licenseGPLv2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![DOI](http://joss.theoj.org/papers/10.21105/joss.00695/status.svg)](https://doi.org/10.21105/joss.00695) [![DOI](https://zenodo.org/badge/59614814.svg)](https://zenodo.org/badge/latestdoi/59614814)

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:

1. Burstein & Heiles (1982; BH'82)
2. Chen et al. (2014)
3. Green, Schlafly, Finkbeiner et al. (2015,2018,2019; Bayestar)
4. Marshall et al. (2006)
5. Planck Collaboration (2013)
6. Planck Collaboration (2016; GNILC)
7. Sale et al. (2014; IPHAS)
8. Schlegel, Finkbeiner & Davis (1998; SFD'98)
9. Lenz, Hensley & Doré (2017)
10. Peek & Graves (2010)
11. Leike & Enßlin (2019)
12. Leike, Glatzle & Enßlin (2020)
13. Edenhofer et al. (2023)
14. Chiang (2023; CSFD)

To request addition of another dust map in this package, [file an issue on
GitHub](https://github.com/gregreen/dustmaps/issues), or submit a pull request.


Installation
------------

Download the repository from [GitHub](https://github.com/gregreen/dustmaps) 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" or "bh".

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()


Querying the Maps
-----------------

Maps are queried using
[`astropy.coordinates.SkyCoord`](http://docs.astropy.org/en/stable/api/astropy.coordinates.SkyCoord.html#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](https://doi.org/10.21105/joss.00695):

    @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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gregreen/dustmaps",
    "name": "dustmaps",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Gregory M. Green",
    "author_email": "gregorymgreen@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a7/1a/f70408ef09d94092d072e0b3b06df6a8b1b55087b88da845620a81453d75/dustmaps-1.0.13.tar.gz",
    "platform": null,
    "description": "[![DOI](http://joss.theoj.org/papers/10.21105/joss.00695/status.svg)](https://doi.org/10.21105/joss.00695) [![DOI](https://zenodo.org/badge/59614814.svg)](https://zenodo.org/badge/latestdoi/59614814)\n\ndustmaps\n========\n\nThe ``dustmaps`` package provides a uniform interface for dealing with a number\nof 2D and 3D maps of interstellar dust reddening/extinction.\n\nSupported Dust Maps\n-------------------\n\nThe currently supported dust maps are:\n\n1. Burstein & Heiles (1982; BH'82)\n2. Chen et al. (2014)\n3. Green, Schlafly, Finkbeiner et al. (2015,2018,2019; Bayestar)\n4. Marshall et al. (2006)\n5. Planck Collaboration (2013)\n6. Planck Collaboration (2016; GNILC)\n7. Sale et al. (2014; IPHAS)\n8. Schlegel, Finkbeiner & Davis (1998; SFD'98)\n9. Lenz, Hensley & Dor\u00e9 (2017)\n10. Peek & Graves (2010)\n11. Leike & En\u00dflin (2019)\n12. Leike, Glatzle & En\u00dflin (2020)\n13. Edenhofer et al. (2023)\n14. Chiang (2023; CSFD)\n\nTo request addition of another dust map in this package, [file an issue on\nGitHub](https://github.com/gregreen/dustmaps/issues), or submit a pull request.\n\n\nInstallation\n------------\n\nDownload the repository from [GitHub](https://github.com/gregreen/dustmaps) and\nthen run:\n\n    python setup.py install --large-data-dir=/path/where/you/want/large/data/files/stored\n\nAlternatively, you can use the Python package manager `pip`:\n\n    pip install dustmaps\n\n\nGetting the Data\n----------------\n\nTo fetch the data for the SFD dust map, run:\n\n    python setup.py fetch --map-name=sfd\n\nYou can download the other dust maps by changing \"sfd\" to \"csfd\", \"planck\",\n\"planckGNILC\", \"bayestar\", \"iphas\", \"marshall\", \"chen2014\", \"lenz2017\",\n\"pg2010\", \"leikeensslin2019\", \"leike2020\", \"edenhofer2023\" or \"bh\".\n\nAlternatively, if you have used `pip` to install `dustmaps`, then you can\nconfigure the data directory and download the data by opening up a python\ninterpreter and running:\n\n    >>> from dustmaps.config import config\n    >>> config['data_dir'] = '/path/where/you/want/large/data/files/stored'\n    >>>\n    >>> import dustmaps.sfd\n    >>> dustmaps.sfd.fetch()\n    >>>\n    >>> import dustmaps.csfd\n    >>> dustmaps.csfd.fetch()\n    >>>\n    >>> import dustmaps.planck\n    >>> dustmaps.planck.fetch()\n    >>>\n    >>> import dustmaps.planck\n    >>> dustmaps.planck.fetch(which='GNILC')\n    >>>\n    >>> import dustmaps.bayestar\n    >>> dustmaps.bayestar.fetch()\n    >>>\n    >>> import dustmaps.iphas\n    >>> dustmaps.iphas.fetch()\n    >>>\n    >>> import dustmaps.marshall\n    >>> dustmaps.marshall.fetch()\n    >>>\n    >>> import dustmaps.chen2014\n    >>> dustmaps.chen2014.fetch()\n    >>>\n    >>> import dustmaps.lenz2017\n    >>> dustmaps.lenz2017.fetch()\n    >>>\n    >>> import dustmaps.pg2010\n    >>> dustmaps.pg2010.fetch()\n    >>>\n    >>> import dustmaps.leike_ensslin_2019\n    >>> dustmaps.leike_ensslin_2019.fetch()\n    >>>\n    >>> import dustmaps.leike2020\n    >>> dustmaps.leike2020.fetch()\n    >>>\n    >>> import dustmaps.edenhofer2023\n    >>> dustmaps.edenhofer2023.fetch()\n\n\nQuerying the Maps\n-----------------\n\nMaps are queried using\n[`astropy.coordinates.SkyCoord`](http://docs.astropy.org/en/stable/api/astropy.coordinates.SkyCoord.html#astropy.coordinates.SkyCoord)\nobjects. This means that any coordinate system supported by `astropy` can be\nused as input. For example, we can query SFD'98 as follows:\n\n    >>> from dustmaps.sfd import SFDQuery\n    >>> from astropy.coordinates import SkyCoord\n    >>>\n    >>> sfd = SFDQuery()\n    >>>\n    >>> c = SkyCoord(\n            '05h00m00.00000s',\n            '+30d00m00.0000s',\n            frame='icrs')\n    >>> print sfd(c)\n    0.483961\n\nAbove, we have used the ICRS coordinate system (the inputs are RA and Dec). We\ncan use other coordinate systems, such as Galactic coordinates, and we can\nprovide coordinate arrays. The following example uses both features:\n\n    >>> c = SkyCoord(\n            [75.00000000, 130.00000000],\n            [-89.00000000, 10.00000000],\n            frame='galactic',\n            unit='deg')\n    >>> print sfd(c)\n    [ 0.0146584   0.97695869]\n\n\nDocumentation\n-------------\n\nRead the full documentation at http://dustmaps.readthedocs.io/en/latest/.\n\n\nCitation\n--------\n\nIf you make use of this software in a publication, please cite\n[Green (2018) in The Journal of Open Source Software](https://doi.org/10.21105/joss.00695):\n\n    @ARTICLE{2018JOSS....3..695M,\n           author = {{Green}, {Gregory M.}},\n            title = \"{dustmaps: A Python interface for maps of interstellar dust}\",\n          journal = {The Journal of Open Source Software},\n             year = \"2018\",\n            month = \"Jun\",\n           volume = {3},\n           number = {26},\n            pages = {695},\n              doi = {10.21105/joss.00695},\n           adsurl = {https://ui.adsabs.harvard.edu/abs/2018JOSS....3..695M},\n          adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n    }\n\n\nDevelopment\n-----------\n\nDevelopment of `dustmaps` takes place on GitHub, at\nhttps://github.com/gregreen/dustmaps. Any bugs, feature requests, pull requests,\nor other issues can be filed there. Contributions to the software are welcome.\n\n\n",
    "bugtrack_url": null,
    "license": "GPLv2",
    "summary": "Uniform interface for multiple dust reddening maps.",
    "version": "1.0.13",
    "project_urls": {
        "Download": "https://github.com/gregreen/dustmaps/archive/v1.0.13.tar.gz",
        "Homepage": "https://github.com/gregreen/dustmaps"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "567073dc954e11fbab1b4cf939debcf1083e6c1032e7b52326aaf9091befa931",
                "md5": "12e0a435511ddda41c2a9f33f247668d",
                "sha256": "c16cb6e2077640f6234e83c07f2117bd3dbb6646d0ec6204c4cb81429bb2ce71"
            },
            "downloads": -1,
            "filename": "dustmaps-1.0.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "12e0a435511ddda41c2a9f33f247668d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 750570,
            "upload_time": "2024-01-16T09:29:16",
            "upload_time_iso_8601": "2024-01-16T09:29:16.332069Z",
            "url": "https://files.pythonhosted.org/packages/56/70/73dc954e11fbab1b4cf939debcf1083e6c1032e7b52326aaf9091befa931/dustmaps-1.0.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a71af70408ef09d94092d072e0b3b06df6a8b1b55087b88da845620a81453d75",
                "md5": "a77157958da9930c7604c8e658a14cd1",
                "sha256": "895b4df742f1d7d4ec2d010cc11d42eb33fd3681ece2b348d1e511d182898206"
            },
            "downloads": -1,
            "filename": "dustmaps-1.0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "a77157958da9930c7604c8e658a14cd1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1771215,
            "upload_time": "2024-01-16T09:29:18",
            "upload_time_iso_8601": "2024-01-16T09:29:18.367698Z",
            "url": "https://files.pythonhosted.org/packages/a7/1a/f70408ef09d94092d072e0b3b06df6a8b1b55087b88da845620a81453d75/dustmaps-1.0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-16 09:29:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gregreen",
    "github_project": "dustmaps",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "dustmaps"
}
        
Elapsed time: 1.11055s