python package for lunar and solar information
Project description
lunastro
lunastro is a python library for lunar and solar information. It provides astronomers, data experts, and python developers with a quick, easy, and accurate approach to get information on celestial bodies.
To install lunastro:
pip install lunastro
Functions
get_lunar_phase() # returns phase
get_lunar_age() # returns age of moon
get_lunar_age_percentage() # returns age percentage of moon
solardistance() # returns distance to the sun in miles
declination(galactic_latitude, galactic_longitude) # solar declination
eclipticlongtitude(anomaly) # ecliptic longitude
rightAscension(galactic_latitude, galactic_longitude) # right Ascension
azimuth(hour_angle, latitude, declination) # azimuth
hourangle() # returns solar hour angle (approximate)
mean_solar_time(longitude) # returns mean solar time
solar_mean_anomaly(longitude) # returns anomaly
center_equation(longitude) # returns center
calculate_sunrise(latitude, longitude, date) # returns sunrise time (doesn't take into account DST)
Astronomical Measurement:
lightyeardist_to_miles(lightyears) # returns miles
miles_to_lightyeardist(miles) # returns lightyeardistance
miles_to_au(miles) # returns astronomical units
au_to_miles(au) # returns miles from astronomical units
parsec_to_miles(parsec) # returns miles from parsec (3.26 light years is a parsec)
miles_to_parsec(miles) # returns parsecs from miles
Lunar Usage:
:
from lunation.main import myMoon
# create instance of myMoon
moon = myMoon()
# functions
phase = moon.get_lunar_phase() # returns lunar phase
age = moon.get_lunar_age() # returns lunar age
percent = moon.get_lunar_age_percent() # returns percent of lunar age as a decimal
The library can also be used to calculate distance from the sun
Solar Usage:
from lunation.sun import Sun
# instance of Sun
sun = Sun() # sun object
distance = sun.solardistance() # returns solar distance in miles from the sun
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lunastro-0.0.10.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for lunastro-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33f679460097f196de822443ec2344b2ceea12ac83497d210aa5ca366667e9db |
|
MD5 | 6ef0486109657bd4e066eced5a3b9846 |
|
BLAKE2b-256 | e8146dfef9b749bca2902b56edb261906d32647b767817abb569b7c9458d6c53 |