Skip to main content

A python package for creating star charts

Project description

Author: Behrouz Safari
Website: AstroDataScience.Net

Sky Chart

Creating star charts with python

Example 1:

Let's create sky chart of Paris at this moment. We want just the stars with apparent magnitude below 5.

import skychart as sch
from datetime import datetime
import matplotlib.pyplot as plt

t = datetime.now()
obs_loc = (2.3522, 48.8566)

fig, ax, df = sch.draw(obs_loc, t, mag_max=5, alpha=0.3)
plt.show()

Example 2:

Here we make the same chart, using the low-level function draw_chart. We want only two constellations be drawn (Ursa Major and Cassiopeia).

import skychart as sch
from datetime import datetime
import matplotlib.pyplot as plt

t = datetime.now()
obs_loc = (2.3522, 48.8566)

# Base dataframe
df = sch.visible_hipparcos(obs_loc, t)

# DataFrame of stars that will be shown
df_show = df[df['Vmag']<5]

# Load constellation data
dc_const = sch.load_constellations()

# Show only Ursa Major and Cassiopeia constellations
dc_const = {'UMa': dc_const['UMa'],
            'Cas': dc_const['Cas']}

fig, ax, df_show = sch.draw_chart(df, df_show, dc_const, alpha=0.3)
plt.show()

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

skychart-0.0.3.tar.gz (96.7 kB view details)

Uploaded Source

Built Distribution

skychart-0.0.3-py3-none-any.whl (95.6 kB view details)

Uploaded Python 3

File details

Details for the file skychart-0.0.3.tar.gz.

File metadata

  • Download URL: skychart-0.0.3.tar.gz
  • Upload date:
  • Size: 96.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for skychart-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9817a0caa274e67d860d1cadc88faf3b78ac80786dc4977af37d32df7676a44d
MD5 5abe2e7a2381202af74cbae047089229
BLAKE2b-256 ba2def0f9a30dacbc2a433cd033ef4081c9a7974a2c09a73afbf005b954ff4df

See more details on using hashes here.

File details

Details for the file skychart-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: skychart-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 95.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for skychart-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f5fc53b7c0025672ec52dda5df0ad07e6783ff987ca796002f73c196d9998fa9
MD5 b6f7fdacef069b4508247b00335c0ab3
BLAKE2b-256 88b61dbc95bed1a1968a0720aca9fba8b1365e12679007029fb6d11ce97baa79

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