Skip to main content

A Python library for common astronomical and physical constants

Project description

Astro Constants Library

Here's a detailed and professional README.md description for your project:


Astro Constants Library

Astro Constants is a Python library that provides a comprehensive collection of commonly used astronomical and physical constants. This library is designed for developers, researchers, educators, and astronomy enthusiasts to simplify calculations and projects related to astrophysics, cosmology, and space science.

Features

  • Predefined Constants:

    • Speed of Light (SPEED_OF_LIGHT)
    • Gravitational Constant (GRAVITATIONAL_CONSTANT)
    • Planck's Constant (PLANCK_CONSTANT)
    • Astronomical Unit (AU) (ASTRONOMICAL_UNIT)
    • Light Year (LIGHT_YEAR)
    • Parsec (PARSEC)
    • Masses and Radii of Celestial Bodies (Sun, Earth, Moon, Jupiter, etc.)
    • Surface Temperature of the Sun
    • Cosmic Microwave Background (CMB) Temperature
    • Orbital Periods (Earth, Moon)
    • Solar Luminosity
    • And many more!
  • Easy-to-Use:

    • Access constants with simple Python imports for quick implementation.
  • Well-Documented:

    • Full descriptions of all constants are provided to ensure clarity and usability.

Installation

You can install the library directly from PyPI:

pip install astro-constants

Usage

Import the library into your Python project and access constants:

from astro_constants import SPEED_OF_LIGHT, MASS_OF_SUN

print(f"The speed of light is {SPEED_OF_LIGHT} m/s.")
print(f"The mass of the Sun is {MASS_OF_SUN} kg.")

Included Constants

Here is a partial list of constants available in this library:

Fundamental Constants

  • Speed of Light: 299792458 m/s
  • Gravitational Constant: 6.67430e-11 m^3/kg/s^2
  • Planck's Constant: 6.62607015e-34 J·s
  • Boltzmann Constant: 1.380649e-23 J/K

Astronomical Units

  • Astronomical Unit (AU): 1.496e11 meters
  • Light Year: 9.461e15 meters
  • Parsec: 3.0857e16 meters

Celestial Bodies

  • Mass of the Sun: 1.989e30 kg
  • Mass of the Earth: 5.972e24 kg
  • Mass of the Moon: 7.348e22 kg
  • Radius of the Sun: 6.9634e8 meters
  • Radius of the Earth: 6.371e6 meters

Orbital and Solar Data

  • Earth Orbital Period: 365.25 days
  • Moon Orbital Period: 27.322 days
  • Solar Luminosity: 3.828e26 watts

Contributing

We welcome contributions! If you'd like to contribute to this project, please:

  1. Fork the repository on GitHub.
  2. Make your changes.
  3. Submit a pull request with a clear description of the changes.

License

This project is licensed under the MIT License.

Support

If you encounter any issues or have suggestions, feel free to open an issue on the GitHub repository.


Installation

Install the library locally with:

pip install astro-constants

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astro_constants-1.2.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

astro_constants-1.2.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file astro_constants-1.2.0.tar.gz.

File metadata

  • Download URL: astro_constants-1.2.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for astro_constants-1.2.0.tar.gz
Algorithm Hash digest
SHA256 75c99210c16cf21f6c6e50d2dc9b0c82a55663a305bd1901bf97091149647319
MD5 576fa5e3193a656b5a02fc61694039ad
BLAKE2b-256 fcada52e53c7217da1898d2fe2ff08e5acf88c9b6a9400d6744d397b49c61182

See more details on using hashes here.

File details

Details for the file astro_constants-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for astro_constants-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 195443566d892de0f1bf02da611e8a2ad8857a51d2d87f3171e81dd6a9a613e1
MD5 ebd7dadc7b09ba981e41da7b4afec728
BLAKE2b-256 d818ba44dd4f794c25ea62d14bc198ac9124d67a90e738d41b6b2b081c36dbab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page