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.3.0.tar.gz
.
File metadata
- Download URL: astro_constants-1.3.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f366289c80e16cb63771de4282e515f6aca86099d4c45a41084752bee355ee7 |
|
MD5 | 90119db02dc412c83d4e6f4ba8f7c50c |
|
BLAKE2b-256 | b6340e67bad1265f0a11108d15e761f2b23f644d9645ef4092302f6b40ab6d60 |
File details
Details for the file astro_constants-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: astro_constants-1.3.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.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ff954882ba9081d5efbae89ce00c03268a92526356461e4e2d9b4788ed4ff83 |
|
MD5 | 0e153e9a429a4fddaa9d715d606e730e |
|
BLAKE2b-256 | 5fde946c9643757cf4f87fd92ddd953c7650d20046c653f307f5e5a1e63e4c7c |