astroconst


Nameastroconst JSON
Version 0.0.11 PyPI version JSON
download
home_pageNone
SummaryA Python package that provides astronomical constants.
upload_time2024-04-27 14:58:31
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseEUPL 1.2
keywords constants astronomy physics mathematics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AstroConst #

![PyPI](https://img.shields.io/pypi/v/astroconst?color=%230A0) ![PyPI -
Downloads](https://img.shields.io/pypi/dm/astroconst) [![Documentation
Status](https://readthedocs.org/projects/astroconst/badge/?version=latest)](https://astroconst.readthedocs.io/en/latest/?badge=latest)
![PyPI - License](https://img.shields.io/pypi/l/astroconst?color=%230A0)

A Python package that provides astronomical constants. 
The code is being developed by [Marc van der Sluys](http://marc.vandersluys.nl) of the department of 
Astrophysics at the Radboud University Nijmegen, the Institute of Nuclear and High-Energy Physics (Nikhef), 
and the Institute for Gravitational and Subatomic Physics (GRASP) at Utrecht University, all in The 
Netherlands.  The AstroConst package can be used under the conditions of the 
[EUPL 1.2](https://www.eupl.eu/1.2/en/) licence.

Note that the package is currently is its alpha stage, and things may still change as I start using this.


## Installation ##

This package can be installed using `pip install astroconst`.  This should automatically install the
dependency package `numpy`, if it has't been installed already.  If you are installing by hand, ensure that
this package is installed as well.


## Example use ##

SI units should be used everywhere - no ergs, dyn or cm (sorry!).  Values include mathematical constants (like
π), angle-conversion factors (from/to radians, degrees, hours, arcseconds, ...), calendar stuff (names of
weekdays and months, JDs, lengths of days, months and years), solar-system objects (Sun, Moon, planet
names diameters, orbital separations, etc. - note that Moon = planet #0), and some basic physical constants
((Stefan-)Bolzmann, Planck, speed of light, etc.).

The submodule `aa` contains constants published by the Astronomical Almanac, converted to Python.


```python
"""Example Python script using the AstroConst package."""

import astroconst as ac

print(ac.c)     # 299792458 (speed of light, quick access)
print(ac.aa.c)  # Access constants from Astronomical Almanac

print(ac.jd2000)  # 2451545
print(ac.m_sun)  # 1.9891e+30 (kg)
print(ac.sol_const)  # 1361.5 (W/m2)

print(ac.year_jul)  # 31557600.0 (s)
print(ac.year_jul/ac.day)  # 365.25 (days)
print(ac.month_syn/ac.day)  # 29.530588853 (days)

print('The diameter of '+ac.plname_en[5]+' is '+str(ac.pl_d[5]/ac.km)+' km')
# The diameter of Jupiter is 142984 km

print('a_'+ac.plname_en[0]+' = '+str(ac.pl_a[0]/ac.km)+' km')
# a_Moon = 384400.0 km (Moon = planet #0)

print(ac.dow_en_abr[0])  # Sun
print(ac.months_en[3])  # March
```


## AstroConst pages ##

* [Pypi](https://pypi.org/project/astroconst/): AstroConst Python package
* [GitHub](https://github.com/MarcvdSluys/AstroConst/): AstroConst source code
* [ReadTheDocs](https://astroconst.readthedocs.io/): AstroConst documentation


## Author and licence ##

* Author: Marc van der Sluys
* Contact: http://marc.vandersluys.nl
* Licence: [EUPL 1.2](https://www.eupl.eu/1.2/en/)


## References ##

* [The Astronomical Almanac Online!](http://asa.hmnao.com/SecK/Constants.html)


<sub>Copyright (c) 2022 Marc van der Sluys</sub>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "astroconst",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "constants, astronomy, physics, mathematics",
    "author": null,
    "author_email": "Marc van der Sluys <git@vandersluys.nl>",
    "download_url": "https://files.pythonhosted.org/packages/4c/4e/960c2ce430d8cf06b092a7246e48683b275b7701e97f1fe00b8f9ad1111f/astroconst-0.0.11.tar.gz",
    "platform": null,
    "description": "# AstroConst #\n\n![PyPI](https://img.shields.io/pypi/v/astroconst?color=%230A0) ![PyPI -\nDownloads](https://img.shields.io/pypi/dm/astroconst) [![Documentation\nStatus](https://readthedocs.org/projects/astroconst/badge/?version=latest)](https://astroconst.readthedocs.io/en/latest/?badge=latest)\n![PyPI - License](https://img.shields.io/pypi/l/astroconst?color=%230A0)\n\nA Python package that provides astronomical constants. \nThe code is being developed by [Marc van der Sluys](http://marc.vandersluys.nl) of the department of \nAstrophysics at the Radboud University Nijmegen, the Institute of Nuclear and High-Energy Physics (Nikhef), \nand the Institute for Gravitational and Subatomic Physics (GRASP) at Utrecht University, all in The \nNetherlands.  The AstroConst package can be used under the conditions of the \n[EUPL 1.2](https://www.eupl.eu/1.2/en/) licence.\n\nNote that the package is currently is its alpha stage, and things may still change as I start using this.\n\n\n## Installation ##\n\nThis package can be installed using `pip install astroconst`.  This should automatically install the\ndependency package `numpy`, if it has't been installed already.  If you are installing by hand, ensure that\nthis package is installed as well.\n\n\n## Example use ##\n\nSI units should be used everywhere - no ergs, dyn or cm (sorry!).  Values include mathematical constants (like\n&pi;), angle-conversion factors (from/to radians, degrees, hours, arcseconds, ...), calendar stuff (names of\nweekdays and months, JDs, lengths of days, months and years), solar-system objects (Sun, Moon, planet\nnames diameters, orbital separations, etc. - note that Moon = planet #0), and some basic physical constants\n((Stefan-)Bolzmann, Planck, speed of light, etc.).\n\nThe submodule `aa` contains constants published by the Astronomical Almanac, converted to Python.\n\n\n```python\n\"\"\"Example Python script using the AstroConst package.\"\"\"\n\nimport astroconst as ac\n\nprint(ac.c)     # 299792458 (speed of light, quick access)\nprint(ac.aa.c)  # Access constants from Astronomical Almanac\n\nprint(ac.jd2000)  # 2451545\nprint(ac.m_sun)  # 1.9891e+30 (kg)\nprint(ac.sol_const)  # 1361.5 (W/m2)\n\nprint(ac.year_jul)  # 31557600.0 (s)\nprint(ac.year_jul/ac.day)  # 365.25 (days)\nprint(ac.month_syn/ac.day)  # 29.530588853 (days)\n\nprint('The diameter of '+ac.plname_en[5]+' is '+str(ac.pl_d[5]/ac.km)+' km')\n# The diameter of Jupiter is 142984 km\n\nprint('a_'+ac.plname_en[0]+' = '+str(ac.pl_a[0]/ac.km)+' km')\n# a_Moon = 384400.0 km (Moon = planet #0)\n\nprint(ac.dow_en_abr[0])  # Sun\nprint(ac.months_en[3])  # March\n```\n\n\n## AstroConst pages ##\n\n* [Pypi](https://pypi.org/project/astroconst/): AstroConst Python package\n* [GitHub](https://github.com/MarcvdSluys/AstroConst/): AstroConst source code\n* [ReadTheDocs](https://astroconst.readthedocs.io/): AstroConst documentation\n\n\n## Author and licence ##\n\n* Author: Marc van der Sluys\n* Contact: http://marc.vandersluys.nl\n* Licence: [EUPL 1.2](https://www.eupl.eu/1.2/en/)\n\n\n## References ##\n\n* [The Astronomical Almanac Online!](http://asa.hmnao.com/SecK/Constants.html)\n\n\n<sub>Copyright (c) 2022 Marc van der Sluys</sub>\n",
    "bugtrack_url": null,
    "license": "EUPL 1.2",
    "summary": "A Python package that provides astronomical constants.",
    "version": "0.0.11",
    "project_urls": {
        "GitHub": "https://github.com/MarcvdSluys/AstroConst",
        "ReadTheDocs": "https://astroconst.readthedocs.io"
    },
    "split_keywords": [
        "constants",
        " astronomy",
        " physics",
        " mathematics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90cf6861691707c10dc31b67e8e14732cddca5a82f487cd0d48fe2c2bee711d6",
                "md5": "2d0516cfb0ee742dbe117dc98419913d",
                "sha256": "72f7a814d59e1a13291db807dc54d53387f8a40d770ac2f7baa63f900efb0595"
            },
            "downloads": -1,
            "filename": "astroconst-0.0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2d0516cfb0ee742dbe117dc98419913d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16084,
            "upload_time": "2024-04-27T14:58:29",
            "upload_time_iso_8601": "2024-04-27T14:58:29.338179Z",
            "url": "https://files.pythonhosted.org/packages/90/cf/6861691707c10dc31b67e8e14732cddca5a82f487cd0d48fe2c2bee711d6/astroconst-0.0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c4e960c2ce430d8cf06b092a7246e48683b275b7701e97f1fe00b8f9ad1111f",
                "md5": "d6ebbf7b5480fa6354430725fd4e5a80",
                "sha256": "37157631d3ab63a34db79456e2811b2797e718d6b96a641b82dec83e72e7849c"
            },
            "downloads": -1,
            "filename": "astroconst-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "d6ebbf7b5480fa6354430725fd4e5a80",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16230,
            "upload_time": "2024-04-27T14:58:31",
            "upload_time_iso_8601": "2024-04-27T14:58:31.213003Z",
            "url": "https://files.pythonhosted.org/packages/4c/4e/960c2ce430d8cf06b092a7246e48683b275b7701e97f1fe00b8f9ad1111f/astroconst-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-27 14:58:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MarcvdSluys",
    "github_project": "AstroConst",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "astroconst"
}
        
Elapsed time: 0.24032s