Skip to main content

Calculation of lunar data using NASA’s SPICE toolbox.

Project description

spicedmoon

Version 1.0.13 License: MIT

Calculation of lunar data using NASA’s SPICE toolbox.

This data includes:

  • Distance between the Sun and the Moon (in astronomical units)
  • Distance between the Sun and the Moon (in kilometers)
  • Distance between the Observer and the Moon (in kilometers)
  • Selenographic longitude of the Sun (in radians)
  • Selenographic latitude of the observer (in degrees)
  • Selenographic longitude of the observer (in degrees)
  • Moon phase angle (in degrees)
  • Azimuth angle (in degrees)
  • Zenith angle (in degrees)

It exports the following functions:

  • get_moon_datas - Calculates needed MoonData from SPICE toolbox
  • get_moon_datas_from_extra_kernels - Calculates needed MoonData from SPICE toolbox and using data from extra kernels for the observer body

Requirements

  • python>=3.7
  • numpy>=1.21.5
  • spiceypy>=5.0.0

Installation

pip install spicedmoon

Kernels

In order to use the package, a directory with all the kernels must be downloaded.

That directory must contain the following kernels:

Usage

If one wanted to obtain the lunar azimuth and zenith at Izaña Atmospheric Observatory, on 2022-01-17 at 00:00:00 (UTC), we could use the following snippet of code:

import spicedmoon as spm

lat = 28.309283
lon = -16.499143
alt = 2373
dts = ["2022-01-17 00:00:00"]
mds = spm.get_moon_datas(lat, lon, alt, dts, "./kernels")
az = mds[0].azimuth
ze = mds[0].zenith

Note that the kernels directory is called "kernels" and is located in the directory where the previous code is executed.

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

spicedmoon-1.0.13.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

spicedmoon-1.0.13-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file spicedmoon-1.0.13.tar.gz.

File metadata

  • Download URL: spicedmoon-1.0.13.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for spicedmoon-1.0.13.tar.gz
Algorithm Hash digest
SHA256 886e4f3c0f530887f1c81ec90b54bf600eabdcc188538c0fc3953be38f345519
MD5 a250f5042394c8af5060a88403498f10
BLAKE2b-256 34b177bc95aef53b01d17b2e1509822ea86fd917a086b4439349c0c28171d3cb

See more details on using hashes here.

File details

Details for the file spicedmoon-1.0.13-py3-none-any.whl.

File metadata

  • Download URL: spicedmoon-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for spicedmoon-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1bbb0a575963bd01ca59e368a16fde001662c3e2f72574f72a099b685d790e72
MD5 32f0744158df66e31986d9a9e6ddc77e
BLAKE2b-256 5dca5d052303da9a696647bf14368f053ac5c296f32345e263d7d693c56a53ce

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