Metadata-Version: 2.4
Name: aavsoquery
Version: 1.0.2
Summary: A Python module for fetching and plotting astronomical data of stars from AAVSO
Home-page: https://github.com/prashant050701/aavso_query
Author: Divyansh Srivastava
Author-email: divyansh@umk.pl
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: beautifulsoup4
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: lmfit
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# AAVSO Query

This Python package `aavsoquery` allows fetching and visualising 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:

```bash
pip install aavsoquery
```
## Usage

Here is an example of how to use `aavsoquery`:

```python
from aavsoquery import AAVSODataFetcher, 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

