Skip to main content

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.

Release files for lunastro 0.0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lunastro 0.0.22
File Size Uploaded
lunastro-0.0.22.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lunastro 0.0.22
File Interpreter ABI Platform
lunastro-0.0.22-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / lunastro-0.0.22.tar.gz

Download URL lunastro-0.0.22.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d2a0df2d652ed1dcb083953ba312d49d8ac7022f8c1ccecd24d73d42435e8711
BLAKE2b-256 checksum
How to use checksums
5ca8b162394a215b826a73451db91c237c5e59cf5fcf43cfbf30ab2d63dd2d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / lunastro-0.0.22-py3-none-any.whl

Download URL lunastro-0.0.22-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e0f1e72ee2739154a3a5c1c56066662e160d1bf65575e69ef9e09627974cd28
BLAKE2b-256 checksum
How to use checksums
e622df9cccc697aed67c86a01803b32eb5516867014d505f37d776bf8779e665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.0.22 This release

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page