astroconst


Nameastroconst JSON
Version 0.0.12 PyPI version JSON
download
home_pageNone
SummaryA Python package that provides astronomical constants.
upload_time2024-06-23 10:02:32
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/d7/ff/cfcdc51f169f0c45d8daf9c730860175345c82fc8e222d2a3a8d3e607ab1/astroconst-0.0.12.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.12",
    "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": "8a7dd5936281794587344ddeefb8d4fdcacae7546faba5978556ff11cc87d82c",
                "md5": "44101d9725452f3e72dc6d3870074a28",
                "sha256": "60c56ae2130839485d0dbb07c2affdcb86388b573f5f5b813bc51ff861b57a4b"
            },
            "downloads": -1,
            "filename": "astroconst-0.0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "44101d9725452f3e72dc6d3870074a28",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16453,
            "upload_time": "2024-06-23T10:02:27",
            "upload_time_iso_8601": "2024-06-23T10:02:27.376605Z",
            "url": "https://files.pythonhosted.org/packages/8a/7d/d5936281794587344ddeefb8d4fdcacae7546faba5978556ff11cc87d82c/astroconst-0.0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d7ffcfcdc51f169f0c45d8daf9c730860175345c82fc8e222d2a3a8d3e607ab1",
                "md5": "f44fa1a218e21c47f0dfcfda8407970a",
                "sha256": "9f63ed4d521b84ab65ee0b6e141e75670dc640e8f4c5ba97039093db06d2cddc"
            },
            "downloads": -1,
            "filename": "astroconst-0.0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "f44fa1a218e21c47f0dfcfda8407970a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16808,
            "upload_time": "2024-06-23T10:02:32",
            "upload_time_iso_8601": "2024-06-23T10:02:32.391749Z",
            "url": "https://files.pythonhosted.org/packages/d7/ff/cfcdc51f169f0c45d8daf9c730860175345c82fc8e222d2a3a8d3e607ab1/astroconst-0.0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-23 10:02:32",
    "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.30486s