pygdsm


Namepygdsm JSON
Version 1.5.3 PyPI version JSON
download
home_pagehttps://github.com/telegraphic/pygdsm
SummaryPython Global Sky Model of diffuse Galactic radio emission
upload_time2024-04-15 07:45:00
maintainerNone
docs_urlNone
authorDanny C. Price
requires_pythonNone
licenseMIT
keywords radio astronomy sky model galactic diffuse emission
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![ascl:1603.013](https://img.shields.io/badge/ascl-1603.013-blue.svg)](https://ascl.net/1603.013)
[![codecov](https://codecov.io/gh/telegraphic/pygdsm/branch/master/graph/badge.svg)](https://codecov.io/gh/telegraphic/pygdsm)
[![astropy](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/) 
 
PyGDSM
=====

![skymodels.jpg](https://github.com/telegraphic/pygdsm/raw/master/docs/skymodels.jpg)



`PyGDSM` is a Python interface for global diffuse sky models: all-sky maps in Healpix format of diffuse Galactic radio emission.

This package includes interfaces to:
 * **GSM2008:** A model of diffuse Galactic radio emission from 10 MHz to 100 GHz, [Oliveira-Costa et. al., (2008)](https://ui.adsabs.harvard.edu/abs/2008MNRAS.388..247D/abstract). 
 * **GSM2016:** An improved model of diffuse galactic radio emission from 10 MHz to 5 THz, [Zheng et. al., (2016)](https://ui.adsabs.harvard.edu/abs/2017MNRAS.464.3486Z/abstract).
 * **LFSS:** The LWA1 Low Frequency Sky Survey (10-408 MHz) [Dowell et. al. (2017)](https://ui.adsabs.harvard.edu/abs/2017MNRAS.469.4537D/abstract). 
 * **Haslam:** A frequency-scaled model using a spectral index, based on the [Haslam 408 MHz](https://lambda.gsfc.nasa.gov/product/foreground/fg_2014_haslam_408_info.cfm) all-sky map.

In general, these are *not* wrappers of the original code (GSM2008 was written in Fortan and GSM2016 in C); instead they provides a uniform API with some additional features and advantages, such as healpy integration for imaging, and sky rotation for observed skies. 


Quickstart
----------

The first thing to do will be to make sure you've got the dependencies: 

* [numpy](http://www.numpy.org/)
* [scipy](http://www.scipy.org/install.html)
* [healpy](http://healpy.readthedocs.org/en/latest/)
* [h5py](http://www.h5py.org/)
* [astropy](http://www.astropy.org/)

Then you should be able to install with:

        pip install git+https://github.com/telegraphic/pygdsm

Alternatively, clone the directory:

        git clone https://github.com/telegraphic/pygdsm
       
An run `pip install .`. On first run, the sky model data will be downloaded from Zenodo / LAMBDA. These are about 500 MB total, and will be downloaded into your astropy cache (`~/.astropy/`). The data are hosted on [Zenodo](https://zenodo.org/record/3479985#.XaASx79S-AY).

Examples
---------

To get a quick feel of what `PyGDSM` does, have a look at the 
[GSM2008 quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm_quickstart.ipynb), and the new
[GSM2016 quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm2016_quickstart.ipynb).

Q & A
-----

**Q. What's the difference between this and the `gsm.f` from the main GSM2008 website?**
     The `gsm.f` is a very basic Fortran code, which reads and writes values to and from
     ASCII files, and uses a command line interface for input. If you want to run this code
     on an ancient computer with nothing but Fortran installed, then `gsm.f` is the way to go. 
     In contrast, `PyGDSM` is a Python code that leverages a lot of other Packages so that you 
     can do more stuff more efficiently. For example: you can view a sky model in a healpy 
     image; you can write a sky model to a Healpix FITS file; and believe it or not, the 
     Python implementation is *much faster*. Have a look at the 
     [quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm_quickstart.ipynb)
     to get a feel for what `PyGDSM` does.

**Q. Are the outputs of `gsm.f` and `pygdsm` identical?**.  
     **NO**. The cubic  spline interpolation implementation differs, so values will differ by as 
     much as a few percent. The interpolation code used in `gsm.f` does not have an open-source
     license (it's from [Numerical Recipes](http://www.nr.com/licenses/) ), so we haven't 
     implemented it (one could probably come up with an equivalent that didn't infringe).
     Nevertheless, the underlying PCA data are identical, and I've run tests to check that
     the two outputs are indeed comparable. 

**Q. What's the difference between this and the [Zheng et. al. github repo](https://github.com/jeffzhen/gsm2016)?**
     `pygdsm` provides two classes: `GlobalSkyModel16()` and `GSMObserver16()`, which once instantiated
     provide methods for programatically generating sky models. The Zheng et. al. github repo is a 
     simple, low-dependency, command line tool. As of PyGDSM 1.4.0, we have implemented improved interpolation
     via cubic spline or PCHIP, which avoids discontinuities identified using the 2016 method. Have a look at the 
     [GSM2016 quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm2016_quickstart.ipynb)
     to get a feel for what `PyGDSM` does.

**Q. Why does this package download so much data when first run?**
     The package size is dominated by the PCA healpix maps, which have about 3 million points each.
     They're compressed using HDF5 LZF, so are actually about 3x smaller than the `*.dat`
     files that come in the original `gsm.tar.gz` file. The next biggest thing is test data,
     so that the output can be compared against precomputed output from `gsm.f`. The package now also includes
     the Zheng et. al. data, which is another ~300 MB.
   

References
----------

The sky model data contained here is from:
* GSM2008 http://space.mit.edu/~angelica/gsm/index.html (link no longer active)
* GSM2016 https://github.com/jeffzhen/gsm2016
* LFSS https://lda10g.alliance.unm.edu/LWA1LowFrequencySkySurvey/
* Haslam https://lambda.gsfc.nasa.gov/product/foreground/fg_2014_haslam_408_info.cfm


```
A model of diffuse Galactic radio emission from 10 MHz to 100 GHz
A. de Oliveira-Costa, M. Tegmark, B.M. Gaensler, J. Jonas, T.L. Landecker and P. Reich
MNRAS 388, 247-260 (2008)
https://ui.adsabs.harvard.edu/abs/2008MNRAS.388..247D/abstract

An Improved Model of Diffuse Galactic Radio Emission from 10 MHz to 5 THz
H. Zheng, M. Tegmark, J. Dillon, A. Liu, A. Neben, J. Jonas, P. Reich, W.Reich
MNRAS, 464, 3, 3486-3497 (2017)
https://ui.adsabs.harvard.edu/abs/2017MNRAS.464.3486Z/abstract

The LWA1 Low Frequency Sky Survey
J. Dowell, G. B. Taylor, F. Schinzel, N. E. Kassim, K. Stovall
MNRAS, 469, 4, 4537-4550 (2017)
https://ui.adsabs.harvard.edu/abs/2017MNRAS.469.4537D/abstract

An improved source-subtracted and destriped 408-MHz all-sky map 
M. Remazeilles, C. Dickinson,A.J. Banday,  M. Bigot-Sazy, T. Ghosh
MNRAS 451, 4, 4311-4327 (2014)
https://ui.adsabs.harvard.edu/abs/2015MNRAS.451.4311R/abstract
 
```

PyGSDM has an [ascl.net entry](https://ascl.net/1603.013):

```
D. C. Price, 2016, 2.0.0, Astrophysics Source Code Library, 1603.013
```

License
-------

All *code* in PyGDSM is licensed under the MIT license (not the underlying *data*). 
The PCA data, by Zheng et. al. is licensed under MIT also (see https://github.com/jeffzhen/gsm2016).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/telegraphic/pygdsm",
    "name": "pygdsm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "radio astronomy sky model galactic diffuse emission",
    "author": "Danny C. Price",
    "author_email": "daniel.price@skao.int",
    "download_url": "https://files.pythonhosted.org/packages/a8/d1/4834226c0c6173db3cbf3ac25cc8e3cb7aa6bc42a2c1d9a3a002cb304558/pygdsm-1.5.3.tar.gz",
    "platform": null,
    "description": "[![ascl:1603.013](https://img.shields.io/badge/ascl-1603.013-blue.svg)](https://ascl.net/1603.013)\r\n[![codecov](https://codecov.io/gh/telegraphic/pygdsm/branch/master/graph/badge.svg)](https://codecov.io/gh/telegraphic/pygdsm)\r\n[![astropy](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/) \r\n \r\nPyGDSM\r\n=====\r\n\r\n![skymodels.jpg](https://github.com/telegraphic/pygdsm/raw/master/docs/skymodels.jpg)\r\n\r\n\r\n\r\n`PyGDSM` is a Python interface for global diffuse sky models: all-sky maps in Healpix format of diffuse Galactic radio emission.\r\n\r\nThis package includes interfaces to:\r\n * **GSM2008:** A model of diffuse Galactic radio emission from 10 MHz to 100 GHz, [Oliveira-Costa et. al., (2008)](https://ui.adsabs.harvard.edu/abs/2008MNRAS.388..247D/abstract). \r\n * **GSM2016:** An improved model of diffuse galactic radio emission from 10 MHz to 5 THz, [Zheng et. al., (2016)](https://ui.adsabs.harvard.edu/abs/2017MNRAS.464.3486Z/abstract).\r\n * **LFSS:** The LWA1 Low Frequency Sky Survey (10-408 MHz) [Dowell et. al. (2017)](https://ui.adsabs.harvard.edu/abs/2017MNRAS.469.4537D/abstract). \r\n * **Haslam:** A frequency-scaled model using a spectral index, based on the [Haslam 408 MHz](https://lambda.gsfc.nasa.gov/product/foreground/fg_2014_haslam_408_info.cfm) all-sky map.\r\n\r\nIn general, these are *not* wrappers of the original code (GSM2008 was written in Fortan and GSM2016 in C); instead they provides a uniform API with some additional features and advantages, such as healpy integration for imaging, and sky rotation for observed skies. \r\n\r\n\r\nQuickstart\r\n----------\r\n\r\nThe first thing to do will be to make sure you've got the dependencies: \r\n\r\n* [numpy](http://www.numpy.org/)\r\n* [scipy](http://www.scipy.org/install.html)\r\n* [healpy](http://healpy.readthedocs.org/en/latest/)\r\n* [h5py](http://www.h5py.org/)\r\n* [astropy](http://www.astropy.org/)\r\n\r\nThen you should be able to install with:\r\n\r\n        pip install git+https://github.com/telegraphic/pygdsm\r\n\r\nAlternatively, clone the directory:\r\n\r\n        git clone https://github.com/telegraphic/pygdsm\r\n       \r\nAn run `pip install .`. On first run, the sky model data will be downloaded from Zenodo / LAMBDA. These are about 500 MB total, and will be downloaded into your astropy cache (`~/.astropy/`). The data are hosted on [Zenodo](https://zenodo.org/record/3479985#.XaASx79S-AY).\r\n\r\nExamples\r\n---------\r\n\r\nTo get a quick feel of what `PyGDSM` does, have a look at the \r\n[GSM2008 quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm_quickstart.ipynb), and the new\r\n[GSM2016 quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm2016_quickstart.ipynb).\r\n\r\nQ & A\r\n-----\r\n\r\n**Q. What's the difference between this and the `gsm.f` from the main GSM2008 website?**\r\n     The `gsm.f` is a very basic Fortran code, which reads and writes values to and from\r\n     ASCII files, and uses a command line interface for input. If you want to run this code\r\n     on an ancient computer with nothing but Fortran installed, then `gsm.f` is the way to go. \r\n     In contrast, `PyGDSM` is a Python code that leverages a lot of other Packages so that you \r\n     can do more stuff more efficiently. For example: you can view a sky model in a healpy \r\n     image; you can write a sky model to a Healpix FITS file; and believe it or not, the \r\n     Python implementation is *much faster*. Have a look at the \r\n     [quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm_quickstart.ipynb)\r\n     to get a feel for what `PyGDSM` does.\r\n\r\n**Q. Are the outputs of `gsm.f` and `pygdsm` identical?**.  \r\n     **NO**. The cubic  spline interpolation implementation differs, so values will differ by as \r\n     much as a few percent. The interpolation code used in `gsm.f` does not have an open-source\r\n     license (it's from [Numerical Recipes](http://www.nr.com/licenses/) ), so we haven't \r\n     implemented it (one could probably come up with an equivalent that didn't infringe).\r\n     Nevertheless, the underlying PCA data are identical, and I've run tests to check that\r\n     the two outputs are indeed comparable. \r\n\r\n**Q. What's the difference between this and the [Zheng et. al. github repo](https://github.com/jeffzhen/gsm2016)?**\r\n     `pygdsm` provides two classes: `GlobalSkyModel16()` and `GSMObserver16()`, which once instantiated\r\n     provide methods for programatically generating sky models. The Zheng et. al. github repo is a \r\n     simple, low-dependency, command line tool. As of PyGDSM 1.4.0, we have implemented improved interpolation\r\n     via cubic spline or PCHIP, which avoids discontinuities identified using the 2016 method. Have a look at the \r\n     [GSM2016 quickstart guide](http://nbviewer.ipython.org/github/telegraphic/PyGDSM/blob/master/docs/pygdsm2016_quickstart.ipynb)\r\n     to get a feel for what `PyGDSM` does.\r\n\r\n**Q. Why does this package download so much data when first run?**\r\n     The package size is dominated by the PCA healpix maps, which have about 3 million points each.\r\n     They're compressed using HDF5 LZF, so are actually about 3x smaller than the `*.dat`\r\n     files that come in the original `gsm.tar.gz` file. The next biggest thing is test data,\r\n     so that the output can be compared against precomputed output from `gsm.f`. The package now also includes\r\n     the Zheng et. al. data, which is another ~300 MB.\r\n   \r\n\r\nReferences\r\n----------\r\n\r\nThe sky model data contained here is from:\r\n* GSM2008 http://space.mit.edu/~angelica/gsm/index.html (link no longer active)\r\n* GSM2016 https://github.com/jeffzhen/gsm2016\r\n* LFSS https://lda10g.alliance.unm.edu/LWA1LowFrequencySkySurvey/\r\n* Haslam https://lambda.gsfc.nasa.gov/product/foreground/fg_2014_haslam_408_info.cfm\r\n\r\n\r\n```\r\nA model of diffuse Galactic radio emission from 10 MHz to 100 GHz\r\nA. de Oliveira-Costa, M. Tegmark, B.M. Gaensler, J. Jonas, T.L. Landecker and P. Reich\r\nMNRAS 388, 247-260 (2008)\r\nhttps://ui.adsabs.harvard.edu/abs/2008MNRAS.388..247D/abstract\r\n\r\nAn Improved Model of Diffuse Galactic Radio Emission from 10 MHz to 5 THz\r\nH. Zheng, M. Tegmark, J. Dillon, A. Liu, A. Neben, J. Jonas, P. Reich, W.Reich\r\nMNRAS, 464, 3, 3486-3497 (2017)\r\nhttps://ui.adsabs.harvard.edu/abs/2017MNRAS.464.3486Z/abstract\r\n\r\nThe LWA1 Low Frequency Sky Survey\r\nJ. Dowell, G. B. Taylor, F. Schinzel, N. E. Kassim, K. Stovall\r\nMNRAS, 469, 4, 4537-4550 (2017)\r\nhttps://ui.adsabs.harvard.edu/abs/2017MNRAS.469.4537D/abstract\r\n\r\nAn improved source-subtracted and destriped 408-MHz all-sky map \r\nM. Remazeilles, C. Dickinson,A.J. Banday,  M. Bigot-Sazy, T. Ghosh\r\nMNRAS 451, 4, 4311-4327 (2014)\r\nhttps://ui.adsabs.harvard.edu/abs/2015MNRAS.451.4311R/abstract\r\n \r\n```\r\n\r\nPyGSDM has an [ascl.net entry](https://ascl.net/1603.013):\r\n\r\n```\r\nD. C. Price, 2016, 2.0.0, Astrophysics Source Code Library, 1603.013\r\n```\r\n\r\nLicense\r\n-------\r\n\r\nAll *code* in PyGDSM is licensed under the MIT license (not the underlying *data*). \r\nThe PCA data, by Zheng et. al. is licensed under MIT also (see https://github.com/jeffzhen/gsm2016).\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python Global Sky Model of diffuse Galactic radio emission",
    "version": "1.5.3",
    "project_urls": {
        "Homepage": "https://github.com/telegraphic/pygdsm"
    },
    "split_keywords": [
        "radio",
        "astronomy",
        "sky",
        "model",
        "galactic",
        "diffuse",
        "emission"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8d14834226c0c6173db3cbf3ac25cc8e3cb7aa6bc42a2c1d9a3a002cb304558",
                "md5": "91049fb4cf89b05f24bf172e9b3d2fef",
                "sha256": "bea7d08e448720b14cf235641ab1ba5fb7d682e6c2d2f95847cbc5b9145f6c76"
            },
            "downloads": -1,
            "filename": "pygdsm-1.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "91049fb4cf89b05f24bf172e9b3d2fef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21017,
            "upload_time": "2024-04-15T07:45:00",
            "upload_time_iso_8601": "2024-04-15T07:45:00.272482Z",
            "url": "https://files.pythonhosted.org/packages/a8/d1/4834226c0c6173db3cbf3ac25cc8e3cb7aa6bc42a2c1d9a3a002cb304558/pygdsm-1.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-15 07:45:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "telegraphic",
    "github_project": "pygdsm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pygdsm"
}
        
Elapsed time: 0.23906s