{ "info": { "author": "Luke Zoltan Kelley", "author_email": "lkelley@cfa.harvard.edu", "bugtrack_url": null, "classifiers": [], "description": "cosmopy\n=========\n\n.. image:: https://img.shields.io/travis/lzkelley/cosmopy.svg\n :target: https://travis-ci.org/lzkelley/cosmopy?branch=master\n\n.. image:: https://img.shields.io/codecov/c/github/lzkelley/cosmopy/master.svg\n :target: https://codecov.io/gh/lzkelley/cosmopy\n\nQuickly calculate cosmological parameters. \n\n- Provides both command-line and API interfaces. \n\n- Uses the machinery from the `astropy.cosmology` package.\n\nThe user provides an input parameter (e.g. redshift or luminosity-distance) and recieves the entire set of cosmological measures corresponding to the epoch thus specified.\n\n\nThe below gif shows three examples: inputting a redshift, a luminosity distance (`-dl 400Mpc`), and an age of the universe (`-ta 3.2Gyr`).\n\n.. image:: https://raw.githubusercontent.com/lzkelley/cosmopy/dev/docs/cosmopy_demo.gif\n :height: 100px\n\n\nInstallation\n------------\n\nUsing `pip`:\n\n::\n\n pip install cosmopy\n\nFrom source:\n\n::\n\n git clone git@github.com:lzkelley/cosmopy.git\n pip install cosmopy\n\n\nUsage\n-----\n`cosmopy` can be used via the command-line `cosmo` command, or via python API by importing the module directly.\n\n- Command Line:\n\n ::\n\n $ cosmo --help\n\n usage: cosmo [-h] [-z Z] [-a A] [-dc DC] [-dl DL] [-tl TL] [-ta TA] [-v]\n\n cosmopy: cosmological calculator.\n\n optional arguments:\n -h, --help show this help message and exit\n -z Z target redshift z\n -a A target scale factor a\n -dc DC, -cd DC target coming distance D_C\n -dl DL, -ld DL target luminosity distance D_L\n -tl TL, -lt TL target look-back time T_L\n -ta TA, -at TA target universe age T_A\n -v, --version print version information.\n\n For example, entering an input redshift of 0.2:\n\n ::\n\n $ cosmo -z 0.2\n\n z = 0.2000 : Redshift\n a = 0.8333 : Scale-factor\n D_c = 815.3960 Mpc ~ 2.5160e+27 cm : Comoving Distance\n D_L = 978.4752 Mpc ~ 3.0193e+27 cm : Luminosity Distance\n D_A = 679.4967 Mpc ~ 2.0967e+27 cm : Angular Diameter Distance\n Arcsec = 3294.2928 pc ~ 1.0165e+22 cm : Arcsecond Scale\n T_lb = 2.4277 Gyr ~ 7.6613e+16 s : Lookback Time\n T_a = 11.3235 Gyr ~ 3.5734e+17 s : Age of the Universe\n DM = 39.9527 : Distance Modulus\n\n or an input luminosity-distance of 400 Mpc:\n\n ::\n\n $ cosmo -dl 400Mpc\n\n z = 0.0880 : Redshift\n a = 0.9192 : Scale-factor\n D_c = 367.6631 Mpc ~ 1.1345e+27 cm : Comoving Distance\n D_L = 400.0000 Mpc ~ 1.2343e+27 cm : Luminosity Distance\n D_A = 337.9403 Mpc ~ 1.0428e+27 cm : Angular Diameter Distance\n Arcsec = 1638.3809 pc ~ 5.0555e+21 cm : Arcsecond Scale\n T_lb = 1.1496 Gyr ~ 3.6280e+16 s : Lookback Time\n T_a = 12.6016 Gyr ~ 3.9768e+17 s : Age of the Universe\n DM = 38.0103 : Distance Modulus\n\n- Python API\n\n The module can be imported as `cosmopy`, from which the primary access point is the `api` function which accepts two arguments: a `key` (a target cosmological parameter) and a `value` of that parameter (optionally including units). The function returns a dictionary with the computed values as key: value pairs (both strings). For example:\n\n ::\n\n $ python -c \"import cosmopy; print(cosmopy.api('dl', '1.2 Gpc'))\"\n {'z': '0.2396', 'dl': '1200.0000 Mpc', 'tl': '2.8359 Gyr', 'dc': '968.0336 Mpc', 'ta': '10.9153 Gyr', 'da': '780.9075 Mpc', 'dm': '40.3959', 'arc': '3785.9464 pc', 'a': '0.8067'}\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/lzkelley/cosmopy/archive/v3.2.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lzkelley/cosmopy", "keywords": "utilities,physics,astronomy,cosmology,astrophysics,calculator", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cosmopy", "package_url": "https://pypi.org/project/cosmopy/", "platform": "", "project_url": "https://pypi.org/project/cosmopy/", "project_urls": { "Download": "https://github.com/lzkelley/cosmopy/archive/v3.2.0.tar.gz", "Homepage": "https://github.com/lzkelley/cosmopy" }, "release_url": "https://pypi.org/project/cosmopy/3.2.0/", "requires_dist": [ "numpy", "scipy", "astropy", "nose", "coverage", "future", "click", "codecov" ], "requires_python": "", "summary": "General, commonly used functions for other projects.", "version": "3.2.0" }, "last_serial": 3460589, "releases": { "3.1.2": [ { "comment_text": "", "digests": { "md5": "0897f0427db96f6e81e08f9d0167018a", "sha256": "c4403d72793c8f9d7a8a7ad5b736ca49e5958d93a70a2950e73fed4964007a87" }, "downloads": -1, "filename": "cosmopy-3.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0897f0427db96f6e81e08f9d0167018a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10680, "upload_time": "2018-01-02T03:26:25", "url": "https://files.pythonhosted.org/packages/8c/03/65b730b23ed409cf9b084efff171a90789b170186ff75d6a1a54a80fe11e/cosmopy-3.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44cf03ebe4454a9d58827ca835a65436", "sha256": "1a3f730bf601225b044961309b959b7c5166dcdd3169332815c7784141c3383e" }, "downloads": -1, "filename": "cosmopy-3.1.2.tar.gz", "has_sig": false, "md5_digest": "44cf03ebe4454a9d58827ca835a65436", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7793, "upload_time": "2018-01-02T03:26:26", "url": "https://files.pythonhosted.org/packages/94/16/26ed8192a571840747aa8b255367f525ae1cfae3a8dbe044f0604cfbad1a/cosmopy-3.1.2.tar.gz" } ], "3.2.0": [ { "comment_text": "", "digests": { "md5": "4dc64eb429bd6e8444a981fd8632025f", "sha256": "e7f551c2927d2a04bb40e8864e3c7e0b0a69f76dfc81d72cb6dbd90025e4435c" }, "downloads": -1, "filename": "cosmopy-3.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4dc64eb429bd6e8444a981fd8632025f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12168, "upload_time": "2018-01-04T01:43:59", "url": "https://files.pythonhosted.org/packages/b2/ff/2341e4706aeaa44ffebbd4f3eea7af60d47c39926aa4ce7c82b14ccf8351/cosmopy-3.2.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4dc64eb429bd6e8444a981fd8632025f", "sha256": "e7f551c2927d2a04bb40e8864e3c7e0b0a69f76dfc81d72cb6dbd90025e4435c" }, "downloads": -1, "filename": "cosmopy-3.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4dc64eb429bd6e8444a981fd8632025f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12168, "upload_time": "2018-01-04T01:43:59", "url": "https://files.pythonhosted.org/packages/b2/ff/2341e4706aeaa44ffebbd4f3eea7af60d47c39926aa4ce7c82b14ccf8351/cosmopy-3.2.0-py2.py3-none-any.whl" } ] }