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!
- Speed of Light (
-
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:
- Fork the repository on GitHub.
- Make your changes.
- 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
Built Distribution
File details
Details for the file astro_constants-1.5.0.tar.gz
.
File metadata
- Download URL: astro_constants-1.5.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b937a6f16cdc0fd86552b36bc9f94483a5e2a6a4df6c5b02b46e55fa06569f6 |
|
MD5 | ead313d09e1b2a62986f756b4f6cc7bf |
|
BLAKE2b-256 | 5e15eede89a69dfe206f82240bda19a849ff1ac3755f7eaff04dd8b7d9a8e867 |
File details
Details for the file astro_constants-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: astro_constants-1.5.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f864cd8dacfab92a953378331c0292f9080d200edffe1c104ae77471444446a1 |
|
MD5 | ce8504abe54811bc1094c5fe79499f73 |
|
BLAKE2b-256 | a9612b2954c607e1c13bd96e145638050c83db449ec751347db30834b83fd27e |