Skip to main content

python package for lunar and solar information

Project description

Lunastro

Lunastro is a python library for calculating astronomical data, such as, but not limited to:

  • RA of the sun
  • Hour angle of the sun
  • Declination of the sun
  • Longitude of the Sun's Ascending Node (Omega)
  • Solar Geometric mean Anomaly
  • Solar Geometric mean Longitude
  • True Solar Longitude
  • Distance to the sun
  • Local sidereal time (accurate to the second)
  • Sun altitude
  • Sun azimuth
  • Moon Position

Usage

Lunastro's functions return objects of information. Here is a list of each function and what it returns:

Solar Data

latitude = 47.6101 # Bellevue WA latitude
solar_data = getSunData(latitude) # get the solar data

This returns:

Attribute Description
dec current solar declination
hour_angle current solar hour angle
ra current solar right ascension
long_omega Longitude of the Sun's ascending node
true_solar_anomaly true solar anomaly
true_solar_longitude true solar longitude
geo_anomaly geometric mean anomaly of the sun
geo_long geometric mean longitude of the sun
dist distance to the sun in miles

Altitude of the Sun

# lat and long are of Bellevue WA
latitude = 47.6101
longitude = -122
alt = altitude(latitude, longitude)

This returns the altitude of the sun in radians

Azimuth of the Sun

# lat and long are of Bellevue WA
latitude = 47.6101
longitude = -122
azi = azimuth(latitude, longitude)

This returns the azimuth of the sun in radians

Local Sidereal Time

# longitude 
long = -122
time = localSiderealTime(long)

This returns the local sidereal time as an object:

Attribute Description
raw raw sidereal time
hour hours of sidereal time
minute minutes of sidereal time
second seconds of sidereal time

Moon Positioning

# lat and long are of Bellevue WA
lat = 47.6101
long = -122
moon_pos = getMoonPosition(lat, long)

This returns the positioning of the moon as an object:

Attribute Description
azimuth azimuth of the moon
altitude altitude of the moon
distance distance to the moon in KM
parallacticAngle parallactic angle of the moon

Changelog

Version 0.0.21 (March 18th 2023)

  • Edited most of the files by making the functions more accurate. Changed the functions to output objects.

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

lunastro-0.0.22.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

lunastro-0.0.22-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file lunastro-0.0.22.tar.gz.

File metadata

  • Download URL: lunastro-0.0.22.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for lunastro-0.0.22.tar.gz
Algorithm Hash digest
SHA256 d2a0df2d652ed1dcb083953ba312d49d8ac7022f8c1ccecd24d73d42435e8711
MD5 1583dd834745159f633ab26aeb1b9872
BLAKE2b-256 5ca8b162394a215b826a73451db91c237c5e59cf5fcf43cfbf30ab2d63dd2d2d

See more details on using hashes here.

File details

Details for the file lunastro-0.0.22-py3-none-any.whl.

File metadata

  • Download URL: lunastro-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for lunastro-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 7e0f1e72ee2739154a3a5c1c56066662e160d1bf65575e69ef9e09627974cd28
MD5 d48a5253dd98aeeca1ead16074fba580
BLAKE2b-256 e622df9cccc697aed67c86a01803b32eb5516867014d505f37d776bf8779e665

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