Skip to main content

A Python module for fetching and plotting astronomical data of stars from AAVSO

Project description

AAVSO Query

This Python package aavsoquery allows fetching and visualizing astronomical observational data from the AAVSO (American Association of Variable Star Observers) database. It provides tools to retrieve data, plot light curves, and optionally fit models to the observed data.

Features

  • Data Fetching: Fetch observational data for a specific star including visual observations.
  • Light Curve Plotting: Plot light curves with customizable time intervals.
  • Model Fitting: Optional fitting of Gaussian models to the light curve data.

Installation

You can install aavsoquery via pip:

pip install aavsoquery

Usage

Here is an example of how to use aavsoquery:

from aavso_query import AAVSODataFetcher
from plotter import Plotter

fetcher = AAVSODataFetcher(
    star_name='T CrB',
    obs_types='vis',
    num_results=100,
    pages=1
) #query by star's name (Example: T CrB), ability to fetch by a particular observer by obscode = 'Observer's code'


julian_dates, magnitudes = fetcher.fetch_and_parse_data(include_uncertain=True) # you can exclude uncertain values that begins with <

if len(julian_dates) > 0 and len(magnitudes) > 0: #if data fetched then plot it
    plotter = Plotter(julian_dates, magnitudes) 
    plotter.plot_light_curve(interval_hours=1, fit_model=True) #ability to fit a simple gaussian model, also defaults to mean hourly data if more datapoints present
else:
    print("No data available to plot.")

Dependencies

  • requests
  • beautifulsoup4
  • numpy
  • matplotlib
  • lmfit

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

aavsoquery-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aavsoquery-1.0.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file aavsoquery-1.0.0.tar.gz.

File metadata

  • Download URL: aavsoquery-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for aavsoquery-1.0.0.tar.gz
Algorithm Hash digest
SHA256 36510d0add80c674327cf81b2b53d37b0935334d7db1e57b0f42f4f7c07b533c
MD5 47cbc4403668147d3540369e34ee1d69
BLAKE2b-256 cf701785f487bec71c2426306ce45c90183513dd9318bc50d89bb7c140fb078d

See more details on using hashes here.

File details

Details for the file aavsoquery-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aavsoquery-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for aavsoquery-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ce373b31b559c15a3649074f7cae60079eca775fcbfa4e7b2f2f80b1b7f987a
MD5 576ea30a4c06be0931bd8f9ff031307e
BLAKE2b-256 0ae3634f621509630593adc4ea40b93230e2748958cba30d71658b407c4aaac7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page